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