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

lfs computes pool name length incorrectly

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.8.0
    • Lustre 2.7.0
    • None
    • lustre-master tag 2.6.93
    • 3
    • 17464

    Description

      When dealing with pools, you need to specify the file system name in front of the pool name as <fsname>.<pool_name>. The pool name, without the file system name, has a max length of 15 characters and is correctly enforced:

      # lctl pool_new scratch.test_82b
      Pool scratch.test_82b created
      # lctl pool_new scratch.test_82abcdefgh
      Pool scratch.test_82abcdefgh created
      # lctl pool_new scratch.test_82abcdefghi
      poolname test_82abcdefghi is too long (length is 16 max is 15)
      argument scratch.test_82abcdefghi must be <fsname>.<poolname>
      pool_new: File name too long
      

      Yet, when specifying a pool name in 'lfs setstripe', the file system name is used to compute the length of the pool name. The file system name is required when using the '-p' option in 'lfs setstripe' as in the second example below.

      # /usr/bin/lfs setstripe -p scratch.test_82b -o 7936 /lustre/scratch/d82b.conf-sanity/f82b.conf-sanity
      error: setstripe: pool name 'scratch.test_82b' is too long (max is 15 characters)
      ...
      # /usr/bin/lfs setstripe -p test_82b -o 4 /lustre/scratch/d82b.conf-sanity/f82b.conf-sanity
      can't find fs root for '/lustre/scratch/d82b.conf-sanity': -19
      '/lustre/scratch/d82b.conf-sanity/f82b.conf-sanity' is not on a Lustre filesystem: No such device (19)
      error: setstripe: create stripe file '/lustre/scratch/d82b.conf-sanity/f82b.conf-sanity' failed
      ...
      

      This caused problems with the conf-sanity test 82b at https://testing.hpdd.intel.com/test_sets/e9152f7c-ade4-11e4-a0b6-5254006e85c2

      Attachments

        Issue Links

          Activity

            [LU-6234] lfs computes pool name length incorrectly

            You are right, thanks.

            adilger Andreas Dilger added a comment - You are right, thanks.
            bobijam Zhenyu Xu added a comment - - edited

            isalnum('.') == false, and current patch can handle it.

            bobijam Zhenyu Xu added a comment - - edited isalnum('.') == false, and current patch can handle it.
            adilger Andreas Dilger added a comment - - edited

            I noticed this patch landed, but it would have been good to add '.' to the characters that are not allowed in a pool or filesystem name. Otherwise it will break "lctl {get,set}_param" using '.' as a separator.

            adilger Andreas Dilger added a comment - - edited I noticed this patch landed, but it would have been good to add '.' to the characters that are not allowed in a pool or filesystem name. Otherwise it will break "lctl {get,set}_param" using '.' as a separator.
            pjones Peter Jones added a comment -

            Landed for 2.8

            pjones Peter Jones added a comment - Landed for 2.8

            Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/13742/
            Subject: LU-6234 util: check fsname and pool name
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 7c25eb1ba2b1db3009a0e88b3ecf229134f8ac92

            gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/13742/ Subject: LU-6234 util: check fsname and pool name Project: fs/lustre-release Branch: master Current Patch Set: Commit: 7c25eb1ba2b1db3009a0e88b3ecf229134f8ac92

            This is annoying. What is stalling the patch?

            schamp Stephen Champion added a comment - This is annoying. What is stalling the patch?
            fzago Frank Zago (Inactive) added a comment - - edited

            Thanks Jean-Charles.

            I've updated the patch with tests in ost-pool.sh. See attachments.

            fzago Frank Zago (Inactive) added a comment - - edited Thanks Jean-Charles. I've updated the patch with tests in ost-pool.sh. See attachments.

            A pool specific test script has been added (ost-pools.sh). New pool tests should go to it.

            jcl jacques-charles lafoucriere added a comment - A pool specific test script has been added (ost-pools.sh). New pool tests should go to it.
            fzago Frank Zago (Inactive) added a comment - - edited

            Patch looks good. I've added a few tests to sanity.sh. See attachment. Would you mind folding them into that patch?

            fzago Frank Zago (Inactive) added a comment - - edited Patch looks good. I've added a few tests to sanity.sh. See attachment. Would you mind folding them into that patch?

            Bobi Jam (bobijam@hotmail.com) uploaded a new patch: http://review.whamcloud.com/13742
            Subject: LU-6234 lfs: check pool name length w/o fsname in it
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: a192f2660b86b3609b60bcc15911f4fd26d8ab7e

            gerrit Gerrit Updater added a comment - Bobi Jam (bobijam@hotmail.com) uploaded a new patch: http://review.whamcloud.com/13742 Subject: LU-6234 lfs: check pool name length w/o fsname in it Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: a192f2660b86b3609b60bcc15911f4fd26d8ab7e

            People

              bobijam Zhenyu Xu
              jamesanunez James Nunez (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: