1.\" Copyright (c) 2001 Nik Clayton 2.\" 3.\" Redistribution and use in source and binary forms, with or without 4.\" modification, are permitted provided that the following conditions 5.\" are met: 6.\" 1. Redistributions of source code must retain the above copyright 7.\" notice, this list of conditions and the following disclaimer. 8.\" 2. Redistributions in binary form must reproduce the above copyright 9.\" notice, this list of conditions and the following disclaimer in the 10.\" documentation and/or other materials provided with the distribution. 11.\" 12.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 13.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 14.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 15.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 16.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 17.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 18.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 19.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 20.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 21.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 22.\" SUCH DAMAGE. 23.\" 24.Dd October 30, 2007 25.Dt QUOTA.USER 5 26.Os 27.Sh NAME 28.Nm quota.user , quota.group 29.Nd per file system quota database 30.Sh DESCRIPTION 31Each file system with active quotas should contain a 32.Pa quota.user 33and 34.Pa quota.group 35file in the file system root. 36These files are created by 37.Xr quotacheck 8 , 38and should be edited with 39.Xr edquota 8 . 40It is possible to specify a different location and file name with the 41.Dq Li userquota 42and 43.Dq Li groupquota 44options in the 45.Xr fstab 5 46file. 47.Pp 48The data files contain the following information: 49.Pp 50.Bl -bullet -offset indent -compact 51.It 52Current block usage 53.It 54Current number of files 55.It 56Soft block limit 57.It 58Soft file limit 59.It 60Hard block limit 61.It 62Hard file limit 63.It 64Block grace time remaining if over the soft limit 65.It 66File grace time remaining if over the soft limit 67.El 68.Pp 69See 70.Xr edquota 8 71for an explanation on the various limits and grace periods. 72.Pp 73During normal quota operations the 74.Xr quotactl 2 75interface is used to query or set quota information and the kernel 76will maintain the data files as needed. 77If quotas are disabled on 78a file system, but marked as having quotas enabled in 79.Xr fstab 5 , 80then the quota data files will be used directly. 81.Pp 82The data files are stored as an array of 83.Dq Li struct dqblk 84structures, as defined in 85.In ufs/ufs/quota.h , 86and indexed by UID or GID. 87The data files will be written as a sparse file if possible. 88Data is only maintained for ids that have either non-zero usage or 89non-zero quota limits. 90If an attempt is made to access data for an id that would exist past the 91end of the current data file, a quota structure with all values set 92to zero will be created, and the data file extended as needed. 93The 94.Xr quotacheck 8 95utility will truncate the data files to the minimum size needed 96to store the highest id with either non-zero file usage or 97non-zero quota limits. 98.Pp 99The data record for id 0 has special meaning. 100If the 101.Dq Dv dqb_btime 102or 103.Dq Dv dbq_itime 104fields are non-zero, they are used to indicate the grace period on 105that file system for users who have exceeded their soft limit. 106These times can be set by 107.Xr edquota 8 108with the 109.Fl t 110flag. 111If no explicit grace period has been set with 112.Xr edquota 8 , 113then the default value of 7 days will be used. 114The default values are defined by 115.Dv MAX_DQ_TIME 116and 117.Dv MAX_IQ_TIME 118in 119.In ufs/ufs/quota.h . 120.Sh SEE ALSO 121.Xr quota 1 , 122.Xr quotactl 2 , 123.Xr fstab 5 , 124.Xr edquota 8 , 125.Xr quotacheck 8 , 126.Xr quotaoff 8 , 127.Xr quotaon 8 , 128.Xr repquota 8 129