We tried this a few years ago (with lustre 2.1) but were unable to
deploy user extended attributes. You may need to add user_xattr option
when mounting both the client & MDT volume.
regards,
chris hunter
chris.hunter(a)yale.edu
On 2016/01/04, 22:52, "Linda J"
<linda.joe(a)calligotech.com> wrote:
> Hi Marek,
> Thanks for your reply,
> No, it is not mounted with user_xattr option.
>
> Now, I got another doubt if lustre file system is not mounted with
> user_xattr, how then it accesses the extended attributes in the inode
> and stores the object-id information in it?
The "user_xattr" mount option is needed for regular users to store xattrs
in the filesystem, so that the administrator can control whether users can
consume extra space on the MDT with arbitrary xattrs or not.
The Lustre xattrs that store the file layout, ACLs, and other system
xattrs do not require the user_xattr mount option to work.
Cheers, Andreas
> It would be really helpful for me in understanding the lustre file
> system, if this doubt of mine is clarified too.
>
> Thanks,
> Linda J
>
> On Monday 04 January 2016 05:50 PM, Marek Magry? wrote:
>> 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.Lust
>>>
re-discuss%3E6125?header=quotebody&part=1.1.2.2&filename=structlu__env.h
>>> tml>
>>> * /env/,
>>>
>>>
>>> struct md_object
>>>
>>> <imap://ymmagrys@mx.grid.cyfronet.pl:993/fetch%3EUID%3E.INBOX.lists.Lust
>>>
re-discuss%3E6125?header=quotebody&part=1.1.2.3&filename=structmd__objec
>>> t.html>
>>> * /m/,
>>>
>>>
>>> const struct lu_buf
>>>
>>> <imap://ymmagrys@mx.grid.cyfronet.pl:993/fetch%3EUID%3E.INBOX.lists.Lust
>>>
re-discuss%3E6125?header=quotebody&part=1.1.2.4&filename=structlu__buf.h
>>> tml>
>>> * /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