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