[LU-8264] lfs setstripe without -p pool_name doesn't inherit pool from parent/ROOT directory Created: 13/Jun/16  Updated: 19/Mar/19  Resolved: 25/Jan/18

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.9.0, Lustre 2.10.1, Lustre 2.10.4
Fix Version/s: Lustre 2.11.0, Lustre 2.10.4

Type: Bug Priority: Critical
Reporter: Rahul Deshmukh (Inactive) Assignee: Hongchao Zhang
Resolution: Fixed Votes: 0
Labels: patch

Issue Links:
Duplicate
duplicates LU-7660 FS default striping settings only hon... Resolved
Related
is related to LU-10350 ost-pools test 1n fails with 'failed ... Resolved
is related to LU-10369 running "lfs setstripe -c3 /mnt/lustr... Resolved
is related to LU-7813 default pool not inherited when speci... Resolved
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

Actually exactly sure of if this is bug, as a doubt filing this bug. Please adviced. Here is use case or more details about it.

Say I have 4 osts on my setup and created pool with 2 osts assign to it

lctl pool_new lustre.pool ;
lctl pool_add lustre.pool lustre-OST0000 lustre-OST0001 ; 
mkdir /mnt/lustre/test_pool
lfs setstripe -c -1 -p lustre.pool /mnt/lustre/test_pool 

Now I can create file in that by following two ways

 case1: lfs setstripe -c 3 -p lustre.pool /mnt/lustre/test_pool/test1
 case2: lfs setstripe -c 3  /mnt/lustre/test_pool/test2 

Here in case 1 we trim the strip count to 2 as pool has 2 osts
But in case 2 we allow stripe count 3
So question is case2 is expected behaviour or bug (as test_pool is assigned to pool) ?

Following text taken from admin guide.

Several lfs commands can be run with OST pools. Use the lfs setstripe command to associate a directory with an OST pool. This causes all new regular files and directories in the directory to be created in the pool. The lfs command can be used to list pools in a file system and OSTs in a named pool.


 Comments   
Comment by Andreas Dilger [ 13/Jun/16 ]

This is indeed a bug, caused by the fact that if the user specifies any striping parameters (in your case -c 3) they all of the striping parameters come from the client instead of inheriting the rest of the striping parameters from the parent directory.

This should be fixed by the patch http://review.whamcloud.com/19041 "LU-7660 dne: support fs default stripe" which would be very useful if you could test and verify that it is fixing this problem.

Comment by James Nunez (Inactive) [ 15/Jun/16 ]

Seems like ost-pools.sh test 16 "Inheritance of pool properties" falls short. I'll work on improving this test.

Comment by Rahul Deshmukh (Inactive) [ 16/Jun/16 ]

> This should be fixed by the patch http://review.whamcloud.com/19041 "LU-7660 dne: support fs default stripe" which would be very
> useful if you could test and verify that it is fixing this problem.

I have checked with above mention patch but it did not solve the problem. Let me cook the patch and push it.

Comment by Gerrit Updater [ 17/Jun/16 ]

Rahul Deshmukh (rahul.deshmukh@seagate.com) uploaded a new patch: http://review.whamcloud.com/20849
Subject: LU-8264 lod: lfs setstripe fix for pool.
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 81089bfb4f3564cb2f7ba40d5c39598da2403768

Comment by Gerrit Updater [ 17/Jun/16 ]

James Nunez (james.a.nunez@intel.com) uploaded a new patch: http://review.whamcloud.com/20859
Subject: LU-8264 tests: setstripe striping parameters not inherited
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 9abd9545d25a8a27fb6542c3077453a14fe35184

Comment by James Nunez (Inactive) [ 17/Jun/16 ]

Rahul - I just made a few changes to ost-pools.sh to catch this kind of error. I'll rebase my patch when yours lands to master and make any necessary changes.

Some of the changes I made to the ost-pools test script were based on Andreas' abandoned patch http://review.whamcloud.com/#/c/18887/

Comment by Rahul Deshmukh (Inactive) [ 28/Jun/16 ]

Rahul - I just made a few changes to ost-pools.sh to catch this kind of error. I'll rebase my patch when yours lands to master and make any necessary changes.

Ok, Sure.

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 Lai Siyao [ 05/Sep/16 ]

This issue is that when striping is specified, but pool not, the inherited pool (from parent or filesystem default) should be used. However current code always ignore inherited pool.

IMO http://review.whamcloud.com/20849 can fix this issue.

Comment by Andreas Dilger [ 06/Sep/16 ]

Since 20849 is landed for 2.9, can you please convert "IMO" to a test case to verify this is working correctly so this bug can be closed.

Comment by Lai Siyao [ 07/Sep/16 ]

sure, I'll add a specific test case later.

Comment by Andreas Dilger [ 10/Sep/16 ]

Patch http://review.whamcloud.com/20859 "LU-8264 tests: setstripe striping parameters not inherited" looks like it has the test case for this change, it just needs to be updated and landed.

Comment by Andreas Dilger [ 13/Dec/17 ]

It looks like this is still a problem with at least 2.10.1 client+MDS, per LU-10369.

Comment by Peter Jones [ 18/Dec/17 ]

Hongchao

Can you please complete this work?

Thanks

Peter

Comment by Hongchao Zhang [ 11/Jan/18 ]

the patch https://review.whamcloud.com/#/c/20849/ has been updated.

Comment by Gerrit Updater [ 25/Jan/18 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/20849/
Subject: LU-8264 lod: lfs setstripe fix for pool.
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: c62ba699c51237ae1a04b59dd23201d8fe852a67

Comment by Peter Jones [ 25/Jan/18 ]

Landed for 2.11

Comment by Gerrit Updater [ 23/Feb/18 ]

James Nunez (james.a.nunez@intel.com) uploaded a new patch: https://review.whamcloud.com/31401
Subject: LU-8264 lod: lfs setstripe fix for pool.
Project: fs/lustre-release
Branch: b2_10
Current Patch Set: 1
Commit: 4820faa50e857f8a1b209673093500244cc6e4a2

Comment by Gerrit Updater [ 05/Apr/18 ]

John L. Hammond (john.hammond@intel.com) merged in patch https://review.whamcloud.com/31401/
Subject: LU-8264 lod: lfs setstripe fix for pool.
Project: fs/lustre-release
Branch: b2_10
Current Patch Set:
Commit: 585643bfe764ee236bd761ba1f824962c7940644

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