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