Hello,
Is your filesytem mounted with user_xattr option?
Cheers,
Marek
W dniu 04.01.2016 o 12:25, Linda J pisze:
Hiii,
I was trying to add extended attributes to a file in Lustre file system
using the following methods but could not succeed, as a normal user.
Method #1
The below code fragment run from lustre client always shows "setxattr:
not supported error" and asks me to be a root and modify the /etc/fstab file
name = "user.test_name";
//value = (void) 0;
value = 0;
if (setxattr(argv[1],name,&value,sizeof(value),
XATTR_CREATE)==-1){
if(errno==ENOTSUP)
perror("setxattr: not supported error");
exit(EXIT_FAILURE);
}
Method #2
I tried using the below function (which does the same action as above),
but lustre says "client code should not depend on md_object.h".
static int mo_xattr_set ( const struct lu_env
<imap://ymmagrys@mx.grid.cyfronet.pl:993/fetch%3EUID%3E.INBOX.lists.Lustre-discuss%3E6125?header=quotebody&part=1.1.2.2&filename=structlu__env.html>
* /env/,
struct md_object
<imap://ymmagrys@mx.grid.cyfronet.pl:993/fetch%3EUID%3E.INBOX.lists.Lustre-discuss%3E6125?header=quotebody&part=1.1.2.3&filename=structmd__object.html>
* /m/,
const struct lu_buf
<imap://ymmagrys@mx.grid.cyfronet.pl:993/fetch%3EUID%3E.INBOX.lists.Lustre-discuss%3E6125?header=quotebody&part=1.1.2.4&filename=structlu__buf.html>
* /buf/,
const char * /name/,
int /flags/
)
Is there any way to modify the extended attribute of lustre file as a
normal user? Any help or guidance or tip would be appreciated.
--
Thanks & Regards,
Linda J
_______________________________________________
HPDD-discuss mailing list
HPDD-discuss(a)lists.01.org
https://lists.01.org/mailman/listinfo/hpdd-discuss
--
Marek Magrys
ACC Cyfronet AGH-UST