[LU-7813] default pool not inherited when specifying any layout parameter Created: 25/Feb/16 Updated: 12/Dec/17 Resolved: 10/Sep/16 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.9.0, Lustre 2.11.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Andreas Dilger | Assignee: | Lai Siyao |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||
| Severity: | 3 | ||||||||||||||||||||
| Rank (Obsolete): | 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. |
| Comments |
| Comment by Andreas Dilger [ 25/Feb/16 ] |
|
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. |
| Comment by Gerrit Updater [ 12/Mar/16 ] |
|
Andreas Dilger (andreas.dilger@intel.com) uploaded a new patch: http://review.whamcloud.com/18887 |
| Comment by Gerrit Updater [ 12/Mar/16 ] |
|
Andreas Dilger (andreas.dilger@intel.com) uploaded a new patch: http://review.whamcloud.com/18888 |
| Comment by Gerrit Updater [ 12/Mar/16 ] |
|
Andreas Dilger (andreas.dilger@intel.com) uploaded a new patch: http://review.whamcloud.com/18889 |
| Comment by Gerrit Updater [ 16/Mar/16 ] |
|
Andreas Dilger (andreas.dilger@intel.com) uploaded a new patch: http://review.whamcloud.com/18965 |
| Comment by Gerrit Updater [ 16/Jun/16 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/18965/ |
| Comment by Gerrit Updater [ 02/Sep/16 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/18889/ |
| Comment by Andreas Dilger [ 02/Sep/16 ] |
|
Lai, can you please verify that this issue is fixed with your patch http://review.whamcloud.com/19041 " |
| Comment by Andreas Dilger [ 10/Sep/16 ] |
|
It looks like this may have been fixed together with patch http://review.whamcloud.com/20849 " |
| Comment by Gerrit Updater [ 06/Nov/17 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/18888/ |