[LU-17299] DNE3: disable new regular file creation on MDTs mounted with 'no_create' Created: 19/Nov/23  Updated: 22/Jan/24

Status: Open
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.14.0, Lustre 2.12.4
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: Andreas Dilger Assignee: WC Triage
Resolution: Unresolved Votes: 0
Labels: dne3, medium

Issue Links:
Cloners
Clones LU-12998 DNE3: tunable to disable directory cr... Resolved
Related
is related to LU-12025 Adding OST may cause EIO - delay acti... Resolved
is related to LU-16024 Allow permanently removing an MDT fro... Open
is related to LU-7668 permanently remove deactivated OSTs f... Resolved
Rank (Obsolete): 9223372036854775807
Epic Link: MDT rebalance v3

 Description   

In order to allow draining an MDT for removal from the filesystem, or to disable it temporarily, the "mdt.*.no_create" parameter should be set on the MDT to let clients/MDS know that it should be skipped.

However, the no_create parameter currently only stops new directory creates on that MDT. If a client does try to create a file or directory on the MDT, it will currently be allowed.

Instead, the MDT should return an error like -EREMOTE if that would work with the existing clients, or preferably a unique code like -ENOANO or -EBADRQC that makes it clear the client should use a different MDT for creation. We should not use -EROFS to indicate the MDT cannot be used, since that would be returned to the application and the create would fail. We might also consider -ENOSPC to have the client try a different MDT, since we would also want the client to do this if the MDT was actually out of space.

Creating remote subdirectories to avoid a specific MDT was implemented in LU-12998, but avoiding the creation of new files or directory entries in an existing directory still needs to be implemented.

One solution would be to turn the directory into a striped directory with a shard on another MDT with the LMV_HASH_FLAG_MIGRATION flag set, and then create all new inodes and directory entries in the new MDT shard. That wouldn't affect existing inodes in the directory, but would prevent all new inodes from being allocated on that MDT in that directory. Something similar would need to be done during file migration anyway, so a later "lfs migrate -m" of that directory would "resume" the migration and move any remaining inodes on the disabled MDT.


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