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

default pool not inherited when specifying any layout parameter

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.9.0, Lustre 2.11.0
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      When creating a new file with a specific layout in a directory that has a default layout, none of the default layout parameters are inherited at all. For example, setting the default striping to use size 65536 bytes on OST2 in the video pool:

      # lfs pool_list myth.audio
      Pool: myth.audio
      myth-OST0001_UUID
      myth-OST0002_UUID
      # mkdir /myth/tmp/ost2
      # lfs setstripe -S 65536 -i 1 -p audio /myth/tmp/ost1audio
      # lfs getstripe -d /myth/tmp/ost3audio
      stripe_count:   1 stripe_size:    65536 stripe_offset:  1 pool:           audio
      # touch /myth/tmp/ost1audio/orig
      touch /myth/tmp/ost1audio/orig
      [adilger@twoshoes ~]$ lfs getstripe /myth/tmp/ost1audio/orig
      lmm_stripe_count:   1
      lmm_stripe_size:    65536 ✅
      lmm_stripe_offset:  1 ✅
      lmm_pool:           audio ✅
      	obdidx		 objid		 objid		 group
      	     1	       1147360	     0x1181e0	             0
      # lfs setstripe -S 1M /myth/tmp/ost1audio/new
      # lfs getstripe /myth/tmp/ost1audio/new
      lmm_stripe_count:   1
      lmm_stripe_size:    1048576 ✅
      lmm_stripe_offset:  3 ❌
      	obdidx		 objid		 objid		 group
      	     3 	       1147358	     0x1181de	             0
      

      This file did not inherit the the OST pool from the default layout, and as a result it was also allocated from a file that was not in the pool.

      # lfs setstripe -c 2 /myth/tmp/ost1audio/next
      # lfs getstripe /myth/tmp/ost1audio/next
      lmm_stripe_count:   2 ✅
      lmm_stripe_size:    65536  ✅
      lmm_stripe_offset:  3 ❌
      obdidx        objid    objid        group
           3	       1147359	     0x1181df             0
      	     1	        859771	      0xd1e7b	             0
      

      The stripe_size was used for the new allocation, but the OST pool was not inherited, and as a result a of that the stripes are not constrained to which OSTs are involved.

      Attachments

        Issue Links

          Activity

            [LU-7813] default pool not inherited when specifying any layout parameter

            Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/18888/
            Subject: LU-7813 lov: rename LOV_MAGIC_V*_DEF to *_DEFINED
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 5b663ca0cb31517e307913873ca5df4676e5654d

            gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/18888/ Subject: LU-7813 lov: rename LOV_MAGIC_V*_DEF to *_DEFINED Project: fs/lustre-release Branch: master Current Patch Set: Commit: 5b663ca0cb31517e307913873ca5df4676e5654d

            It looks like this may have been fixed together with patch http://review.whamcloud.com/20849 "LU-8264 lod: lfs setstripe fix for pool"

            adilger Andreas Dilger added a comment - It looks like this may have been fixed together with patch http://review.whamcloud.com/20849 " LU-8264 lod: lfs setstripe fix for pool"

            Lai, can you please verify that this issue is fixed with your patch http://review.whamcloud.com/19041 "LU-7660 dne: support fs default stripe" and then close this ticket if it is. Otherwise, please add a comment explaining what still needs to be done.

            adilger Andreas Dilger added a comment - Lai, can you please verify that this issue is fixed with your patch http://review.whamcloud.com/19041 " LU-7660 dne: support fs default stripe" and then close this ticket if it is. Otherwise, please add a comment explaining what still needs to be done.

            Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/18889/
            Subject: LU-7813 tests: clean up ost-pools.sh
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 9ae317d9b4fa0cd40365d0100172d0b8e0dbc828

            gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/18889/ Subject: LU-7813 tests: clean up ost-pools.sh Project: fs/lustre-release Branch: master Current Patch Set: Commit: 9ae317d9b4fa0cd40365d0100172d0b8e0dbc828

            Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/18965/
            Subject: LU-7813 utils: improve lfs setstripe pool error message
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 14de1a415da53d341b378c4722aef2ec16b066ad

            gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/18965/ Subject: LU-7813 utils: improve lfs setstripe pool error message Project: fs/lustre-release Branch: master Current Patch Set: Commit: 14de1a415da53d341b378c4722aef2ec16b066ad

            Andreas Dilger (andreas.dilger@intel.com) uploaded a new patch: http://review.whamcloud.com/18965
            Subject: LU-7813 utils: improve lfs setstripe pool error
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 64397ff90c2dd86cd4c8097b63c175a78ff18ae1

            gerrit Gerrit Updater added a comment - Andreas Dilger (andreas.dilger@intel.com) uploaded a new patch: http://review.whamcloud.com/18965 Subject: LU-7813 utils: improve lfs setstripe pool error Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 64397ff90c2dd86cd4c8097b63c175a78ff18ae1

            Andreas Dilger (andreas.dilger@intel.com) uploaded a new patch: http://review.whamcloud.com/18889
            Subject: LU-7813 tests: clean up ost-pools.sh
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: e80a830ef72aad05aa9cb312baf576c774ea11bf

            gerrit Gerrit Updater added a comment - Andreas Dilger (andreas.dilger@intel.com) uploaded a new patch: http://review.whamcloud.com/18889 Subject: LU-7813 tests: clean up ost-pools.sh Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: e80a830ef72aad05aa9cb312baf576c774ea11bf

            Andreas Dilger (andreas.dilger@intel.com) uploaded a new patch: http://review.whamcloud.com/18888
            Subject: LU-7813 lov: rename LOV_MAGIC_V*_DEF to *_DEFINED
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 4289d5b634c19694b3851bfc30b4e3b764a6e64c

            gerrit Gerrit Updater added a comment - Andreas Dilger (andreas.dilger@intel.com) uploaded a new patch: http://review.whamcloud.com/18888 Subject: LU-7813 lov: rename LOV_MAGIC_V*_DEF to *_DEFINED Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 4289d5b634c19694b3851bfc30b4e3b764a6e64c

            Andreas Dilger (andreas.dilger@intel.com) uploaded a new patch: http://review.whamcloud.com/18887
            Subject: LU-7813 lod: inherit pool from parent if unspecified
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 9912e645f55f1d1925cede81ae4eec6e10276ca5

            gerrit Gerrit Updater added a comment - Andreas Dilger (andreas.dilger@intel.com) uploaded a new patch: http://review.whamcloud.com/18887 Subject: LU-7813 lod: inherit pool from parent if unspecified Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 9912e645f55f1d1925cede81ae4eec6e10276ca5

            The right place to start looking is lod_ah_init() to see if this code can pull the layout for a new file from the parent first, and then override non-default fields from the specified layout, so that only specified fields will be changed instead of all of them being reset to the defaults. Currently it is checking for a specified layout first, and completely ignoring the parent directory if there is a specific layout.

            I don't think that changing the pool behaviour will break things, since I don't think many people are using OST pools, and those that have tested it were telling me that this non-inheritance behaviour is broken.

            adilger Andreas Dilger added a comment - The right place to start looking is lod_ah_init() to see if this code can pull the layout for a new file from the parent first, and then override non-default fields from the specified layout, so that only specified fields will be changed instead of all of them being reset to the defaults. Currently it is checking for a specified layout first, and completely ignoring the parent directory if there is a specific layout. I don't think that changing the pool behaviour will break things, since I don't think many people are using OST pools, and those that have tested it were telling me that this non-inheritance behaviour is broken.

            People

              laisiyao Lai Siyao
              adilger Andreas Dilger
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: