samquota - Reports, sets, or resets quota information
samquota
[-a | -A
adminsetID]
[-e
]
[-g | -G
groupID]
[-h
]
[-k
]
[-u | -U
userID]
[file]
samquota
[-b
count:
type[:scope]]
[-f
count:
type[:scope]]
[-h
]
[-i
]
[-k
]
[-p
]
[-t
interval:scope]
[-w
]
[-x
action:scope]
[-A
adminsetID]
[-G
groupID]
[-O
]
[-U
userID]
[file]
SUNWsamfs
SUNWqfs
The samquota
command displays quota usage statistics and
can be used to edit quotas, grace periods, and usages for users, groups,
and admin sets.
This command supports file counts and online block counts.
Note that some options are mutually exclusive.
Only a superuser can use this command to change
quotas. End users can use a subset of this command's options to
display quota usage and
to display limit information. For more information on the end-user version
of this command, see the squota
(1) man page.
By default, samquota
(1m)
writes the user's applicable GID∕UID quotas and usages on
all mounted StorageTek QFS and Oracle HSM file systems
to stdout
.
An admin set quota applies to all files and directories on a file system
that have their admin set attribute set to the given value.
The main use of admin set quotas is to effect
directory or project quotas.
They can be used to effect directory quotas by setting a directory's
admin set ID to a unique value and using samquota
(1m) to set
quotas for that value.
All subdirectories and files subsequently created beneath the directory
then inherit the value, and the admin set's quota limits apply to them.
Conversely,
a project quota can be effected by choosing a set of project directories,
setting their admin set ID values to a single unique value,
and using samquota
(1m) to set quotas for that ID.
Note in either case that newly created files inherit an admin set ID
from the directory in which they are created;
the admin set IDs do not change if the file is moved to
a new directory with a different admin set ID.
You can use the samchaid
(1m) command to set admin set IDs.
The samchaid
(1m) command allows system administrators to assign
files and directories to individual admin sets.
Admin set IDs are not tied to any set of permissions
associated with the user. That is, a user can have a set of
directories and files on one StorageTek QFS or Oracle HSM
file system with a particular
admin set ID, and the same user can have another set of directories and files
on another file system (or even the same one) with a completely
different admin set ID.
A writable file is therefore used as a surrogate to determine that a user
has permission to view an admin set's quota values.
This command accepts the following options:
-a
Specifies admin set quota statistics for file.
This option is not allowed in combination with the -A
option or
any of the setting options.
-b
count:
type[:
scope]Sets soft, hard, or in-use block allocation limits.
This setting can pertain to either online files or to the total
number of files.
Note that a colon (:
) is used to separate each component.
-k
option is also specified, the count
specification is interpreted as a number of 1024-byte blocks.
.IP
By default, the integer specified for count is interpreted
as it is written. You can append a unit multiplier to the count
value, however, to force the system to interpret count as a larger
number. These unit multipliers are as follows:
Multiplier
Interpretation
k
or K
Specifies 1000. For example, specifying 2k
is interpreted as
2000.
m
or M
Specifies 1,000,000. For example, specifying 80M
is interpreted
as 80,000,000.
g
or G
Specifies 1,000,000,000.
t
or T
Specifies 10*12.
p
or P
Specifies 10*15.
.IP type specifies the type of limit. Possible type specifications are as follows:Interpretation
s
or soft
Specifies that the samquota
command is being used to reset
a soft limit.
h
or hard
Specifies that the samquota
command is being used to reset
a hard limit.
u
or inuse
Specifies that the samquota
command is being used to reset
the in-use counter.
Typically, this is set only by the samfsck
(1m) command and
other system administration tools.
Interpretation
o
or online
Specifies that the samquota
command is being used to reset
an online limit. For StorageTek QFS and Oracle HSM file systems,
files that are released (offline)
are not counted in the online block usage.
t
or total
Specifies that the samquota
command is being used to reset
a total limit. For StorageTek QFS and Oracle HSM file systems,
both online and offline files are
used to compute the total block usage.
george
's files in file system qfs22
:
.IP
samquota -b 120k:s -U george ∕qfs22
-e
Writes the quota information from this command line in an executable format. You can use this option if you want the system to put the information from this command into a file for editing.
.IPserver# samquota -eG sam ∕qfs1 # Type ID # Limits # soft hard # Files # Blocks # Grace Periods # samquota -G 101 \\ -f 1000:s -f 1200:h \\ -b 100000:s -b 120000:h \\ -t 1d ∕qfs1
-f
count:
type[:
scope]Sets soft, hard, or in-use file limits for a file system.
Note that a colon (:
) is used to separate
each component.
-k
option is also specified, any count
specification referring to blocks is interpreted in 1024-byte blocks
instead of 512-byte blocks (by multiplying by 2).
.IP
By default, the integer specified for count is interpreted
as it is written. You can append a unit multiplier to the count
value, however, to force the system to interpret count as a larger
number. These unit multipliers are as follows:
Multiplier
Interpretation
k
or K
Specifies 1000. For example, specifying 2k
is interpreted as
2000.
m
or M
Specifies 1,000,000. For example, specifying 80M
is interpreted
as 80,000,000.
g
or G
Specifies 1,000,000,000.
t
or T
Specifies 10*12.
p
or P
Specifies 10*15.
.IP type specifies the type of limit. Possible type specifications are as follows:Interpretation
s
or soft
Specifies that the samquota
command is being used to reset
a soft limit.
h
or hard
Specifies that the samquota
command is being used to reset
a hard limit,
u
or inuse
Specifies that the samquota
command is being used to reset
the in-use counter.
Typically, this is set only by the samfsck
(1m) command and
other system administration tools.
Interpretation
o
or online
Specifies that the samquota
command is being used to reset
an online limit. There is no difference between online and total file usage.
t
or total
Specifies that the samquota
command is being used to reset
a total limit. There is no difference between online and total file usage.
martha
in file system qfs222
:
.IP
samquota -U martha -b 120:s ∕qfs222
-g
Returns group quota statistics for file.
This option is not allowed in combination with the -G
option or
any of the setting options.
-h
Provides a brief usage summary.
-i
Zeros all limits. This option reinitializes the quota specifications by clearing all fields in the quota records except the in-use fields. It then resets the fields to conform to the new specifications on the command line.
-k
Specifies that the command interpret or display all storage units (block quantities) in units of 1024-byte blocks. When specified, all information on the command line is assumed to be in units of 1024 bytes, and all information is returned in multiples of 1024 bytes.
.IP Example 1. The following command line specifies a hard quota limit of 256,000 1024-byte blocks (or, equivalently, 512,000 512-byte blocks) for groupadm
, in file system qfs4
:
.IP
samquota -G adm -k -b 256k:hard ∕qfs4
.IP
Example 2. The following command line sets a soft limit of
120 1024-byte blocks (or, equivalently, 240 512-byte blocks) to be
occupied by the files for user fred
in file system qfs2
:
.IP
samquota -U fred -k -b 120:soft ∕qfs2
-p
Writes updated quota statistics to stdout
if you are
changing preestablished quota values or limits.
-t
interval:scopeSpecifies the time to be used for the soft limit grace periods.
.IP interval specifies the interval to use for the grace periods. By default, the integer specified for interval is interpreted in units of seconds. You can append a unit multiplier to the interval value, however, to force the system to interpret interval as a larger unit. These unit multipliers are as follows:Multiplier
Interpretation
w
Specifies weeks. For example, specifying 10w
is interpreted as
ten weeks.
d
Specifies days.
h
Specifies hours.
m
Specifies minutes.
s
(default)Specifies seconds.
.IP The interval must be an integer number in the following range: 0 ≤ interval ≤ (2*31) - 1. .IP Note that (2*31) - 1 = 2,147,483,647, which means that the maximum specification, in seconds, would be 2147483647, which is about 68 years. .IP Example. The following command line specifies an interval of 7 days and 12 hours for the online and total grace periods of useradele
in the myqfs
file system:
.IP
samquota -U adele -t 7d12h ∕myqfs
-u
Returns user quota statistics for the owner of file.
This option is not allowed in combination with the -U
option or
any of the setting options.
-w
Suppresses messages. By default, samquota
generates
warning messages and
requests confirmation before changing any quota values maintained
by the system. When this option is specified on the command line
in conjunction with the -b
, -f
, or -x
options, it suppresses both the warning messages
and the confirmation requests.
-x
action:scopeAdjusts the soft limit grace period timers. After a user reaches a soft limit, a certain amount of time can elapse before a user is not allowed to create any more files in the file system. This option allows you to override the existing quota mechanism and temporarily respecify the consequences of having reached the soft limit.
.IP action specifies what to do with the grace period timer. Note that the soft limit grace period is set with the-t
option.
Possible action specifications are as follows:
Interpretation
clear
Specifies that the current grace period be ended and the grace period counter be reset to zero. The grace period counter is restarted the next time a file or block is allocated.
reset
Specifies that the current grace period be ended and that the grace period counter be restarted immediately.
expire
Specifies that the current grace period be ended and that no new files or blocks be allocated until the user, group, or admin set frees blocks and∕or files and is again under the soft limit.
interval specifies the interval to use for the grace period. Specifying an interval sets the grace period to expire at a new time. The interval must be an integer number in the following range:
0 ≤ interval ≤ (2*31) - 1. .IP Note that (2*31) - 1 = 2,147,483,647, which means that the maximum specification, in seconds, would be 2147483647, which is about 68 years. .IP The timer is set to the given value, and starts counting immediately. If the quota goes under the soft limit, it will be reset to zero at that time. .IP By default, the integer specified for interval is interpreted in units of seconds. You can append a unit multiplier to the interval value, however, to force the system to interpret interval as a larger unit, and can concatenate these units. These unit multipliers are as follows:Multiplier
Interpretation
w
Specifies weeks (times 7*24*60*60).
For example, specifying 10w
is interpreted as ten weeks
or 10*7*24*60*60 seconds.
d
Specifies days (times 24*60*60).
h
Specifies hours (times 60*60).
m
Specifies minutes (times 60).
s
(default)Specifies seconds.
.IP Example. Admin setpubs
is over its soft limit on
file system qfs50
, and its grace period has expired. You
can reset the grace periods by using the following command:
.IP
samquota -x 1d2h -A pubs ∕qfs50
.IP
If the preceding command is executed at 1100 on Thursday, the
grace period for pubs
is reset to expire at 1300 on Friday.
-A
adminsetIDGenerates a quota report for an admin set, or, when specified in conjunction with options that reset values, resets the values for the admin set specified. Specify an integer for the adminsetID.
-G
groupIDGenerates a quota report for a group, or when specified in conjunction with options that reset values, resets the values for the group specified. Specify an integer identifier or a group name for the groupID.
-O
Lists only online values in reports. The default is to list both online and total values.
-U
userIDGenerates a quota report for a user, or, when specified in conjunction with options that reset values, resets the values for the user specified. Specify an integer identifier or a user name for the userID.
Specifies that the quota information pertain to a specific file. A user is allowed to examine the group, user, or admin set quotas of any file for which the user has write permissions. The information displayed differs depending on whether or not the command is issued by a user who has write permission to file, as follows:
If the user issuing this command has write permission to file, the command generates information on the applicable admin set, group, and user quotas that apply to file.
If the user issuing this command does not have write permission to file, the command generates information for only the user's user ID and group ID quotas for the file system on which file resides.
Example 1. The following command initializes a quota for group sam
on the file system mounted on ∕qfs1
:
server# samquota -G sam -f 1000:s -f 1200:h -b 100k:s -b 120k:h -t 1d ∕qfs1
The group is given the following:
Soft limits of 1000 files and 100,000 512-byte blocks (about 50 megabytes)
Hard limits of 1200 files and 120,000 512-byte blocks
A grace period of 1 day (24 hours)
Example 2. The following example initializes a quota for admin set 17
on the file system that ∕qfs1∕sol
is part of:
server# samquota -A 17 -k -f 10k:s -f 20k:h -b 10m:s -b 15m:h -t 1w ∕qfs1∕sol
The admin set is given the following:
Soft limits of 10,000 files and 10,000,000 1024-byte blocks (10.24 gigabytes)
Hard limits of 20,000 files and 15,000,000 1024-byte blocks (15.36 gigabytes)
A grace period of 1 week (168 hours)
This command returns the following:
0 on successful completion.
1 on a usage or argument error.
10 on an execution error.
∕.quota_a
Admin set quota information
∕.quota_g
Group quota information
∕.quota_u
User quota information
No user quota entry.
User quotas are not active on the file system.
No group quota entry.
Group quotas are not active on the file system.
No admin quota entry.
Admin set quotas are not active on the file system.