Christopher J. Walker
2013-Mar-23 15:59 UTC
[Lustre-discuss] ACLs and extended attributes after MDS move
I have moved the metadata server on a lustre 1.8 filesystem (previously upgraded from 1.6) to new hardware. The posix acls and extended user attributes don''t seem to have been preserved. Normally, I get something like: [root at se03]# getfacl file024a771a-9d8c-4ad6-b3b5-068cc9148239 # file: file024a771a-9d8c-4ad6-b3b5-068cc9148239 # owner: storm # group: storm user::rw- group::--- group:atlas:rw- mask::rwx other::--- [root at se03]# getfattr -d file024a771a-9d8c-4ad6-b3b5-068cc9148239 # file: file024a771a-9d8c-4ad6-b3b5-068cc9148239 user.storm.checksum.adler32="d74d9210" However these attributes seem to have been lost. What have I done wrong, and is there a way to recover? I still have the old MDS/MDT. Where are the user extended attributes stored? Are they on the MDT? Ditto the posix acls? Have I mounted the old MDT incorrectly? What I did was: # On old server mount -t ldiskfs /dev/sdb /mnt/mgs cd /mnt/mgs getfattr -R -d -m ''.*'' -P . >/mnt/installs/lustre-reinstall/ea-sn01-viamds.bak tar -czf - --sparse . >/mnt/installs/lustre-reinstall/sn01-viamds.tar.gz Then on the new server mkfs.lustre --fsname lustre_0 --mgs --mdt --reformat /dev/mapper/mpath2 mount -t ldiskfs /dev/mapper/mpath2 /mnt/mgs cd /mnt/mgs tar xzpf /mnt/installs/lustre-reinstall/sn01-viamds.tar.gz --sparse setfattr --restore=/mnt/installs/lustre-reinstall/ea-sn01-viamds.bak Then, as the MDS has moved IP address, I run a writeconf on the MDT: tunefs.lustre --param=failover.node=10.1.4.104 at tcp --erase-params --writeconf /dev/mapper/mpath2 and all the OSTs as the MDS has changed IP address. tunefs.lustre --erase-params --mgsnode=10.1.4.103 at tcp --writeconf /dev/sdb I do notice that the ea-sn01-viamds.bak file only contains entries like: trusted.lov=0s0AvRCwEAAADMHOgKAAAAAAAAAAAAAAAAAAAQAAEAAABpYR0AAAAAAAAAAAAAAAAAAAAAABEAAAAand not user.storm.checksum.adler32="d74d9210" Thanks, Chris
Christopher J. Walker
2013-Mar-25 00:23 UTC
[Lustre-discuss] ACLs and extended attributes after MDS move
On 23/03/13 15:59, Christopher J. Walker wrote:> I have moved the metadata server on a lustre 1.8 filesystem (previously > upgraded from 1.6) to new hardware. > > The posix acls and extended user attributes don''t seem to have been > preserved. >[snip]> > What I did was: > > # On old server > mount -t ldiskfs /dev/sdb /mnt/mgsThe problem is the following: Although that''s what is documented in the Lustre 1.8 manual, it seems I should have done is: mount -t ldiskfs -o user_xattr -o acl /dev/sdb /mnt/mgs to preserve the extended attributes and acls.> cd /mnt/mgs > getfattr -R -d -m ''.*'' -P .To get out of this, I''ve done the following on the old MDS getfattr -R -d -P . >aclfile and then setfattr --restore=aclfile and similarly with the acls. Chris