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
* |
env, |
|
|
struct md_object
* |
m, |
|
|
const struct lu_buf
* |
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