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