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

TCU: Trash Can/Undelete for Lustre

XMLWordPrintable

    • 3
    • 9223372036854775807

      Introduction

      If files are accidentally deleted from a file system, an application may be interrupted and the user data may be permanently lost. The trash can (also called "undelete" or "recycle bin") is a recommended feature in file systems that acts as a virtual trash can, allowing users to store deleted files temporarily before permanently deleting them. It provides a way to restore or retrieve deleted files if needed.

      Once the trash can feature is enabled, when a user deletes a file from a file system, it is not actually deleted but moved to the trash can, deleted files and directories are temporarily stored in the trash can. The trash can may be manually emptied or once it is full, it will remove the oldest files first. Additionally, items in the trash can may be restored or retrieved if they are still there.

      Trash Can/Undelete Functionalities

      The trash can should including the following functionalities:

      • List "undeleted" files in the trash can;
      • After a file is deleted and moved into trash can, the quota for this file should be accounted and updated (reduced) accordingly;
      • The trash can, and all files therein are not visible in the namespace of the file system;
      • Restore a file in the trash can. This will restore a file to its original path. The corresponding quota account should be updated also;
      • Delete a file in the trash can. This will finally remove the file from the file system and free the used space. The file is now unrecoverable;
      • Empty the trash can. This will remove all files in the trash can;
      • A user can restore files from trash can within the specified retention period. By this way, a file can be kept "undeleted" under a pre-defined configurable grace period.
      • Enable/disable trash can feature on a entire file system;
      • A administrator can enable/disable trash can feature on a specified directory;

      Deleted files can no longer be restored from the trash can when:

      • A file (or directory) is deleted again from the trash can. In other words it have been deleted twice. The first deletion only moves the file to the trash can. The second deletion actually removes the file from the file system.
      • The trash can is emptied of all of its contents.

      The Trash Can/Undelete HLD contains details of the design and implementation of this feature.

        1.
        TCU: "lfs trash" user commands Technical task Open WC Triage
        2.
        TCU: add NOTRASH attribute for files and directories Technical task Resolved Qian Yingjin
        3.
        TCU: DNE2 striped directory handling Technical task Open WC Triage
        4.
        TCU: remote dir/file handling for Trash Can Technical task Open Qian Yingjin
        5.
        TCU: space and quota accounting for trash Technical task Open Qian Yingjin
        6.
        TCU: handling fscrypt files in Trash Can Technical task Open WC Triage
        7.
        TCU: handle nodemaps for user subdirectories Technical task Open Qian Yingjin
        8.
        TCU: Handling orphan objects moving into Trash Can Technical task Open Qian Yingjin
        9.
        TCU: Repeated deletion of same filename Technical task Open Qian Yingjin
        10.
        TCU: Add support for file deletion via rename() Technical task Open Qian Yingjin
        11.
        TCU: support files into trash on 'open(O_TRUNC)' or 'truncate(0)' Technical task Open Qian Yingjin
        12.
        TCU: set directory permissions on pFID stub, restore UID/GID/PROJID on unrm Technical task Open WC Triage
        13.
        TCU: parallel directory traversal for unrm Technical task Open WC Triage
        14.
        TCU: Handle symbol link files upon the last unlink Technical task Open Qian Yingjin
        15.
        TCU: error handling and recovery for failed TCU operations Technical task Open WC Triage
        16.
        TCU: Unify the directory traversal mechanism Technical task Open WC Triage
        17.
        TCU: Rename ".Trash" with ".lustre_trash" to reduce conflict possibilty Technical task Open WC Triage
        18.
        TCU: misc code cleanup Technical task Open WC Triage
        19.
        TCU:Repeated deletion of same name file failed: "cannot remove 'filename': File exists" Technical task Open Qian Yingjin
        20.
        Repeated deletion of same name directory failed: "cannot remove 'dirname': File exists" Technical task Open Qian Yingjin
        21.
        TCU: Clean up files from the Trash Can Technical task Open Emoly Liu
        22.
        TCU: .Trash dir can't be found in "uid" type Technical task Open Qian Yingjin
        23.
        TCU: can't stat the file correctly in the trash after remove it again Technical task Open Qian Yingjin
        24.
        TCU: Tolerate ENOSPC failure when moving files into Trash Can Technical task Open Qian Yingjin
        25.
        Access Trash Can from subdir (fileset) mount Technical task Open Qian Yingjin
        26.
        TCU: lfs trash state returns error on symlink Technical task Open Qian Yingjin
        27.
        TCU: ENOSPC-triggered ltrash_purge upcall Technical task In Progress Emoly Liu
        28.
        TCU: lfs trash unrm should work on relative path Technical task Open WC Triage
        29.
        TCU: notrash tag doesn't work on symlink Technical task Open Qian Yingjin
        30.
        TCU: dir's mode changed after restore Technical task Open Qian Yingjin
        31.
        TCU: file lost its extended attribute after retrieve from Trash Technical task Open Qian Yingjin
        32.
        TCU: Space accounting with Trash Can enabled is not correct Technical task Open Qian Yingjin
        33.
        TCU: Trash Can and fscrypt Files and Directories Technical task Open Qian Yingjin
        34.
        TCU: non-root user cannot restore or unrm file owned by them Technical task Open Qian Yingjin
        35.
        Create a man4 documentation for the TCU proc parameter Requirement task Open Xiyang Wang

            qian_wc Qian Yingjin
            qian_wc Qian Yingjin
            Votes:
            0 Vote for this issue
            Watchers:
            23 Start watching this issue

              Created:
              Updated: