Whamcloud - gitweb
LU-15277 utils: lfs quota/setquota improvements
[fs/lustre-release.git] / lustre / doc / lfs-setquota.1
1 .TH LFS-SETQUOTA 1 2022-02-26 "Lustre" "Lustre Utilities"
2 .SH NAME
3 lfs-setquota \- set quota limits or grace time for users, groups or projects.
4 .SH SYNOPSIS
5 .BR "lfs setquota " { -u | --user | -g | --group | -p | --projid "} " \fIID
6 [\fB--pool \fIPOOLNAME\fR]
7        [\fB-b|\fB--block-softlimit\fR \fIBLOCK_SOFTLIMIT\fR[\fBKMGTPE\fR]]
8        [\fB-B|\fB--block-hardlimit\fR \fIBLOCK_HARDLIMIT\fR[\fBKMGTPE\fR]]
9        [\fB-i|\fB--inode-softlimit\fR \fIINODE_SOFTLIMIT\fR[\fBKMGTPE\fR]]
10        [\fB-I|\fB--inode-hardlimit\fR \fIINODE_HARDLIMIT\fR[\fBKMGTPE\fR]] \fIFILESYSTEM
11 .TP
12 .BR "lfs setquota " { -u | --user | -g | --group | -p | --projid "} " \fIID
13  {\fB--default\fR|\fB-D\fR|\fB--delete\fR} \fIFILESYSTEM
14 .TP
15 .BR "lfs setquota " { -t | --times "} {" -h | -u | -g | -p "} [" "--pool " \fIPOOLNAME ]
16  [\fB-b\fR|\fB--block-grace\fR \fIBLOCK_GRACE_TIME\fR]
17  [\fB-i\fR|\fB--inode-grace\fR \fIINODE_GRACE_TIME\fR] \fIFILESYSTEM
18 .TP
19 .BR "lfs setquota " { -U | --default-usr | -G | --default-grp | -P | --default-prj }
20        [\fB-b\fR|\fB--block-softlimit\fR \fIBLOCK_SOFTLIMIT\fR[\fBKMGTPE\fR]]
21        [\fB-B\fR|\fB--block-hardlimit\fR \fIBLOCK_HARDLIMIT\fR[\fBKMGTPE\fR]]
22        [\fB-i\fR|\fB--inode-softlimit\fR \fIINODE_SOFTLIMIT\fR[\fBKMGTPE\fR]]
23        [\fB-I\fR|\fB--inode-hardlimit\fR \fIINODE_HARDLIMIT\fR[\fBKMGTPE\fR]] \fIFILESYSTEM
24 .TP
25 .BR "lfs setquota " { -u | --user | -g | --group | -p | --projid "} " \fIUID\fR|\fIGID\fR|\fIPROJID\fR
26        [\fB--delete\fR] <\fIfilesystem\fR>
27 .BR "lfs setquota " { -u | --user | -g | --group | -p | --projid "} " \fIUID\fR|\fIGID\fR|\fIPROJID\fR
28        [\fB-r\fR] <\fIfilesystem\fR>
29 .TP
30 .SH DESCRIPTION
31 .TP
32 .BR "lfs setquota " { -u | -g | -p }
33 Command sets the filesystem quotas for users, groups, or projects respectively.
34 Block limits unit is kilobyte (1024) by default, and block limits are always
35 kilobyte-granular (even if specified in bytes), block limits can be specified
36 with a
37 .BR K ", " M ", " G ", " T ", " P ", or " E
38 suffix to specify units of 2^10, 2^20, 2^30, 2^40, 2^50 and 2^60 bytes
39 respectively.
40 .TP
41 .BR -b | --block-softlimit " " \fIBLOCK_SOFTLIMIT
42 Specify block softlimit, zero means unlimited.
43 .TP
44 .BR -B | --block-hardlimit " " \fIBLOCK_HARDLIMIT
45 Specify block hardlimit, zero means unlimited. The block hardlimit should be
46 greater than the block softlimit if it is being specified.
47 .TP
48 .BR --delete
49 Delete the unused user, group, or project \fIID\fR limit.
50 .TP
51 .BR -D|--default
52 Set user/group/project to use the default quota limits.
53 .TP
54 .BR -g | --group " " \fIGROUPNAME | \fIGID
55 Set group quota for name \fIGROUPNAME\fR or numeric \fIGID\fR.
56 .TP
57 .BR -h | --help
58 Print usage message.
59 .TP
60 .BR -i | --inode-softlimit " " \fIINODE_SOFTLIMIT
61 Specify inode softlimit, zero means unlimited.
62 .TP
63 .BR -I | --inode-hardlimit " " \fIINODE_HARDLIMIT
64 Specify inode hardlimit, zero means unlimited. The inode hardlimit should be
65 greater than inode softlimit when it's being specified.
66 .TP
67 .BR -p | --project " " \fIPROJID
68 Set project quota for numeric \fIPROJID\fR.
69 .TP
70 .BR --pool " " \fIPOOL_NAME
71 Set quota per OST pool \fIPOOL_NAME\fR.
72 .TP
73 .BR -r
74 Reset the internal quota data of the user|group|project quota. It can be used
75 to fix the quota containing corrupted internal data (such as, the quota grant).
76 .TP
77 .BR -u | --user " " \fIUSERNAME | \fIUID
78 Set user quota for \fIUNAME\fR or numeric \fIUID\fR.
79 .PP
80 .TP
81 .BR "lfs setquota " { -t | --times "} {" -h | -u | -g | -p "} " \fIGRACE_TIME
82 Command sets the filesystem quota grace time for users, groups, or projects.
83 The
84 .I GRACE_TIME
85 is a global value that can take two forms: an amount of time or the word
86 .BR notify .
87 Traditionally,
88 .I GRACE_TIME indicates the amount of time in seconds
89 that the soft quota limit can be exceeded before users are prevented from
90 creating new files or consuming more space.  This is intended to allow users
91 to exceed the quota limit for a short time to complete their work without
92 having to grant each user a larger hard quota limit.
93 .PP
94 The alternative value of
95 .B notify
96 informs users that are exceeding their soft quota limit (an '\fB*\fR' in the
97 quota output) that they
98 are nearing their hard quota limit, but does not block new writes until the hard
99 quota limit is reached.  The soft quota state is reset once the user, group,
100 or project reduces their space usage or file count below the soft quota limit.
101 Grace time is specified in "XXwXXdXXhXXmXXs" format or as an integer seconds
102 value.  The maximum is 2^48 - 1 seconds.
103 .TP
104 .BR -t | --times
105 Set quota grace times.
106 .TP
107 .BR -u | --user
108 Set grace time for user.
109 .TP
110 .BR -g | --group
111 Set grace time for group.
112 .TP
113 .BR -p | --projid
114 Set grace time for project.
115 .TP
116 .BR -b | --block-grace " {" notify | \fIBLOCK_GRACE_TIME }
117 Specify grace time for block quota in seconds.
118 .TP
119 .BR -i | --inode-grace " {" notify | \fIBLOCK_GRACE_TIME }
120 Specify grace time for inode quota in seconds.
121 .TP
122 .BR --pool " " \fIPOOL_NAME
123 Set grace time for user, group or project per OST pool \fIPOOL_NAME\fR.
124 .PP
125 .TP
126 .BR "lfs setquota " { -U | --default-usr | -G | --default-grp | -P | --default-prj }
127 Command sets the filesystem default limits for user, group, project quotas,
128 if set, users/groups/projects without specific quota setting will use
129 default quota limits automatically.
130 .TP
131 .BR -U | --default-usr
132 Set default user quota limit.
133 .TP
134 .BR -G | --default-grp
135 Set default group quota limit.
136 .T
137 .BR -P | --default-prj
138 Set default project quota limit.
139 .TP
140 .PP
141 .SH EXAMPLES
142 .TP
143 .B $ lfs setquota -u bob --block-softlimit 2G --block-hardlimit 1G /mnt/lustre
144 Set quotas of user `bob': 1GB block hardlimit and 2 GB block softlimit
145 .TP
146 .B $ lfs setquota -u bob --default /mnt/lustre
147 Set quotas of user `bob' to use default quota setting
148 .TP
149 .B $ lfs setquota -U --block-softlimit 1G --block-hardlimit 2G /mnt/lustre
150 Set system default user quota: 1 GB block softlimit and 2 GB block hardlimit
151 .TP
152 .B $ lfs setquota -t -u --block-grace 36000 --inode-grace 1w4d /mnt/lustre
153 Set grace times for user quotas: 36000 seconds for block quotas, 1 week and 4
154 days for inode quotas
155 .TP
156 .B $ lfs setquota -u ivan --pool flash_pool -B 1G /mnt/lustre
157 Set hard block limit 1G for user 'ivan' per pool 'flash_pool'
158 .TP
159 .B $ lfs setquota -t -u --block-grace 10000 --pool flash_pool /mnt/lustre
160 Set grace time 10000 seconds for block quotas per pool 'flash_pool'
161 .TP
162 .BR "lfs setquota " { -u | -g | -p "} " \fIUID\fR|\fIGID\fR|\fIPROJID\fR " " [\fB--delete\fR] " " <\fIfilesystem\fR>
163 Command deletes the unused user, group, or project \fIID\fR from quota settings.
164 .TP
165 .PP
166 .SH EXAMPLES
167 .TP
168 .B $ lfs setquota -u bob --delete /mnt/lustre
169 Delete unused user 'bob'.
170 .TP
171 .B $ lfs setquota -u bob -r /mnt/lustre
172 Reset the user 'bob'.
173 .SH SEE ALSO
174 .BR lfs (1),
175 .BR lfs-quota(1)