Details
-
Improvement
-
Resolution: Unresolved
-
Major
-
None
-
Lustre 2.14.0, Lustre 2.16.0
-
None
-
3
-
9223372036854775807
Description
When migrating files off an OST, whether due to end of life hardware replacement, in advance of lengthy maintenance actions, etc. it is possible to directly scan the OST filesystem for objects that need to be migrated, and use the parent (MDT) FID in the "trusted.fid" xattr to identify which MDT file needs to be migrated and have the layout updated to reference the replacement object on another OST.
However, for OST objects that have never been modified by a client (e.g. a 4-stripe file that only had 2 MB written) would leave "unclaimed" zero-length OST objects with no identifying information to do the reverse mapping to the MDT inode. This may result in an OST not reporting any objects in use when scanned, but if the OST is removed then access to the file referencing these objects (e.g. stat()) will return an error (-ENOENT).
In such cases, it would be useful for the client to send an OST_SETATTR or similar RPC for objects that were never modified that contains the parent FID and other identifiers, as is done with OST_WRITE and OST_SETATTR RPCs generated by chown, chgrp, lfs project, etc.
In order to retroactively update OST objects that are missing the parent FID, it would be possible to detect this during OST_GETATTR, OST_READ, OST_PUNCH and similar RPCs to update the trusted.fid with the parent FID information, if the OST is not mounted read-only.
This update could potentially schedule a workqueue task (outside of the current RPC processing) to avoid blocking the RPC processing for read-only RPC threads. While the overhead will mostly be only the first time this functionality is deployed when these objects are accessed the first time, or in rare cases where the objects are allocated to a new file but no IO is done to them, any kind of journaled write operation on these threads could lead to significant RPC processing delays, which is undesirable.
"Marc Vef <mvef@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/59208
Subject: LU-18756 sec: add resource id check to oss and mds
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 771cef973e86996a37df58a5868623bace6c6431