mar-file-system / marfs

MarFS provides a scalable near-POSIX file system by using one or more POSIX file systems as a scalable metadata component and one or more data stores (object, file, etc) as a scalable data component.
Other
96 stars 27 forks source link

user unable to set Extended Attributes #150

Closed gsparrow closed 8 years ago

gsparrow commented 8 years ago

In the MarFS test plan on page 13 it states

The user shall be able to write, print, delete, and clear non-MarFS xattrs.

I am unable to set a non-MarFS Extended attribute, as both root and as Jenkins in the FUSE mounted marfs. The Jenkins test is "MarFS_Extended_Attributes" and I have added it to the view "basic tests for marfs"

For those without access to the Jenkins server, the script creates a unifile and verifies that it is correct, then runs the command setfattr -n text_xattr1 -v "test xattr value 1" file_name.txt. the returns setfattr: file_name.txt: Operation not supported

gregorygeller commented 8 years ago

I'll run my tests against the latest build and let you know what I find today as well.

Greg

From: George Sparrow notifications@github.com<mailto:notifications@github.com> Reply-To: mar-file-system/marfs reply@reply.github.com<mailto:reply@reply.github.com> Date: Thursday, August 11, 2016 at 12:08 PM To: mar-file-system/marfs marfs@noreply.github.com<mailto:marfs@noreply.github.com> Subject: [mar-file-system/marfs] user unable to set Extended Attributes (#150)

In the MarFS test plan on page 13 it states

The user shall be able to write, print, delete, and clear non-MarFS xattrs.

I am unable to set a non-MarFS Extended attribute, as both root and as Jenkins in the FUSE mounted marfs. The Jenkins test is "MarFS_Extended_Attributes" and I have added it to the view "basic tests for marfs"

For those without access to the Jenkins server, the script creates a unifile and verifies that it is correct, then runs the command setfattr -n text_xattr1 -v "test xattr value 1" file_name.txt. the returns setfattr: file_name.txt: Operation not supported

You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/mar-file-system/marfs/issues/150, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AHb-7QI5XxJElDfo6wEIoUwKrf2vwCNZks5qe2UGgaJpZM4JiZCB.

wfvining commented 8 years ago

I did a little poking around, and it appears that if you use the XFS specific command attr you can set your own extended attributes. setfattr and getfattr are supposed to be filesystem independent commands, but it looks like setfattr does not work with gpfs (or MarFS). It is not clear to me why this is the case, because if you trace the calls made by fuse in the debugger, they follow the same path in MarFS.

getfattr and attr both to work read the xattrs.

gregorygeller commented 8 years ago

Oh I see what you are doing. I had the same problem.

Don't use setfattr. Instead, use:

attr -s -V "xattr value" /marfs/file/name

So,

attr -s test_xattr1 -V "test xattr value 1" /marfs/file/name

Use the following to list, get, and remove xattrs:

attr -l /marfs/file/name attr -g test_xattr /marfs/file/name attr -r test_xattr /marfs/file/name

All of this works on cc-fta

Greg

From: Gregory Geller gregory.geller@lanl.gov<mailto:gregory.geller@lanl.gov> Date: Friday, August 12, 2016 at 8:21 AM To: mar-file-system/marfs reply@reply.github.com<mailto:reply@reply.github.com>, mar-file-system/marfs marfs@noreply.github.com<mailto:marfs@noreply.github.com> Subject: Re: [mar-file-system/marfs] user unable to set Extended Attributes (#150)

I'll run my tests against the latest build and let you know what I find today as well.

Greg

From: George Sparrow notifications@github.com<mailto:notifications@github.com> Reply-To: mar-file-system/marfs reply@reply.github.com<mailto:reply@reply.github.com> Date: Thursday, August 11, 2016 at 12:08 PM To: mar-file-system/marfs marfs@noreply.github.com<mailto:marfs@noreply.github.com> Subject: [mar-file-system/marfs] user unable to set Extended Attributes (#150)

In the MarFS test plan on page 13 it states

The user shall be able to write, print, delete, and clear non-MarFS xattrs.

I am unable to set a non-MarFS Extended attribute, as both root and as Jenkins in the FUSE mounted marfs. The Jenkins test is "MarFS_Extended_Attributes" and I have added it to the view "basic tests for marfs"

For those without access to the Jenkins server, the script creates a unifile and verifies that it is correct, then runs the command setfattr -n text_xattr1 -v "test xattr value 1" file_name.txt. the returns setfattr: file_name.txt: Operation not supported

You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/mar-file-system/marfs/issues/150, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AHb-7QI5XxJElDfo6wEIoUwKrf2vwCNZks5qe2UGgaJpZM4JiZCB.

thewacokid commented 8 years ago

I have an open PMR with IBM to determine why setfattr isn't working as intended.

thewacokid commented 8 years ago

This is our fault - GPFS enforces the use of proper attribute names. man 5 xattr explains:

EXTENDED ATTRIBUTE NAMESPACES Attribute names are zero-terminated strings. The attribute name is always specified in the fully qualified namespace.attribute form, eg. user.mime_type, trusted.md5sum, system.posix_acl_access, or security.selinux.

The namespace mechanism is used to define different classes of extended attributes. These different classes exist for several reasons, e.g. the permissions and capabilities required for manipulating extended attributes of one namespace may differ to another.

Currently the security, system, trusted, and user extended attribute classes are defined as described below. Additional classes may be added in the future.

[root@cnfs2 ~]# setfattr -n "user.test" -v "this is a test value" /gpfstmnt/archive/dbonnie/nohup.out [root@cnfs2 ~]# getfattr /gpfstmnt/archive/dbonnie/nohup.out getfattr: Removing leading '/' from absolute path names file: gpfstmnt/archive/dbonnie/nohup.out user.test