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

TCU: implement virtual ".Trash" subdirectory for undelete

Details

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

    Description

      It would be very useful to have a virtual ".Trash" subdirectory accessible in each directory in the filesystem that can be used to browse files/directories in the trash can and access them for recovery.

      The FID of the .Trash directory would be derived from the FID of the parent directory (pFID), by looking up the corresponding "stub" directory with the name ".lustre/trash/pFID". Essentially this is just a virtual shortcut to .lustre/trash/pFID that is accessible in each directory if specified by name, though it is not visible in each directory to avoid issues with "rm -r", backups, etc.

      It isn't possible that the .Trash directory is a symlink to .lustre/trash/pFID because the .lustre directory is in the root of the filesystem, and may be inaccessible from the mountpoint on the client.

      Attachments

        Issue Links

          Activity

            [LU-18800] TCU: implement virtual ".Trash" subdirectory for undelete
            timday Tim Day added a comment - freedesktop spec for Trash https://specifications.freedesktop.org/trash-spec/latest/

            Since this feature potentially impacts user workloads, it should be possible to disable the virtual ".Trash" directory lookup on a client, in case users have e.g. accessed the Lustre mountpoint via NFS re-export to a Mac or similar. The ".Trash" directory should be enabled by default, but have a parameter like "llite.*.trash_dir_enable" that enables and disables the virtual directory lookup.

            It would be preferable if this could be tuned on a per-client basis with an "llite" parameter, but if that is not practical then an "mdd" parameter would also be Ok.

            adilger Andreas Dilger added a comment - Since this feature potentially impacts user workloads, it should be possible to disable the virtual " .Trash " directory lookup on a client, in case users have e.g. accessed the Lustre mountpoint via NFS re-export to a Mac or similar. The " .Trash " directory should be enabled by default, but have a parameter like " llite.*.trash_dir_enable " that enables and disables the virtual directory lookup. It would be preferable if this could be tuned on a per-client basis with an "llite" parameter, but if that is not practical then an "mdd" parameter would also be Ok.

            "Qian Yingjin <qian@ddn.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/58571
            Subject: LU-18800 trash: forbid to create a file with name ".Trash"
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 7859c752c8cbcb559180f973fbbbb0ede80f9798

            gerrit Gerrit Updater added a comment - "Qian Yingjin <qian@ddn.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/58571 Subject: LU-18800 trash: forbid to create a file with name ".Trash" Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 7859c752c8cbcb559180f973fbbbb0ede80f9798

            "Qian Yingjin <qian@ddn.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/58493
            Subject: LU-18800 trash: implement virtual ".Trash" subdir for undelete
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 029a4d2f9f7eafb9e1d335bcdc318ca9b353e695

            gerrit Gerrit Updater added a comment - "Qian Yingjin <qian@ddn.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/58493 Subject: LU-18800 trash: implement virtual ".Trash" subdir for undelete Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 029a4d2f9f7eafb9e1d335bcdc318ca9b353e695

            People

              wc-triage WC Triage
              adilger Andreas Dilger
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated: