[LU-692] error setting xattrs moving read-only files Created: 20/Sep/11  Updated: 31/Oct/11  Resolved: 31/Oct/11

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 1.8.6
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Ned Bass Assignee: Andreas Dilger
Resolution: Duplicate Votes: 0
Labels: None

Rank (Obsolete): 9729

 Description   

When moving (or cp'ing with --preserver=all) read-only files out of a lustre filesystem, errors are produced as follows

% touch /p/lscratcha/bass6/asdf
% chmod 400 /p/lscratcha/bass6/asdf
% mv /p/lscratcha/bass6/asdf /tmp
mv: setting attribute `lustre.lov' for `lustre.lov': Permission denied
mv: setting attribute `lustre.lov' for `lustre.lov': Permission denied

This isn't really a bug, but rather an unfortunate consequence of the design decision to use the 'lustre' namespace for extended attributes. If Lustre instead used the conventional 'system' namespace then the utilities wouldn't try to preserve them and the errors would be avoided. While harmless, the errors do cause some alarm to users who then wonder if their files have been corrupted. It would be nice to handle this more gracefully in future designs.



 Comments   
Comment by Andreas Dilger [ 20/Sep/11 ]

The root of this issue is that /tmp has gained xattrs, but it isn't happy with the lustre.* attributes. Is this related to read-only files at all? If yes, then it would seem to be an error in the cp/mv utility to try and set the xattrs after the file is changed read-only.

Using the "system." namespace is troublesome, because it cannot be accessed from userspace at all, and this would make it impossible to backup/restore the file layout with tar --xattr. We originally just used the "trusted." namespace (which allows both userspace and kernel xattr access), but it is limited to root only so regular users could not use tar (in RHEL6 or lustre-patched to save/restore xattrs first) to backup/restore their files and maintain striping.

Comment by Ned Bass [ 20/Sep/11 ]

> The root of this issue is that /tmp has gained xattrs, but it isn't happy with the lustre.* attributes.

I should have mentioned the same error occurs if read-only files are moved between different Lustre filesystems as well.

> Is this related to read-only files at all?

Yes, if the file is writeable the lsetxattr() call instead returns EOPNOTSUPP, but the error is not reported back to the user.

% strace -e lsetxattr mv /p/lscratcha/bass6/asdf /tmp
lsetxattr("/tmp/asdf", "lustre.lov", "\xd0\x0b\xd1\x0b\x01\x00\x00\x00\x89\x08\x01\x1b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x02\x00\x00\x00\x95\x86\xdc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00^\x00\x00\x00&\xf1\xd7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf9\x00\x00", 80, 0) = -1 EOPNOTSUPP (Operation not supported)

Comment by Ned Bass [ 23/Sep/11 ]

Andreas, I noticed on our 2.1 test filesystem the following EAs are set

trusted.lma
trusted.link
trusted.lov
lustre.lov

whereas on 1.8 only lustre.lov is. Are the trusted attributes supposed to be there or is this a regression?

Comment by Andreas Dilger [ 25/Sep/11 ]

I believe that this is a regression, as described in LU-532.

Comment by Build Master (Inactive) [ 24/Oct/11 ]

Integrated in lustre-b1_8 » x86_64,client,el5,inkernel #149
LU-692 ptlrpc: don't LASSERT on larger ptlrpc_body

Johann Lombardi : 1cf716f1521a2beacafd0d24c4deac0c9d7af662
Files :

  • lustre/include/lustre/lustre_idl.h
  • lustre/utils/wirecheck.c
  • lustre/utils/wiretest.c
  • lustre/ptlrpc/pack_generic.c
  • lustre/ptlrpc/wiretest.c
Comment by Peter Jones [ 24/Oct/11 ]

http://review.whamcloud.com/#change,1584

Comment by Build Master (Inactive) [ 24/Oct/11 ]

Integrated in lustre-b1_8 » x86_64,client,el5,ofa #149
LU-692 ptlrpc: don't LASSERT on larger ptlrpc_body

Johann Lombardi : 1cf716f1521a2beacafd0d24c4deac0c9d7af662
Files :

  • lustre/ptlrpc/wiretest.c
  • lustre/utils/wirecheck.c
  • lustre/ptlrpc/pack_generic.c
  • lustre/include/lustre/lustre_idl.h
  • lustre/utils/wiretest.c
Comment by Build Master (Inactive) [ 24/Oct/11 ]

Integrated in lustre-b1_8 » x86_64,client,el6,inkernel #149
LU-692 ptlrpc: don't LASSERT on larger ptlrpc_body

Johann Lombardi : 1cf716f1521a2beacafd0d24c4deac0c9d7af662
Files :

  • lustre/utils/wirecheck.c
  • lustre/ptlrpc/wiretest.c
  • lustre/utils/wiretest.c
  • lustre/include/lustre/lustre_idl.h
  • lustre/ptlrpc/pack_generic.c
Comment by Build Master (Inactive) [ 24/Oct/11 ]

Integrated in lustre-b1_8 » x86_64,server,el5,ofa #149
LU-692 ptlrpc: don't LASSERT on larger ptlrpc_body

Johann Lombardi : 1cf716f1521a2beacafd0d24c4deac0c9d7af662
Files :

  • lustre/utils/wirecheck.c
  • lustre/ptlrpc/wiretest.c
  • lustre/utils/wiretest.c
  • lustre/ptlrpc/pack_generic.c
  • lustre/include/lustre/lustre_idl.h
Comment by Build Master (Inactive) [ 24/Oct/11 ]

Integrated in lustre-b1_8 » i686,client,el5,inkernel #149
LU-692 ptlrpc: don't LASSERT on larger ptlrpc_body

Johann Lombardi : 1cf716f1521a2beacafd0d24c4deac0c9d7af662
Files :

  • lustre/utils/wiretest.c
  • lustre/utils/wirecheck.c
  • lustre/ptlrpc/wiretest.c
  • lustre/include/lustre/lustre_idl.h
  • lustre/ptlrpc/pack_generic.c
Comment by Build Master (Inactive) [ 24/Oct/11 ]

Integrated in lustre-b1_8 » i686,client,el5,ofa #149
LU-692 ptlrpc: don't LASSERT on larger ptlrpc_body

Johann Lombardi : 1cf716f1521a2beacafd0d24c4deac0c9d7af662
Files :

  • lustre/ptlrpc/wiretest.c
  • lustre/include/lustre/lustre_idl.h
  • lustre/utils/wirecheck.c
  • lustre/utils/wiretest.c
  • lustre/ptlrpc/pack_generic.c
Comment by Build Master (Inactive) [ 24/Oct/11 ]

Integrated in lustre-b1_8 » x86_64,server,el5,inkernel #149
LU-692 ptlrpc: don't LASSERT on larger ptlrpc_body

Johann Lombardi : 1cf716f1521a2beacafd0d24c4deac0c9d7af662
Files :

  • lustre/utils/wiretest.c
  • lustre/ptlrpc/wiretest.c
  • lustre/include/lustre/lustre_idl.h
  • lustre/ptlrpc/pack_generic.c
  • lustre/utils/wirecheck.c
Comment by Build Master (Inactive) [ 24/Oct/11 ]

Integrated in lustre-b1_8 » x86_64,client,ubuntu1004,inkernel #149
LU-692 ptlrpc: don't LASSERT on larger ptlrpc_body

Johann Lombardi : 1cf716f1521a2beacafd0d24c4deac0c9d7af662
Files :

  • lustre/ptlrpc/wiretest.c
  • lustre/utils/wiretest.c
  • lustre/ptlrpc/pack_generic.c
  • lustre/include/lustre/lustre_idl.h
  • lustre/utils/wirecheck.c
Comment by Build Master (Inactive) [ 24/Oct/11 ]

Integrated in lustre-b1_8 » i686,client,el6,inkernel #149
LU-692 ptlrpc: don't LASSERT on larger ptlrpc_body

Johann Lombardi : 1cf716f1521a2beacafd0d24c4deac0c9d7af662
Files :

  • lustre/ptlrpc/pack_generic.c
  • lustre/ptlrpc/wiretest.c
  • lustre/include/lustre/lustre_idl.h
  • lustre/utils/wiretest.c
  • lustre/utils/wirecheck.c
Comment by Build Master (Inactive) [ 24/Oct/11 ]

Integrated in lustre-b1_8 » i686,server,el5,ofa #149
LU-692 ptlrpc: don't LASSERT on larger ptlrpc_body

Johann Lombardi : 1cf716f1521a2beacafd0d24c4deac0c9d7af662
Files :

  • lustre/ptlrpc/wiretest.c
  • lustre/include/lustre/lustre_idl.h
  • lustre/utils/wirecheck.c
  • lustre/ptlrpc/pack_generic.c
  • lustre/utils/wiretest.c
Comment by Build Master (Inactive) [ 24/Oct/11 ]

Integrated in lustre-b1_8 » i686,server,el5,inkernel #149
LU-692 ptlrpc: don't LASSERT on larger ptlrpc_body

Johann Lombardi : 1cf716f1521a2beacafd0d24c4deac0c9d7af662
Files :

  • lustre/utils/wirecheck.c
  • lustre/utils/wiretest.c
  • lustre/include/lustre/lustre_idl.h
  • lustre/ptlrpc/pack_generic.c
  • lustre/ptlrpc/wiretest.c
Comment by Andreas Dilger [ 25/Oct/11 ]

My mistake - the above patch should have been attributed to LU-694 and not this bug.

Comment by Peter Jones [ 31/Oct/11 ]

Duplicate of LU532

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