[LU-15314] set default max-inherit to 3 for default dir stripe policy if stripe count is not 0 or 1 Created: 03/Dec/21  Updated: 26/Jan/22  Resolved: 11/Jan/22

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.7.0
Fix Version/s: Lustre 2.15.0

Type: New Feature Priority: Critical
Reporter: Feng Lei Assignee: Feng Lei
Resolution: Fixed Votes: 0
Labels: easy

Issue Links:
Related
is related to LU-15307 Option to set max directory stripe co... Resolved
is related to LU-14792 DNE3: enable filesystem-wide default LMV Resolved
is related to LU-13440 DNE3: limit directory default layout ... Resolved
is related to LUDOC-501 Document (dir)stripe limits Resolved
Rank (Obsolete): 9223372036854775807

 Description   

From LU-15307 by adilger
 
In addition to limiting the stripe count used when selecting "-c -1" it also makes sense to return an error from "lfs setdirstripe" when creating a default directory striping that has a stripe count > 1 but does not have max-inherit set. There have repeatedly been problems hit when a filesystem is configured with "lfs setdirstripe -c N -D $MOUNT" (for any N > 1) causing REMOTE_PARENT_DIR to be filled or have tens of millions of entries, excessive MDT inode usage, performance issues, etc.

With automatic DNE MDT space balancing (LU-13440) the need to stripe directories by default is almost completely eliminated. It should still be possible to set this by explicitly specifying --max-inherit=N, but this is too dangerous to let users shoot themselves in the foot by accident by what "seems" like a good idea but is actually very bad over time.
Edit



 Comments   
Comment by Feng Lei [ 14/Dec/21 ]

I would suggest to set the default value of --max-inherit to a fixed value (e.g., 3) instead of unlimited (-1) for lfs setstripe -D -c N command. But if --max-inherit is specified explicitly, its value will always be accepted. A warning message can be printed too to notify the user the default value of --max-inherit.

This behavior won't change anything on a running system, and won't block existing script to deploy a new system. Even the new system will be a little different from the old ones.

But if we make --max-inherit mandatory, some existing scripts may be blocked if they do not provide --max-inherit.

adilger  Please feel free to comment.

Comment by Andreas Dilger [ 16/Dec/21 ]

I would suggest to set the default value of --max-inherit to a fixed value (e.g., 3) instead of unlimited (-1) for "lfs setstripe -D -c N" command. But if --max-inherit is specified explicitly, its value will always be accepted. A warning message can be printed to notify the user the default value of --max-inherit.

I think this would be a reasonable (and safe) option as well, given the consequences . Having a limited inheritance ("LMV_INHERIT_DEFAULT = 3") for default directory layouts with "stripe_count != 0,1" avoids users shooting themselves in the foot. "lfs setdirstripe -D" should print a warning message for layouts with --max-inherit=N, N > 4 for "stripe_count != 0,1". There shouldn't be a warning message printed for default directory layouts with "stripe_count=0,1", regardless of --max-inherit used, since this does not cause the same problems as striped directories.

chunteraa, crusan, laisiyao, any feedback on this? When the MDT space balancing/limited layout inheritance was being developed in LU-13440, I thought it was important to maintain the same behavior for "lfs setdirstripe -D ..." as existed before that patch, but in fact the "default striped directories on whole filesystem" behavior is something we don't want to keep.

Comment by Lai Siyao [ 17/Dec/21 ]

This looks reasonable to me.

Comment by Gerrit Updater [ 17/Dec/21 ]

"Feng, Lei <flei@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/45874
Subject: LU-15314 utils: set default max-inherit to 3
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 7bf5b510a88ce78d5394f3f1ad29bbc2c239196f

Comment by Gerrit Updater [ 11/Jan/22 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/45874/
Subject: LU-15314 utils: set default max-inherit to 3
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 956b4b1e0d9f18c6fe62d84e1c20268363b8159b

Comment by Peter Jones [ 11/Jan/22 ]

Landed for 2.15

Generated at Sat Feb 10 03:17:15 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.