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.\" $FreeBSD$ 25.\" 26.Dd October 30, 2007 27.Dt QUOTA.USER 5 28.Os 29.Sh NAME 30.Nm quota.user , quota.group 31.Nd per file system quota database 32.Sh DESCRIPTION 33Each file system with active quotas should contain a 34.Pa quota.user 35and 36.Pa quota.group 37file in the file system root. 38These files are created by 39.Xr quotacheck 8 , 40and should be edited with 41.Xr edquota 8 . 42It is possible to specify a different location and file name with the 43.Dq Li userquota 44and 45.Dq Li groupquota 46options in the 47.Xr fstab 5 48file. 49.Pp 50The data files contain the following information: 51.Pp 52.Bl -bullet -offset indent -compact 53.It 54Current block usage 55.It 56Current number of files 57.It 58Soft block limit 59.It 60Soft file limit 61.It 62Hard block limit 63.It 64Hard file limit 65.It 66Block grace time remaining if over the soft limit 67.It 68File grace time remaining if over the soft limit 69.El 70.Pp 71See 72.Xr edquota 8 73for an explanation on the various limits and grace periods. 74.Pp 75During normal quota operations the 76.Xr quotactl 2 77interface is used to query or set quota information and the kernel 78will maintain the data files as needed. 79If quotas are disabled on 80a file system, but marked as having quotas enabled in 81.Xr fstab 5 , 82then the quota data files will be used directly. 83.Pp 84The data files are stored as an array of 85.Dq Li struct dqblk 86structures, as defined in 87.In ufs/ufs/quota.h , 88and indexed by UID or GID. 89The data files will be written as a sparse file if possible. 90Data is only maintained for ids that have either non-zero usage or 91non-zero quota limits. 92If an attempt is made to access data for an id that would exist past the 93end of the current data file, a quota structure with all values set 94to zero will be created, and the data file extended as needed. 95The 96.Xr quotacheck 8 97utility will truncate the data files to the minimum size needed 98to store the highest id with either non-zero file usage or 99non-zero quota limits. 100.Pp 101The data record for id 0 has special meaning. 102If the 103.Dq Dv dqb_btime 104or 105.Dq Dv dbq_itime 106fields are non-zero, they are used to indicate the grace period on 107that file system for users who have exceeded their soft limit. 108These times can be set by 109.Xr edquota 8 110with the 111.Fl t 112flag. 113If no explicit grace period has been set with 114.Xr edquota 8 , 115then the default value of 7 days will be used. 116The default values are defined by 117.Dv MAX_DQ_TIME 118and 119.Dv MAX_IQ_TIME 120in 121.In ufs/ufs/quota.h . 122.Sh SEE ALSO 123.Xr quota 1 , 124.Xr quotactl 2 , 125.Xr fstab 5 , 126.Xr edquota 8 , 127.Xr quotacheck 8 , 128.Xr quotaoff 8 , 129.Xr quotaon 8 , 130.Xr repquota 8 131