Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-19284

TCU: Handling NOTRASH flag behavior for directories and its successors

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Medium
    • None
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      Problems

      1. 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
      2. 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
      3. 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:

      1. Setting NOTRASH flag on a directory should only apply to an empty directory
      2. 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
      3. In addition to 3 all subdirectories and objects placed to the trash bin are cleared
      4. It is up to the user to decide how to solve the problem of orphan objects
      5. 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
      6. 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

          Activity

            People

              qian_wc Qian Yingjin
              ablagodarenko Artem Blagodarenko
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: