[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:
Related
is related to LU-8264 lfs setstripe without -p pool_name do... Resolved
is related to LU-7660 FS default striping settings only hon... Resolved
is related to LU-7335 store default filesystem layout direc... Resolved
is related to LU-10369 running "lfs setstripe -c3 /mnt/lustr... Resolved
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
Subject: LU-7813 lod: inherit pool from parent if unspecified
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 9912e645f55f1d1925cede81ae4eec6e10276ca5

Comment by Gerrit Updater [ 12/Mar/16 ]

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

Comment by Gerrit Updater [ 12/Mar/16 ]

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

Comment by Gerrit Updater [ 16/Mar/16 ]

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

Comment by Gerrit Updater [ 16/Jun/16 ]

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

Comment by Gerrit Updater [ 02/Sep/16 ]

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

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 "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.

Comment by Andreas Dilger [ 10/Sep/16 ]

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

Comment by Gerrit Updater [ 06/Nov/17 ]

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

Generated at Sat Feb 10 02:12:08 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.