From owner-freebsd-doc@FreeBSD.ORG Sat Mar 30 22:20:01 2013 Return-Path: Delivered-To: freebsd-doc@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 28641166 for ; Sat, 30 Mar 2013 22:20:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 89EF8E57 for ; Sat, 30 Mar 2013 22:20:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r2UMK0Px032566 for ; Sat, 30 Mar 2013 22:20:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r2UMK0ZI032565; Sat, 30 Mar 2013 22:20:00 GMT (envelope-from gnats) Resent-Date: Sat, 30 Mar 2013 22:20:00 GMT Resent-Message-Id: <201303302220.r2UMK0ZI032565@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-doc@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Bryan Bosworth Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 63BC6FDF for ; Sat, 30 Mar 2013 22:17:07 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 54CDCE40 for ; Sat, 30 Mar 2013 22:17:07 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.5/8.14.5) with ESMTP id r2UMH6fk031211 for ; Sat, 30 Mar 2013 22:17:06 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.5/8.14.5/Submit) id r2UMH64Y031210; Sat, 30 Mar 2013 22:17:06 GMT (envelope-from nobody) Message-Id: <201303302217.r2UMH64Y031210@red.freebsd.org> Date: Sat, 30 Mar 2013 22:17:06 GMT From: Bryan Bosworth To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: docs/177514: Handbook ZFS examples do not cover dataset creation within /home to permit quotas or mention possible overwrite w/ "zfs create" X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Mar 2013 22:20:01 -0000 >Number: 177514 >Category: docs >Synopsis: Handbook ZFS examples do not cover dataset creation within /home to permit quotas or mention possible overwrite w/ "zfs create" >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Mar 30 22:20:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Bryan Bosworth >Release: 9.0-release >Organization: Johns Hopkins University >Environment: FreeBSD FREEBSD 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan 3 07:46:30 UTC 2012 root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 >Description: Section 21.2 of the Handbook is excellent and very helpful for setting up ZFS, but in 21.2.2.5 ZFS Quotas it does not create a dataset for storage/home/bob. When I followed the instructions in a virtual machine, ZFS initially complained that there is no dataset for bob. When I did create a dataset with "zfs create storage/home/bob" it overwrote the user's home directory with a new one with root:root permissions. I have seen people report the same problem online (overwriting a directory by creating a dataset at the same location). >How-To-Repeat: Create ZFS pool storage with dataset storage/home mounted on /home Create user bob with home: /home/bob "zfs create storage/home/bob" to permit quotas on storage/home/bob "zfs set quota=5G storage/home/bob" now works, but the user directory has been overwritten >Fix: As far as I know, a dataset is required for ZFS to enforce a quota. Thus, a dataset for each /home/username directory must be created with "zfs create poolname/home/username" preferably before the user is added. In my experience, adding the user after dataset creation sets the correct permissions for the directory and the quota appears as the drive size e.g. when /home/bob is mounted as a Samba share. >Release-Note: >Audit-Trail: >Unformatted: