Whamcloud - gitweb
LU-15057 utils: pool quota man 21/45121/4
authorSergey Cheremencev <sergey.cheremencev@hpe.com>
Wed, 31 Mar 2021 12:13:53 +0000 (15:13 +0300)
committerOleg Drokin <green@whamcloud.com>
Mon, 13 Dec 2021 03:54:11 +0000 (03:54 +0000)
Adding pool quota man for setquota and
quota commands.
Remove [-o <obd_uuid>|-i <mdt_idx>|-I <ost_idx>]
from the case "lfs quota -t". Grace period
is stored only at quota master. Furthermore,
command lfs quota -t -I 0 /mnt/testfs fails
with EOPNOTSUPP.

Test-Parameters: trivial
HPE-bug-id: LUS-9869
Change-Id: I368e22b782bd3626f64907059ea329e94986535b
Reviewed-on: https://es-gerrit.dev.cray.com/158556
Reviewed-by: Alexander Boyko <c17825@cray.com>
Reviewed-by: Elena Gryaznova <c17455@cray.com>
Tested-by: Elena Gryaznova <c17455@cray.com>
Signed-off-by: Sergey Cheremencev <sergey.cheremencev@hpe.com>
Reviewed-on: https://review.whamcloud.com/45121
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/utils/lfs.c

index 3d22c9d..213dc09 100644 (file)
@@ -449,48 +449,13 @@ command_t cmdlist[] = {
         "Usage: getname [--help|-h] [--instance|-i] [--fsname|-n] [path ...]"},
 #ifdef HAVE_SYS_QUOTA_H
        {"setquota", lfs_setquota, 0, "Set filesystem quotas.\n"
         "Usage: getname [--help|-h] [--instance|-i] [--fsname|-n] [path ...]"},
 #ifdef HAVE_SYS_QUOTA_H
        {"setquota", lfs_setquota, 0, "Set filesystem quotas.\n"
-        "usage: setquota {-u|-g|-p} UNAME|UID|GNAME|GID|PROJID\n"
-        "                -b BLOCK_SOFTLIMIT -B BLOCK_HARDLIMIT\n"
-        "                -i INODE_SOFTLIMIT -I INODE_HARDLIMIT <filesystem>\n"
-        "       setquota {-u|--user USER|UID|-g|--group GROUP|GID|-p|--projid PROJID}\n"
-        "                [--block-softlimit BLOCK_SOFTLIMIT]\n"
-        "                [--block-hardlimit BLOCK_HARDLIMIT]\n"
-        "                [--inode-softlimit INODE_SOFTLIMIT]\n"
-        "                [--inode-hardlimit INODE_HARDLIMIT] <filesystem>\n"
-        "       setquota [-t] {-h|--help|-u|--user|-g|--group|-p|--projid}\n"
-        "                [--block-grace 'notify'|BLOCK_GRACE]\n"
-        "                [--inode-grace 'notify'|INODE_GRACE] <filesystem>\n"
-        "       setquota {-U|-G|-P}\n"
-        "                -b BLOCK_SOFTLIMIT -B BLOCK_HARDLIMIT\n"
-        "                -i INODE_SOFTLIMIT -I INODE_HARDLIMIT <filesystem>\n"
-        "       setquota {-U|--default-usr|-G|--default-grp|-P|--default-prj}\n"
-        "                [--block-softlimit BLOCK_SOFTLIMIT]\n"
-        "                [--block-hardlimit BLOCK_HARDLIMIT]\n"
-        "                [--inode-softlimit INODE_SOFTLIMIT]\n"
-        "                [--inode-hardlimit INODE_HARDLIMIT] <filesystem>\n"
-        "       setquota {-u|-g|-p} UNAME|UID|GNAME|GID|PROJID\n"
-        "                {-d|--default}\n"
-        "       -b can be used instead of --block-softlimit/--block-grace\n"
-        "       -B can be used instead of --block-hardlimit\n"
-        "       -i can be used instead of --inode-softlimit/--inode-grace\n"
-        "       -I can be used instead of --inode-hardlimit\n"
-        "       -d can be used instead of --default\n\n"
-        "Note: The total quota space will be split into many qunits and\n"
-        "      balanced over all server targets, the minimal qunit size is\n"
-        "      1M bytes for block space and 1K inodes for inode space.\n\n"
-        "      The maximum quota grace time is 2^48 - 1 seconds.\n\n"
-        "      Quota space rebalancing process will stop when this mininum\n"
-        "      value is reached. As a result, quota exceeded can be returned\n"
-        "      while many targets still have 1MB or 1K inodes of spare\n"
-        "      quota space.\n\n"
-        "      When setting the grace time, 'notify' can be used as grace to\n"
-        "      be notified after the quota is over soft limit but prevents\n"
-        "      the soft limit from becoming the hard limit."},
+        "usage: setquota [-t][-d] {-u|-U|-g|-G|-p|-P} {-b|-B|-i|-I LIMIT} [--pool POOL] FILESYSTEM"},
        {"quota", lfs_quota, 0, "Display disk usage and limits.\n"
         "usage: quota [-q] [-v] [-h] [-o OBD_UUID|-i MDT_IDX|-I OST_IDX]\n"
        {"quota", lfs_quota, 0, "Display disk usage and limits.\n"
         "usage: quota [-q] [-v] [-h] [-o OBD_UUID|-i MDT_IDX|-I OST_IDX]\n"
-        "             [{-u|-g|-p} UNAME|UID|GNAME|GID|PROJID] <filesystem>\n"
-        "       quota [-o OBD_UUID|-i MDT_IDX|-I OST_IDX] -t {-u|-g|-p} <filesystem>\n"
-       "        quota [-q] [-v] [h] {-U|-G|-P} <filesystem>"},
+        "             [{-u|-g|-p} UNAME|UID|GNAME|GID|PROJID]\n"
+        "             [--pool <OST pool name>] <filesystem>\n"
+        "       quota -t <-u|-g|-p> [--pool <OST pool name>] <filesystem>\n"
+        "       quota [-q] [-v] [h] {-U|-G|-P} [--pool <OST pool name>] <filesystem>"},
        {"project", lfs_project, 0,
         "Change or list project attribute for specified file or directory.\n"
         "usage: project [-d|-r] <file|directory...>\n"
        {"project", lfs_project, 0,
         "Change or list project attribute for specified file or directory.\n"
         "usage: project [-d|-r] <file|directory...>\n"