Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-18456 TCU: Trash Can/Undelete for Lustre
  3. LU-19583

TCU:Repeated deletion of same name file failed: "cannot remove 'filename': File exists"

    XMLWordPrintable

Details

    • Technical task
    • Resolution: Unresolved
    • Medium
    • None
    • None
    • None
    • lustre release: 2.16.0_ddn37
    • 2
    • 9223372036854775807

    Description

      Repeated deletion of files with the same name can fail in certain scenarios. Please refer to the following test case:

      1. Create the following directory structure  
       

         [root@ai400-vm00 trash_1]# tree  
         .  
         ├── file1  
         └── subdir  
             └── file1  
      

      2. Delete all files in the test directory  

         [root@ai400-vm00 trash_1]# rm -rf ./*  
      

      3. Restore `.Trash/subdir/file1` back to `./file1`  

         [root@ai400-vm00 trash_1]# lfs trash mv .Trash/subdir/file1 ./file1  
         [root@ai400-vm00 trash_1]# cat file1  
         sub_file1  
      

         

      4. Delete the `file1` that was just restored  

         [root@ai400-vm00 trash_1]# rm file1  
         rm: remove regular file 'file1'? yes  
         rm: cannot remove 'file1': File exists  
      

         

      At this point, `rm` reports the error: cannot remove 'file1': File exists  
      Moreover, the restored `file1` has been permanently deleted and did NOT go into .Trash

      Attachments

        Activity

          People

            qian_wc Qian Yingjin
            tozhang Tong Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: