Details
-
Improvement
-
Resolution: Unresolved
-
Medium
-
None
-
None
-
None
-
3
-
9223372036854775807
Description
Problems
- It may generate orphan trash objects without any valid Lustre parent ancestor in Trash Can, as its parent ancestor was deleted due to the setting of NOTRASH flag
- What should we do if some of the parent directories are marked as NOTRASH, but we want to clear NOTRASH for a file or a directory? How to address "gaps" in NOTRASH flags. All files and directories under the NOTRASH directory must have this flag, or problem 1 happens
- Whether setting NOTRASH on a directory should immediately empty the trash on that directory, or if it only applies to files deleted afterwards.
Possible solutions:
- Setting NOTRASH flag on a directory should only apply to an empty directory
- When set NOTRASH on a file, the command needs to scan the whole sub-tree and clear the trash files or directories recursively and then mark them as NOTRASH
- In addition to 3 all subdirectories and objects placed to the trash bin are cleared
- It is up to the user to decide how to solve the problem of orphan objects
- If there are child directories that do not have NOTRASH set, then they would be put into the Trash Can normally, until the top-level NOTRASH directory was hit. In that case, either the subdirectories in Trash are "orphan" (but will still be visible via pFID stub in top-level .lustre/Trash directory), and should still be cleaned up when they become old
- We can mark it as LUSTRE_TRASH_PATH_FL, and the "pFID" of the dir on the trash is added an extent attribute containing the full file path: fid2path $pFID, we have a patch on LU-18456 for it:https://review.whamcloud.com/c/fs/lustre-release/+/57118.
Attachments
Issue Links
- is related to
-
LU-18958 TCU: add NOTRASH attribute for files and directories
-
- Open
-