Whamcloud - gitweb
LU-17744 ldiskfs: mballoc stats fixes
[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 .B lfs setquota {\fB-u|--user|-g|--group|-p|--projid\fR} <\fIuname|uid|gname|gid|projid\fR>
6        [\fB--block-softlimit|-b\fR <\fIblock-softlimit\fR>[kMGTPE]]
7        [\fB--block-hardlimit|-B\fR <\fIblock-hardlimit\fR>[kMGTPE]]
8        [\fB--inode-softlimit|-i\fR <\fIinode-softlimit\fR>[kMGTPE]]
9        [\fB--inode-hardlimit|-I\fR <\fIinode-hardlimit\fR>[kMGTPE]] <\fIfilesystem\fR>
10 .TP
11 .B lfs setquota \fB-t\fR {\fB-u|-g|-p\fR}
12        [\fB--block-grace|-b\fR <\fIblock-grace\fR>]
13        [\fB--inode-grace|-i\fR <\fIinode-grace\fR>] <\fIfilesystem\fR>
14 .TP
15 .B lfs setquota {\fB-u|--user|-g|--group|-p|--projid\fR} <\fIuname|uid|gname|gid|projid\fR>
16        [\fB--default|-d\fR] <\fIfilesystem\fR>
17 .TP
18 .B lfs setquota {\fB-U|--default-usr|-G|--default-grp|-P|--default-prj\fR}
19        [\fB--block-softlimit|-b\fR <\fIblock-softlimit\fR>[kMGTPE]]
20        [\fB--block-hardlimit|-B\fR <\fIblock-hardlimit\fR>[kMGTPE]]
21        [\fB--inode-softlimit|-i\fR <\fIinode-softlimit\fR>[kMGTPE]]
22        [\fB--inode-hardlimit|-I\fR <\fIinode-hardlimit\fR>[kMGTPE]] <\fIfilesystem\fR>
23 .TP
24 .SH DESCRIPTION
25 .PP
26 .BR "lfs setquota " {\fB-u|-g|-p\fR}
27 .TP
28 Command sets the filesystem quotas for users, groups or projects respectively. \
29 Block limits unit is kilobyte (1024) by default and block limits are always \
30 kilobyte-grained (even if specified in bytes), block limits can be specified \
31 with a \
32 .BR k "," M "," G "," T "," P ", or " E \
33 suffixes which specify units of 2^10, 2^20, 2^30, 2^40, 2^50 and 2^60 \
34 accordingly.
35 .TP
36 .B -u|--user <\fIuname|uid\fR>
37 Set user quota for \fIuname\fR or \fIuid\fR.
38 .TP
39 .B -g|--group <\fIgname|gid\fR>
40 Set group quota for name \fIgname\fR or \fIgid\fR.
41 .TP
42 .B -p|--project <\fIprojid\fR>
43 Set project quota for \fIprojid\fR.
44 .TP
45 .B -d|--default
46 Set user/group/project to use the default quota limits.
47 .TP
48 .B -b|--block-softlimit <\fIblock-softlimit\fR>
49 Specify block softlimit, zero means unlimited.
50 .TP
51 .B -B|--block-hardlimit <\fIblock-hardlimit\fR>
52 Specify block hardlimit, zero means unlimited. The block hardlimit should be \
53 greater than block softlimit when it's being specified.
54 .TP
55 .B -i|--inode-softlimit <\fIinode-softlimit\fR>
56 Specify inode softlimit, zero means unlimited.
57 .TP
58 .B -I|--inode-hardlimit <\fIinode-hardlimit\fR>
59 Specify inode hardlimit, zero means unlimited. The inode hardlimit should be \
60 greater than inode softlimit when it's being specified.
61 .PP
62 .BR "lfs setquota -t "
63 .TP
64 Command sets the filesystem quota grace time for users, groups, or projects. \
65 This is a global value that can take two forms: an amount of time or the word \
66 \'\fBnotify\fR'.  Traditionally, this indicates the amount of time in seconds \
67 that the soft quota limit can be exceeded before users are prevented from \
68 creating new files or consuming more space.  This is intended to allow users \
69 to exceed the quota limit for a short time to complete their work without \
70 having to grant each user a larger hard quota limit. The alternative value of \
71 \'\fBnotify\fR' informs users with an '\fB*\fR' in the quota output that they \
72 are nearing their hard quota limit but does not block new writes until the hard \
73 quota limit is reached.  The soft quota state is reset once the user, group, \
74 or project reduces their space usage or file count below the soft quota limit. \
75 Grace time is specified in "XXwXXdXXhXXmXXs" format or as an integer seconds \
76 value.  The maximum is 2^48 - 1 seconds.
77 .TP
78 .B -t
79 Set quota grace times.
80 .TP
81 .B -u
82 Set grace time for user.
83 .TP
84 .B -g
85 Set grace time for group.
86 .TP
87 .B -p
88 Set grace time for project.
89 .TP
90 .B -b|--block-grace 'notify'|<\fIblock-grace\fR>
91 Specify grace time for block quota.
92 .TP
93 .B -i|--inode-grace 'notify'|<\fIinode-grace\fR>
94 Specify grace time for inode quota.
95 .PP
96 .BR "lfs setquota " {\fB-U|--default-usr|-G|--default-grp|-P|--default-prj\fR}
97 .TP
98 Command sets the filesystem default limits for user,group,project quotas, \
99 if set, users/groups/projects without specific quota setting will use \
100 default quota limits automatically.
101 .TP
102 .B -U|--default-usr
103 Set default user quota limit.
104 .TP
105 .B -G|--default-grp
106 Set default group quota limit.
107 .TP
108 .B -P|--default-prj
109 Set default project quota limit.
110 .TP
111 .PP
112 .SH EXAMPLES
113 .TP
114 .B $ lfs setquota -u bob --block-softlimit 2G --block-hardlimit 1G /mnt/lustre
115 Set quotas of user `bob': 1GB block hardlimit and 2 GB block softlimit
116 .TP
117 .B $ lfs setquota -u bob -d /mnt/lustre
118 Set quotas of user `bob' to use default quota setting
119 .TP
120 .B $ lfs setquota -U --block-softlimit 1G --block-hardlimit 2G /mnt/lustre
121 Set system default user quota: 1 GB block softlimit and 2 GB block hardlimit
122 .TP
123 .B $ lfs setquota -t -u --block-grace 1000 --inode-grace 1w4d /mnt/lustre
124 Set grace times for user quotas: 1000 seconds for block quotas, 1 week and 4 \
125 days for inode quotas
126 .SH SEE ALSO
127 .BR lfs (1),
128 .BR lfs-quota(1)