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

"lfs mv" loses file attributes during migration

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

            [LU-5017] "lfs mv" loses file attributes during migration

            Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/10274/
            Subject: LU-5017 idl: clean up file attribute flags
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 26fae8692eed9998aa0286749a068b67279e7163

            gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/10274/ Subject: LU-5017 idl: clean up file attribute flags Project: fs/lustre-release Branch: master Current Patch Set: Commit: 26fae8692eed9998aa0286749a068b67279e7163
            di.wang Di Wang added a comment -

            The patch has been landed to master

            di.wang Di Wang added a comment - The patch has been landed to master
            di.wang Di Wang added a comment - http://review.whamcloud.com/10240

            I'm not sure if this is the same as LU-5016, or if the "lfs mv" code just isn't trying to copy the file attributes at all.

            adilger Andreas Dilger added a comment - I'm not sure if this is the same as LU-5016 , or if the "lfs mv" code just isn't trying to copy the file attributes at all.

            People

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

              Dates

                Created:
                Updated:
                Resolved: