[LU-5017] "lfs mv" loses file attributes during migration Created: 06/May/14  Updated: 16/Mar/16  Resolved: 08/May/14

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.6.0
Fix Version/s: Lustre 2.6.0, Lustre 2.8.0

Type: Bug Priority: Major
Reporter: Andreas Dilger Assignee: Di Wang
Resolution: Fixed Votes: 0
Labels: dne2

Issue Links:
Related
is related to LU-5016 clean up use of la_attr for non-attri... Resolved
Severity: 3
Rank (Obsolete): 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).



 Comments   
Comment by Andreas Dilger [ 06/May/14 ]

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.

Comment by Di Wang [ 06/May/14 ]

http://review.whamcloud.com/10240

Comment by Di Wang [ 08/May/14 ]

The patch has been landed to master

Comment by Gerrit Updater [ 05/Jan/16 ]

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

Generated at Sat Feb 10 01:47:49 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.