From owner-svn-doc-all@FreeBSD.ORG Wed Apr 9 15:41:55 2014 Return-Path: Delivered-To: svn-doc-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B3CD1C84; Wed, 9 Apr 2014 15:41:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 93A3F18AD; Wed, 9 Apr 2014 15:41:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s39FftEk004298; Wed, 9 Apr 2014 15:41:55 GMT (envelope-from dru@svn.freebsd.org) Received: (from dru@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s39FftQT004295; Wed, 9 Apr 2014 15:41:55 GMT (envelope-from dru@svn.freebsd.org) Message-Id: <201404091541.s39FftQT004295@svn.freebsd.org> From: Dru Lavigne Date: Wed, 9 Apr 2014 15:41:55 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r44506 - in head/en_US.ISO8859-1/books/handbook: disks filesystems X-SVN-Group: doc-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire doc trees \(except for " user" , " projects" , and " translations" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Apr 2014 15:41:55 -0000 Author: dru Date: Wed Apr 9 15:41:54 2014 New Revision: 44506 URL: http://svnweb.freebsd.org/changeset/doc/44506 Log: Add section ID to ZFS Quotas so it can be referred to in Disk Quotas. Editorial review of Disk Quotas. Sponsored by: iXsystems Modified: head/en_US.ISO8859-1/books/handbook/disks/chapter.xml head/en_US.ISO8859-1/books/handbook/filesystems/chapter.xml Modified: head/en_US.ISO8859-1/books/handbook/disks/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/handbook/disks/chapter.xml Wed Apr 9 14:38:38 2014 (r44505) +++ head/en_US.ISO8859-1/books/handbook/disks/chapter.xml Wed Apr 9 15:41:54 2014 (r44506) @@ -2412,7 +2412,7 @@ Filesystem 1K-blocks Used Avail Capacity - File System Quotas + Disk Quotas accounting @@ -2420,32 +2420,35 @@ Filesystem 1K-blocks Used Avail Capacity disk quotas - Quotas are an optional feature of the operating system that + Disk quotas can be used to limit the amount of disk space or the number of files a user or members of a group may allocate on a per-file - system basis. This is used most often on timesharing systems - where it is desirable to limit the amount of resources any one - user or group of users may allocate. This prevents one user or + system basis. This prevents one user or group of users from consuming all of the available disk space. + + This section describes how to configure disk quotas for the + UFS file system. To configure quotas on the + ZFS file system, refer to - Configuring the System to Enable Disk Quotas + Enabling Disk Quotas - Before using disk quotas, quota support must be added to - the kernel by adding the following line to the kernel - configuration file: + To determine if the &os; kernel provides support for disk + quotas: - options QUOTA + &prompt.user; sysctl kern.features.ufs_quota +kern.features.ufs_quota: 1 - Before &os; 9.2, the GENERIC - kernel usually did not include this option. - sysctl kern.features.ufs_quota can be used - to test whether the current kernel supports quotas. If the - option is not present, a custom kernel must be compiled. - Refer to for more information - on kernel configuration. + In this example, the 1 indicates quota + support. If the value is instead 0, + add the following line to a custom kernel configuration file + and rebuild the kernel using the instructions in : + options QUOTA + Next, enable disk quotas in /etc/rc.conf: @@ -2455,8 +2458,7 @@ Filesystem 1K-blocks Used Avail Capacity disk quotas checking - For finer control over quota startup, an additional - configuration variable is available. Normally on bootup, the + Normally on bootup, the quota integrity of each file system is checked by &man.quotacheck.8;. This program insures that the data in the quota database properly reflects the data on the file system. @@ -2467,41 +2469,35 @@ Filesystem 1K-blocks Used Avail Capacity check_quotas="NO" Finally, edit /etc/fstab to enable - disk quotas on a per-file system basis. This is when user or - group quotas can be enabled on the file systems. - - To enable per-user quotas on a file system, add + disk quotas on a per-file system basis. To enable per-user quotas on a file system, add to the options field in the /etc/fstab entry for the file system to enable quotas on. For example: /dev/da1s2g /home ufs rw,userquota 1 2 - To enable group quotas, instead use - . To enable both user and group - quotas, change the entry as follows: + To enable group quotas, use + instead. To enable both user and group + quotas, separate the options with a comma: /dev/da1s2g /home ufs rw,userquota,groupquota 1 2 - By default, the quota files are stored in the root + By default, quota files are stored in the root directory of the file system as quota.user and quota.group. Refer to &man.fstab.5; for - more information. Even though an alternate location for the - quota files can be specified, this is not recommended because - the various quota utilities do not seem to handle this - properly. + more information. Specifying an alternate location for the + quota files is not recommended. - Once the configuration is complete, reboot the system - with the new kernel. /etc/rc will + Once the configuration is complete, reboot the system and + /etc/rc will automatically run the appropriate commands to create the initial quota files for all of the quotas enabled in - /etc/fstab. There is no need to - manually create any zero length quota files. + /etc/fstab. In the normal course of operations, there should be no need to manually run &man.quotacheck.8;, &man.quotaon.8;, or - &man.quotaoff.8;. However, one should read their manual pages + &man.quotaoff.8;. However, one should read these manual pages to be familiar with their operation. @@ -2513,8 +2509,8 @@ Filesystem 1K-blocks Used Avail Capacity limits - Once the system has been configured to enable quotas, - verify they really are enabled by running: + To + verify that quotas are enabled, run: &prompt.root; quota -v @@ -2523,13 +2519,13 @@ Filesystem 1K-blocks Used Avail Capacity enabled on. The system is now ready to be assigned quota limits with - &man.edquota.8;. + edquota. Several options are available to enforce limits on the amount of disk space a user or group may allocate, and how many files they may create. Allocations can be limited based on disk space (block quotas), number of files (inode quotas), - or a combination of both. Each limits is further broken down + or a combination of both. Each limit is further broken down into two categories: hard and soft limits. hard limit @@ -2549,31 +2545,27 @@ Filesystem 1K-blocks Used Avail Capacity are allowed. When the user drops back below the soft limit, the grace period is reset. - The following is an example output from &man.edquota.8;. - When &man.edquota.8; is invoked, the editor specified by + In the following example, the quota for the + test account is being edited. + When edquota is invoked, the editor specified by EDITOR is opened in order to edit the quota limits. The default editor is set to vi. - &prompt.root; edquota -u test - - Quotas for user test: + &prompt.root; edquota -u test +Quotas for user test: /usr: kbytes in use: 65, limits (soft = 50, hard = 75) inodes in use: 7, limits (soft = 50, hard = 60) /usr/var: kbytes in use: 0, limits (soft = 50, hard = 75) - inodes in use: 0, limits (soft = 50, hard = 60) + inodes in use: 0, limits (soft = 50, hard = 60) There are normally two lines for each file system that has quotas enabled. One line represents the block limits and the other represents the inode limits. Change the value to - modify the quota limit. For example, to raise this - user's block limit from a soft limit of 50 and a hard limit of - 75 to a soft limit of 500 and a hard limit of 600, - change: - - /usr: kbytes in use: 65, limits (soft = 50, hard = 75) - - to: + modify the quota limit. For example, to raise the + block limit on /usr + to a soft limit of 500 and a hard limit of 600, + change the values in that line as follows: /usr: kbytes in use: 65, limits (soft = 500, hard = 600) @@ -2581,13 +2573,13 @@ Filesystem 1K-blocks Used Avail Capacity editor. Sometimes it is desirable to set quota limits on a range - of UIDs. This can be done by passing to - &man.edquota.8;. First, assign the desired quota limit to a - user, then run - edquota -p protouser startuid-enduid. For - example, if test has - the desired quota limits, the following command will duplicate - those quota limits for UIDs 10,000 through 19,999: + of users. This can be done by first assigning the desired quota limit to a + user. Then, use to duplicate that quota + to a specified range of user IDs (UIDs). + The following command will duplicate + those quota limits for UIDs + 10,000 through + 19,999: &prompt.root; edquota -p test 10000-19999 @@ -2602,8 +2594,7 @@ Filesystem 1K-blocks Used Avail Capacity checking - Either &man.quota.1; or &man.repquota.8; can be used to - check quota limits and disk usage. To check individual user + To check individual user or group quotas and disk usage, use &man.quota.1;. A user may only examine their own quota and the quota of a group they are a member of. Only the superuser may view all user and @@ -2611,7 +2602,11 @@ Filesystem 1K-blocks Used Avail Capacity for file systems with quotas enabled, use &man.repquota.8;. - The following is sample output from + Normally, file systems that the user is not using any disk + space on will not show in the output of quota, even if + the user has a quota limit assigned for that file system. Use + to display those file systems. The + following is sample output from quota -v for a user that has quota limits on two file systems. @@ -2627,13 +2622,6 @@ Filesystem 1K-blocks Used Avail Capacity days of grace period left. The asterisk * indicates that the user is currently over the quota limit. - - Normally, file systems that the user is not using any disk - space on will not show in the output of &man.quota.1;, even if - the user has a quota limit assigned for that file system. Use - to display those file systems, such as - /usr/var in the above - example. @@ -2641,18 +2629,20 @@ Filesystem 1K-blocks Used Avail Capacity NFS - Quotas are enforced by the quota subsystem on the NFS + Quotas are enforced by the quota subsystem on the NFS server. The &man.rpc.rquotad.8; daemon makes quota - information available to &man.quota.1; on NFS clients, + information available to quota on NFS clients, allowing users on those machines to see their quota statistics. - Enable rpc.rquotad in - /etc/inetd.conf like so: + On the NFS server, enable + rpc.rquotad by removing the + # from this line in + /etc/inetd.conf: rquotad/1 dgram rpc/udp wait root /usr/libexec/rpc.rquotad rpc.rquotad - Now restart inetd: + Then, restart inetd: &prompt.root; service inetd restart Modified: head/en_US.ISO8859-1/books/handbook/filesystems/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/handbook/filesystems/chapter.xml Wed Apr 9 14:38:38 2014 (r44505) +++ head/en_US.ISO8859-1/books/handbook/filesystems/chapter.xml Wed Apr 9 15:41:54 2014 (r44506) @@ -545,7 +545,7 @@ errors: No known data errors ZFS options. - + ZFS Quotas ZFS supports different types of quotas: the refquota,