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

"lfs mv" loses file attributes during migration

    XMLWordPrintable

Details

    • 3
    • 13886

    Description

      Migrating a directory tree using "lfs mv" drops the file attributes stored on both files and directories.

      For example, setting the "noatime" attribute on a directory and a file therein, and then migrating the directory to another MDT clears this flag:

      [root@sookie-gig tests]# lsattr -a /mnt/testfs/d0.new
      ---------------- /mnt/testfs/d0.new/.
      ---------------- /mnt/testfs/d0.new/..
      ---------------- /mnt/testfs/d0.new/f0.new
      [root@sookie-gig tests]# chattr +SAD /mnt/testfs/d0.new /mnt/testfs/d0.new/f0.new
      [root@sookie-gig tests]# lsattr -a /mnt/testfs/d0.new
      --SD---A-------- /mnt/testfs/d0.new/.
      ---------------- /mnt/testfs/d0.new/..
      --S----A-------- /mnt/testfs/d0.new/f0.new
      [root@sookie-gig tests]# lfs mv -M 1 /mnt/testfs/d0.new
      [root@sookie-gig tests]# lsattr -a /mnt/testfs/d0.new
      ---------------- /mnt/testfs/d0.new/f0.new
      ---------------- /mnt/testfs/d0.new/.
      ---------------- /mnt/testfs/d0.new/..
      

      Fortunately, the IMMUTABLE and APPEND flags cannot be lost in this manner because the MDS blocks files/directories with these attributes from being migrated, so this only affects secondary attributes (noatime, sync write, dirsync).

      Attachments

        Issue Links

          Activity

            People

              di.wang Di Wang
              adilger Andreas Dilger
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: