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

lfs df prints nothing and exits with status 0 when given a non-lustre argument

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.15.0
    • Lustre 2.14.0
    • 3
    • 9223372036854775807

    Description

      It also ignores everything after the first argument.

      t:lustre-release# lfs df /tmp
      t:lustre-release# echo $?
      0
      t:lustre-release# lfs df /mnt/lustre XXX
      UUID                   1K-blocks        Used   Available Use% Mounted on
      lustre-MDT0000_UUID       141752       19528      112864  15% /mnt/lustre[MDT:0]
      lustre-OST0000_UUID       366744       29892      317380   9% /mnt/lustre[OST:0]
      lustre-OST0001_UUID       366744       29892      317352   9% /mnt/lustre[OST:1]
      
      filesystem_summary:       733488       59784      634732   9% /mnt/lustre
      
      t:lustre-release# echo $?
      0
      t:lustre-release# lfs df XXX /mnt/lustre
      error: invalid path 'XXX': No such file or directory
      t:lustre-release# echo $?
      2
      

      Attachments

        Activity

          [LU-8962] lfs df prints nothing and exits with status 0 when given a non-lustre argument
          pjones Peter Jones added a comment -

          Landed for 2.15

          pjones Peter Jones added a comment - Landed for 2.15

          "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/42126/
          Subject: LU-8962 lfs: Handle non-lustre and multiple args
          Project: fs/lustre-release
          Branch: master
          Current Patch Set:
          Commit: 2d714041ba718853be700960b76769a8fb44cf51

          gerrit Gerrit Updater added a comment - "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/42126/ Subject: LU-8962 lfs: Handle non-lustre and multiple args Project: fs/lustre-release Branch: master Current Patch Set: Commit: 2d714041ba718853be700960b76769a8fb44cf51

          Arshad Hussain (arshad.hussain@aeoncomputing.com) uploaded a new patch: https://review.whamcloud.com/42126
          Subject: LU-8962 lfs: Handle non-lustre and multiple args
          Project: fs/lustre-release
          Branch: master
          Current Patch Set: 1
          Commit: e76d535aa97d0e694080543f6e10d2820978353a

          gerrit Gerrit Updater added a comment - Arshad Hussain (arshad.hussain@aeoncomputing.com) uploaded a new patch: https://review.whamcloud.com/42126 Subject: LU-8962 lfs: Handle non-lustre and multiple args Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: e76d535aa97d0e694080543f6e10d2820978353a

          It would also be useful to print a brief error message and non-zero return code if no argument is given and no Lustre filesystems are mounted on the node, like "lfs df: no Lustre filesystems found" and exit with "ENOENT = 2".

          adilger Andreas Dilger added a comment - It would also be useful to print a brief error message and non-zero return code if no argument is given and no Lustre filesystems are mounted on the node, like " lfs df: no Lustre filesystems found " and exit with " ENOENT = 2 ".

          "lfs df" should process all of the additional arguments (e.g. "lfs df /mnt/lustre /mnt/lustre2" should show status for both filesystems). If an error is hit during argument processing, the first such error should be saved and argument processing should continue, and the error returned at the end.

          adilger Andreas Dilger added a comment - "lfs df" should process all of the additional arguments (e.g. " lfs df /mnt/lustre /mnt/lustre2 " should show status for both filesystems). If an error is hit during argument processing, the first such error should be saved and argument processing should continue, and the error returned at the end.

          People

            arshad512 Arshad Hussain
            jhammond John Hammond
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: