Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-20528

utils: several lfs quota options work abnormally

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • Lustre 2.18.0
    • None
    • None
    • 3
    • 9223372036854775807

      1) lfs quota long options wrongly consume an extra argument

      For example, `lfs quota --all -u` cannot show the quota info for all users:

      # lfs quota -a -u /mnt/lustre
      Disk usr quotas
           Filesystem  quota_id  kbytes  bquota  blimit  bgrace   files  iquota  ilimit  igrace 
          /mnt/lustre quota_usr       0       0       0       -       0       0       0       - 
          /mnt/lustre quota_2usr       0       0       0       -       0       0       0       - 
      
      # lfs quota --all -u /mnt/lustre
      lfs quota: no quota type to iterate
      Display disk usage and limits.
      usage: quota [-q] [-v] [-h] [-o OBD_UUID|-o OST_IDX|-m MDT_IDX]
                   [{-u|-g|-p} UNAME|UID|GNAME|GID|PROJID]
                   [--blocks|--busage|--space]
                   [--block-softlimit|--bsoftlimit]
                   [--block-hardlimit|--bhardlimit]
                   [--block-grace|--bgrace|--btime]
                   [--delimiter DELIMITER]
                   [--filesystem|--mount-point]
                   [--inodes|--iusage]
                   [--inode-softlimit|--isoftlimit]
                   [--inode-hardlimit|--ihardlimit]
                   [--inode-grace|--igrace|--itime]
                   [--lqa LQA_NAME]
                   [--pool OST_POOL_NAME]
                   [MOUNT_POINT ...]
             quota -t {-u|-g|-p} [--pool OST_POOL_NAME] [MOUNT_POINT ...]
             quota [-hqv] {-U|-G|-P} [--pool OST_POOL_NAME] [MOUNT_POINT ...]
             quota -a {-u|-g|-p} [-n] [-s START_QID] [-e END_QID]
                   [--show-root] [MOUNT_POINT ...] 

      `lfs quota --user 1000` cannot show the quota info for quota_usr user

      # lfs quota -u 1000 /mnt/lustre
      Disk quotas for usr quota_usr (uid 1000):
           Filesystem  kbytes  bquota  blimit  bgrace   files  iquota  ilimit  igrace 
          /mnt/lustre       0       0       0       -       0       0       0       - 
      
      # lfs quota --user 1000 /mnt/lustre
      lfs quota: invalid id '/mnt/lustre'
      Display disk usage and limits.
      usage: quota [-q] [-v] [-h] [-o OBD_UUID|-o OST_IDX|-m MDT_IDX]
                   [{-u|-g|-p} UNAME|UID|GNAME|GID|PROJID]
                   [--blocks|--busage|--space]
                   [--block-softlimit|--bsoftlimit]
                   [--block-hardlimit|--bhardlimit]
                   [--block-grace|--bgrace|--btime]
                   [--delimiter DELIMITER]
                   [--filesystem|--mount-point]
                   [--inodes|--iusage]
                   [--inode-softlimit|--isoftlimit]
                   [--inode-hardlimit|--ihardlimit]
                   [--inode-grace|--igrace|--itime]
                   [--lqa LQA_NAME]
                   [--pool OST_POOL_NAME]
                   [MOUNT_POINT ...]
             quota -t {-u|-g|-p} [--pool OST_POOL_NAME] [MOUNT_POINT ...]
             quota [-hqv] {-U|-G|-P} [--pool OST_POOL_NAME] [MOUNT_POINT ...]
             quota -a {-u|-g|-p} [-n] [-s START_QID] [-e END_QID]
                   [--show-root] [MOUNT_POINT ...]

      2) lfs quota -d option is not supported

      # lfs quota -a -u --delimiter , /mnt/lustre
      Disk usr quotas
            Filesystem,  quota_id,  kbytes,  bquota,  blimit,  bgrace,   files,  iquota,  ilimit,  igrace,
           /mnt/lustre, quota_usr,       0,       0,       0,       -,       0,       0,       0,       -,
           /mnt/lustre,quota_2usr,       0,       0,       0,       -,       0,       0,       0,       -,
      # lfs quota -a -u -d , /mnt/lustre
      lfs quota: unrecognized option '-d'
      Display disk usage and limits.
      usage: quota [-q] [-v] [-h] [-o OBD_UUID|-o OST_IDX|-m MDT_IDX]
                   [{-u|-g|-p} UNAME|UID|GNAME|GID|PROJID]
                   [--blocks|--busage|--space]
                   [--block-softlimit|--bsoftlimit]
                   [--block-hardlimit|--bhardlimit]
                   [--block-grace|--bgrace|--btime]
                   [--delimiter DELIMITER]
                   [--filesystem|--mount-point]
                   [--inodes|--iusage]
                   [--inode-softlimit|--isoftlimit]
                   [--inode-hardlimit|--ihardlimit]
                   [--inode-grace|--igrace|--itime]
                   [--lqa LQA_NAME]
                   [--pool OST_POOL_NAME]
                   [MOUNT_POINT ...]
             quota -t {-u|-g|-p} [--pool OST_POOL_NAME] [MOUNT_POINT ...]
             quota [-hqv] {-U|-G|-P} [--pool OST_POOL_NAME] [MOUNT_POINT ...]
             quota -a {-u|-g|-p} [-n] [-s START_QID] [-e END_QID]
                   [--show-root] [MOUNT_POINT ...] 

            xyang Xiao Yang
            xyang Xiao Yang
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: