xref: /freebsd/share/man/man5/quota.user.5 (revision fa9896e082a1046ff4fbc75fcba4d18d1f2efc19)
138ecd262SNik Clayton.\" Copyright (c) 2001	Nik Clayton
238ecd262SNik Clayton.\"
338ecd262SNik Clayton.\" Redistribution and use in source and binary forms, with or without
438ecd262SNik Clayton.\" modification, are permitted provided that the following conditions
538ecd262SNik Clayton.\" are met:
638ecd262SNik Clayton.\" 1. Redistributions of source code must retain the above copyright
738ecd262SNik Clayton.\"    notice, this list of conditions and the following disclaimer.
838ecd262SNik Clayton.\" 2. Redistributions in binary form must reproduce the above copyright
938ecd262SNik Clayton.\"    notice, this list of conditions and the following disclaimer in the
1038ecd262SNik Clayton.\"    documentation and/or other materials provided with the distribution.
1138ecd262SNik Clayton.\"
1238ecd262SNik Clayton.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1338ecd262SNik Clayton.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1438ecd262SNik Clayton.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1538ecd262SNik Clayton.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
1638ecd262SNik Clayton.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1738ecd262SNik Clayton.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1838ecd262SNik Clayton.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1938ecd262SNik Clayton.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2038ecd262SNik Clayton.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2138ecd262SNik Clayton.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2238ecd262SNik Clayton.\" SUCH DAMAGE.
2338ecd262SNik Clayton.\"
24cf14303bSGiorgos Keramidas.Dd October 30, 2007
2538ecd262SNik Clayton.Dt QUOTA.USER 5
269863dddaSRuslan Ermilov.Os
2738ecd262SNik Clayton.Sh NAME
289863dddaSRuslan Ermilov.Nm quota.user , quota.group
298d5d039fSRuslan Ermilov.Nd per file system quota database
3038ecd262SNik Clayton.Sh DESCRIPTION
3138ecd262SNik ClaytonEach file system with active quotas should contain a
3238ecd262SNik Clayton.Pa quota.user
3338ecd262SNik Claytonand
3438ecd262SNik Clayton.Pa quota.group
359863dddaSRuslan Ermilovfile in the file system root.
369863dddaSRuslan ErmilovThese files are created by
3738ecd262SNik Clayton.Xr quotacheck 8 ,
3838ecd262SNik Claytonand should be edited with
3938ecd262SNik Clayton.Xr edquota 8 .
40f4bce9c1SMike PritchardIt is possible to specify a different location and file name with the
41f4bce9c1SMike Pritchard.Dq Li userquota
42f4bce9c1SMike Pritchardand
43f4bce9c1SMike Pritchard.Dq Li groupquota
44f4bce9c1SMike Pritchardoptions in the
45f4bce9c1SMike Pritchard.Xr fstab 5
46f4bce9c1SMike Pritchardfile.
47f4bce9c1SMike Pritchard.Pp
48f4bce9c1SMike PritchardThe data files contain the following information:
49f4bce9c1SMike Pritchard.Pp
50cf14303bSGiorgos Keramidas.Bl -bullet -offset indent -compact
51f4bce9c1SMike Pritchard.It
52f4bce9c1SMike PritchardCurrent block usage
53f4bce9c1SMike Pritchard.It
54f4bce9c1SMike PritchardCurrent number of files
55f4bce9c1SMike Pritchard.It
56f4bce9c1SMike PritchardSoft block limit
57f4bce9c1SMike Pritchard.It
58f4bce9c1SMike PritchardSoft file limit
59f4bce9c1SMike Pritchard.It
60f4bce9c1SMike PritchardHard block limit
61f4bce9c1SMike Pritchard.It
62f4bce9c1SMike PritchardHard file limit
63f4bce9c1SMike Pritchard.It
64f4bce9c1SMike PritchardBlock grace time remaining if over the soft limit
65f4bce9c1SMike Pritchard.It
66f4bce9c1SMike PritchardFile grace time remaining if over the soft limit
67f4bce9c1SMike Pritchard.El
68f4bce9c1SMike Pritchard.Pp
69f4bce9c1SMike PritchardSee
70f4bce9c1SMike Pritchard.Xr edquota 8
71f4bce9c1SMike Pritchardfor an explanation on the various limits and grace periods.
72f4bce9c1SMike Pritchard.Pp
73f4bce9c1SMike PritchardDuring normal quota operations the
74f4bce9c1SMike Pritchard.Xr quotactl 2
75f4bce9c1SMike Pritchardinterface is used to query or set quota information and the kernel
76f4bce9c1SMike Pritchardwill maintain the data files as needed.
77f4bce9c1SMike PritchardIf quotas are disabled on
78f4bce9c1SMike Pritcharda file system, but marked as having quotas enabled in
79f4bce9c1SMike Pritchard.Xr fstab 5 ,
80f4bce9c1SMike Pritchardthen the quota data files will be used directly.
81f4bce9c1SMike Pritchard.Pp
82f4bce9c1SMike PritchardThe data files are stored as an array of
83f4bce9c1SMike Pritchard.Dq Li struct dqblk
84f4bce9c1SMike Pritchardstructures, as defined in
85f4bce9c1SMike Pritchard.In ufs/ufs/quota.h ,
86f4bce9c1SMike Pritchardand indexed by UID or GID.
87f4bce9c1SMike PritchardThe data files will be written as a sparse file if possible.
88f4bce9c1SMike PritchardData is only maintained for ids that have either non-zero usage or
89f4bce9c1SMike Pritchardnon-zero quota limits.
90f4bce9c1SMike PritchardIf an attempt is made to access data for an id that would exist past the
91f4bce9c1SMike Pritchardend of the current data file, a quota structure with all values set
92f4bce9c1SMike Pritchardto zero will be created, and the data file extended as needed.
93f4bce9c1SMike PritchardThe
94f4bce9c1SMike Pritchard.Xr quotacheck 8
95f4bce9c1SMike Pritchardutility will truncate the data files to the minimum size needed
96f4bce9c1SMike Pritchardto store the highest id with either non-zero file usage or
97f4bce9c1SMike Pritchardnon-zero quota limits.
98f4bce9c1SMike Pritchard.Pp
99*eb49a6d3SEdward Tomasz NapieralaThe data record for id 0 has special meaning.
100*eb49a6d3SEdward Tomasz NapieralaIf the
101f4bce9c1SMike Pritchard.Dq Dv dqb_btime
102f4bce9c1SMike Pritchardor
103f4bce9c1SMike Pritchard.Dq Dv dbq_itime
104f4bce9c1SMike Pritchardfields are non-zero, they are used to indicate the grace period on
105f4bce9c1SMike Pritchardthat file system for users who have exceeded their soft limit.
106f4bce9c1SMike PritchardThese times can be set by
107f4bce9c1SMike Pritchard.Xr edquota 8
108f4bce9c1SMike Pritchardwith the
109f4bce9c1SMike Pritchard.Fl t
110f4bce9c1SMike Pritchardflag.
111f4bce9c1SMike PritchardIf no explicit grace period has been set with
112f4bce9c1SMike Pritchard.Xr edquota 8 ,
113f4bce9c1SMike Pritchardthen the default value of 7 days will be used.
114f4bce9c1SMike PritchardThe default values are defined by
115f4bce9c1SMike Pritchard.Dv MAX_DQ_TIME
116f4bce9c1SMike Pritchardand
117f4bce9c1SMike Pritchard.Dv MAX_IQ_TIME
118f4bce9c1SMike Pritchardin
119f4bce9c1SMike Pritchard.In ufs/ufs/quota.h .
12038ecd262SNik Clayton.Sh SEE ALSO
12138ecd262SNik Clayton.Xr quota 1 ,
122f4bce9c1SMike Pritchard.Xr quotactl 2 ,
12338ecd262SNik Clayton.Xr fstab 5 ,
12438ecd262SNik Clayton.Xr edquota 8 ,
12538ecd262SNik Clayton.Xr quotacheck 8 ,
12638ecd262SNik Clayton.Xr quotaoff 8 ,
1279863dddaSRuslan Ermilov.Xr quotaon 8 ,
12838ecd262SNik Clayton.Xr repquota 8
129