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