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

lfs quota option to print allocated blocks and inode inaddtion to used

Details

    • 10824

    Description

      We are finding that users are running into cases where their used space is less than their soft/hardlimit but what they have been allocated is more. This results in being over quota. But the lfs quota command doesn't print how much a user is allocated. We would like an option to print total allocated blocks and inodes.

      Attachments

        Activity

          [LU-4028] lfs quota option to print allocated blocks and inode inaddtion to used

          Niu, can you provide a 2.4.x version and a 2.1.x version as well? Thanks!

          jaylan Jay Lan (Inactive) added a comment - Niu, can you provide a 2.4.x version and a 2.1.x version as well? Thanks!
          niu Niu Yawei (Inactive) added a comment - http://review.whamcloud.com/8407

          indeed, I'll push a patch to fix it, thank you, Mahmoud.

          niu Niu Yawei (Inactive) added a comment - indeed, I'll push a patch to fix it, thank you, Mahmoud.

          I think there is a problem with the patch

          this
          kbytes2str(total_balloc, strbuf, human_readable);
          should be called after print_obd_quota.

          2211 +» » kbytes2str(total_balloc, strbuf, human_readable);
          2212 +» » rc2 = print_obd_quota(mnt, &qctl, 1, human_readable,
          2213 +» » » » &total_ialloc);
          2214 +» » rc3 = print_obd_quota(mnt, &qctl, 0, human_readable,
          2215 +» » » » &total_balloc);
          2216 +» » printf("Total allocated inode limit: "LPU64", total "
          2217 +» » "allocated block limit: %s\n", total_ialloc, strbuf);
          2218 +» }

          mhanafi Mahmoud Hanafi added a comment - I think there is a problem with the patch this kbytes2str(total_balloc, strbuf, human_readable); should be called after print_obd_quota. 2211 +» » kbytes2str(total_balloc, strbuf, human_readable); 2212 +» » rc2 = print_obd_quota(mnt, &qctl, 1, human_readable, 2213 +» » » » &total_ialloc); 2214 +» » rc3 = print_obd_quota(mnt, &qctl, 0, human_readable, 2215 +» » » » &total_balloc); 2216 +» » printf("Total allocated inode limit: "LPU64", total " 2217 +» » "allocated block limit: %s\n", total_ialloc, strbuf); 2218 +» }

          LUDOC-209 is created.

          niu Niu Yawei (Inactive) added a comment - LUDOC-209 is created.
          green Oleg Drokin added a comment -

          We need a documentation update to go along with this change, I think.
          Can somebody create an appropriate LUDOC ticket?

          green Oleg Drokin added a comment - We need a documentation update to go along with this change, I think. Can somebody create an appropriate LUDOC ticket?
          pjones Peter Jones added a comment - b2_1 http://review.whamcloud.com/#/c/8283/ b2_4 http://review.whamcloud.com/#/c/8282/
          pjones Peter Jones added a comment -

          We need this ported to b2_1 and b2_4 for NASA

          pjones Peter Jones added a comment - We need this ported to b2_1 and b2_4 for NASA

          Patch landed to Master. Let me know if more work is needed in this ticket and I'll reopen.

          jlevi Jodi Levi (Inactive) added a comment - Patch landed to Master. Let me know if more work is needed in this ticket and I'll reopen.

          The patch is against master, I'll backport it to b2_1 once it landed on master.

          niu Niu Yawei (Inactive) added a comment - The patch is against master, I'll backport it to b2_1 once it landed on master.

          Was your patch against b2_1?

          Making all in utils
          make[5]: Entering directory `/usr/src/packages/BUILD/lustre-2.1.5/lustre/utils'
          make[6]: Entering directory `/usr/src/packages/BUILD/lustre-2.1.5/lustre/utils'
          lfs.c:1897: error: expected declaration specifiers or '...' before 'bool'
          lfs.c: In function 'print_quota_title':
          lfs.c:1903: error: 'human_readable' undeclared (first use in this function)
          lfs.c:1903: error: (Each undeclared identifier is reported only once
          lfs.c:1903: error: for each function it appears in.)
          lfs.c: At top level:
          lfs.c:1908: error: expected declaration specifiers or '...' before 'bool'
          lfs.c: In function 'kbytes2str':
          lfs.c:1910: error: 'h' undeclared (first use in this function)
          lfs.c: At top level:
          lfs.c:1925: error: expected declaration specifiers or '...' before 'bool'
          lfs.c: In function 'print_quota':
          lfs.c:1969: error: 'h' undeclared (first use in this function)
          lfs.c:1969: error: too many arguments to function 'kbytes2str'
          lfs.c:1976: error: too many arguments to function 'kbytes2str'
          lfs.c:1983: error: too many arguments to function 'kbytes2str'
          lfs.c: At top level:
          lfs.c:2027: error: expected declaration specifiers or '...' before 'bool'
          lfs.c: In function 'print_obd_quota':
          lfs.c:2057: error: 'h' undeclared (first use in this function)
          lfs.c:2057: error: too many arguments to function 'print_quota'
          lfs.c: In function 'lfs_quota':
          lfs.c:2079: error: 'bool' undeclared (first use in this function)
          lfs.c:2079: error: expected ';' before 'human_readable'
          lfs.c:2120: error: 'human_readable' undeclared (first use in this function)
          lfs.c:2120: error: 'true' undeclared (first use in this function)
          lfs.c:2193: error: too many arguments to function 'print_quota_title'
          lfs.c:2205: error: too many arguments to function 'print_quota'
          lfs.c:2211: error: too many arguments to function 'kbytes2str'
          lfs.c:2213: error: too many arguments to function 'print_obd_quota'
          lfs.c:2215: error: too many arguments to function 'print_obd_quota'
          make[6]: *** [lfs.o] Error 1

          jaylan Jay Lan (Inactive) added a comment - Was your patch against b2_1? Making all in utils make [5] : Entering directory `/usr/src/packages/BUILD/lustre-2.1.5/lustre/utils' make [6] : Entering directory `/usr/src/packages/BUILD/lustre-2.1.5/lustre/utils' lfs.c:1897: error: expected declaration specifiers or '...' before 'bool' lfs.c: In function 'print_quota_title': lfs.c:1903: error: 'human_readable' undeclared (first use in this function) lfs.c:1903: error: (Each undeclared identifier is reported only once lfs.c:1903: error: for each function it appears in.) lfs.c: At top level: lfs.c:1908: error: expected declaration specifiers or '...' before 'bool' lfs.c: In function 'kbytes2str': lfs.c:1910: error: 'h' undeclared (first use in this function) lfs.c: At top level: lfs.c:1925: error: expected declaration specifiers or '...' before 'bool' lfs.c: In function 'print_quota': lfs.c:1969: error: 'h' undeclared (first use in this function) lfs.c:1969: error: too many arguments to function 'kbytes2str' lfs.c:1976: error: too many arguments to function 'kbytes2str' lfs.c:1983: error: too many arguments to function 'kbytes2str' lfs.c: At top level: lfs.c:2027: error: expected declaration specifiers or '...' before 'bool' lfs.c: In function 'print_obd_quota': lfs.c:2057: error: 'h' undeclared (first use in this function) lfs.c:2057: error: too many arguments to function 'print_quota' lfs.c: In function 'lfs_quota': lfs.c:2079: error: 'bool' undeclared (first use in this function) lfs.c:2079: error: expected ';' before 'human_readable' lfs.c:2120: error: 'human_readable' undeclared (first use in this function) lfs.c:2120: error: 'true' undeclared (first use in this function) lfs.c:2193: error: too many arguments to function 'print_quota_title' lfs.c:2205: error: too many arguments to function 'print_quota' lfs.c:2211: error: too many arguments to function 'kbytes2str' lfs.c:2213: error: too many arguments to function 'print_obd_quota' lfs.c:2215: error: too many arguments to function 'print_obd_quota' make [6] : *** [lfs.o] Error 1

          People

            niu Niu Yawei (Inactive)
            mhanafi Mahmoud Hanafi
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: