JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Sun QFS and Sun Storage Archive Manager 5.3 Reference Manual     Sun QFS and Sun Storage Archive Manager 5.3 Information Library
search filter icon
search icon

Document Information

Preface

1.  User Commands (Man Pages Section 1)

2.  Maintenance Commands (Man Pages Section 1M)

archive_audit(1M)

archive_mark(1M)

archiver(1M)

archiver.sh(1M)

arcopy(1M)

arfind(1M)

auditslot(1M)

backto(1M)

build_cat(1M)

chmed(1M)

cleandrive(1M)

clri(1M)

damage(1M)

dev_down.sh(1M)

dmpshm(1M)

dump_cat(1M)

dump_log(1M)

exarchive(1M)

export(1M)

fsmadm(1M)

fsmdb(1M)

fsmgmtd(1M)

fsmgr(1M)

fsmgr_setup(1M)

fsmupd(1M)

generic(1M)

gnutar(1M)

HAStoragePlus_samfs(1M)

import(1M)

itemize(1M)

load(1M)

load_notify.sh(1M)

log_rotate.sh(1M)

mccfg(1M)

mount_samfs(1M)

move(1M)

nrecycler.sh(1M)

odlabel(1M)

qfsdump(1M)

qfsrestore(1M)

rearch(1M)

recover.sh(1M)

recycler(1M)

recycler.sh(1M)

releaser(1M)

reserve(1M)

restore.sh(1M)

robots(1M)

rpc.sam(1M)

sam-amld(1M)

sam-archiverd(1M)

sam-arcopy(1M)

sam-arfind(1M)

sam-catserverd(1M)

sam-clfsd(1M)

sam-clientd(1M)

sam-dbupd(1M)

sam-fsalogd(1M)

sam-fsd(1M)

sam-ftpd(1M)

sam-genericd(1M)

sam-grau_helper(1M)

sam-ibm3494d(1M)

sam-nrecycler(1M)

sam-recycler(1M)

sam-releaser(1M)

sam-rftd(1M)

sam-robotsd(1M)

sam-rpcd(1M)

sam-scannerd(1M)

sam-serverd(1M)

sam-sharefsd(1M)

sam-shrink(1M)

sam-sony_helper(1M)

sam-sonyd(1M)

sam-stagealld(1M)

sam-stagerd(1M)

sam-stagerd_copy(1M)

sam-stk_helper(1M)

sam-stkd(1M)

samadm(1M)

sambcheck(1M)

samchaid(1M)

samcmd(1M)

samcrondump(1M)

samcronfix(1M)

samd(1M)

samdb(1M)

samexplorer(1M)

samexport(1M)

samfsck(1M)

samfsconfig(1M)

samfsdump(1M)

samfsinfo(1M)

samfsrestore(1M)

samfstyp(1M)

samgetmap(1M)

samgetvol(1M)

samgrowfs(1M)

samimport(1M)

samload(1M)

sammkfs(1M)

samncheck(1M)

samquota(1M)

samquotastat(1M)

samset(1M)

samsharefs(1M)

samsnoop(1M)

samstorade(1M)

samtrace(1M)

samu(1M)

samunhold(1M)

save_core.sh(1M)

scanner(1M)

scsi_trace_decode(1M)

sefreport(1M)

sendtrap(1M)

set_admin(1M)

set_state(1M)

showqueue(1M)

stageall(1M)

stageback.sh(1M)

star(1M)

tapealert(1M)

tarback.sh(1M)

tplabel(1M)

tpverify(1M)

trace_rotate(1M)

umount_samfs(1M)

unarchive(1M)

undamage(1M)

unload(1M)

unrearch(1M)

unreserve(1M)

3.  Library Functions (Man Pages Section 3)

4.  Library Functions (Man Pages Section 3X)

5.  File Formats (Man Pages Section 4)

6.  Standards, Environment, and Macros (Man Pages Section 5)

7.  Device and Network Interfaces (Man Pages Section 7)

samquota(1M)

NAME
     samquota - Reports, sets, or resets quota information

SYNOPSIS
     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]

AVAILABILITY
     SUNWsamfs

     SUNWqfs

DESCRIPTION
     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 Sun QFS and SAM-QFS
     file systems to stdout.

ADMIN SETS AND DIRECTORY/PROJECT QUOTAS
     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 Sun QFS or SAM-QFS 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.

OPTIONS
     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.

               count specifies the number of blocks for the limit
               and must be an integer number in the following
               range:
               0 < count < (2**63) -1.

               By default, the count specification indicates a
               number of 512-byte blocks.  If the -k option is
               also specified, the count specification is
               interpreted as a number of 1024-byte blocks.

               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.

               type specifies the type of limit.  Possible type
               specifications are as follows:

               type           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.

               scope specifies the scope of the limit.  Possible
               scope specifications are as follows:

               scope          Interpretation

               o or online    Specifies that the samquota command
                              is being used to reset an online
                              limit.  For Sun QFS and SAM-QFS
                              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 Sun QFS and SAM-QFS
                              file systems, both online and
                              offline files are used to compute
                              the total block usage.

                              If no scope is specified both the
                              online and total limits are set.

               Example.  The following command line sets a soft
               limit of 120,000 512-byte blocks to be occupied by
               user george's files in file system qfs22:

               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.

               server# 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.

               count specifies the number of files for the limit
               and must be an integer number in the following
               range:
               0 < count < (2**63) -1.

               If the -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).

               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.

               type specifies the type of limit.  Possible type
               specifications are as follows:

               type           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.

               scope specifies the scope of the limit.  Possible
               scope specifications are as follows:

               scope          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.

                              If no scope is specified both the
                              online and total limits are set.

               Example.  The following command line sets a soft
               limit of 120 files for user martha in file system
               qfs222:

               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.

               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 group
               adm, in file system qfs4:

               samquota -G adm -k -b 256k:hard /qfs4

               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:

               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:scope
               Specifies the time to be used for the soft limit
               grace periods.

               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.

               The interval must be an integer number in the
               following range:
               0 < interval < (2**31) - 1.

               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.

               Example.  The following command line specifies an
               interval of 7 days and 12 hours for the online and
               total grace periods of user adele in the myqfs
               file system:

               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:scope
               Adjusts 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.

               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:

               action         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       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.

                              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.

                              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.

                              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.

               Example.  Admin set pubs 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:

               samquota -x 1d2h -A pubs /qfs50

               If the preceding command is executed at 1100 on
               Thursday, the grace period for pubs is reset to
               expire at 1300 on Friday.

     -A adminsetID
               Generates 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 groupID
               Generates 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 userID Generates 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.

     file      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:

               o  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.

               o  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.

EXAMPLES
     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:

     o  Soft limits of 1000 files and 100,000 512-byte blocks
        (about 50 megabytes)

     o  Hard limits of 1200 files and 120,000 512-byte blocks

     o  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:

     o  Soft limits of 10,000 files and 10,000,000 1024-byte
        blocks (10.24 gigabytes)

     o  Hard limits of 20,000 files and 15,000,000 1024-byte
        blocks (15.36 gigabytes)

     o  A grace period of 1 week (168 hours)

EXIT STATUS
     This command returns the following:

     o  0 on successful completion.

     o  1 on a usage or argument error.

     o  10 on an execution error.

FILES
     filesytem/.quota_a  Admin set quota information

     filesystem/.quota_g Group quota information

     filesystem/.quota_u User quota information

SEE ALSO
     squota(1)

     samfsck(1M)

     passwd(4) - User ID information

     group(4) - Group ID information

DIAGNOSTICS
     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.