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