How to enable ext3 extended attributes for removable disks (for Beagle)?

ZIYAD A. M. AL-BATLY zamb at saudi.net.sa
Fri Aug 26 18:39:54 UTC 2005


On Fri, 2005-08-26 at 19:08 +0200, Mario Vukelic wrote:
> I did what you suggested, and now I am still unsure, because i get no
> ext_attr in filesystem features which was at first not surprising, since
> I didn't set it with tune2fs.
> 
> mario at phonic: ~/Desktop $ sudo tune2fs -l /dev/sdb1|grep attr
> Default mount options:    user_xattr
> mario at phonic: ~/Desktop $
Good, that should be what you want.

> 
> However, if I try to set it:
> 
> mario at phonic: ~/Desktop $ sudo tune2fs -o ext_attr /dev/sdb1
> tune2fs 1.38 (30-Jun-2005)
> Invalid mount option set: ext_attr
Because there is *no* default mount option called "ext_attr"!
"ext_attr" is a feature of the file-system, not a mount option.  My bad,
as I gave you the impression that it's a mount option!  Sorry.

> 
> So what gives? Do I need ext_attr too?  From what I get from google (not
> much) I suspect that ext_attr is maybe obsolete and in any case not
> needed if I'm only interested in user attributes for beagle - it seems
> to have more to do with ACLs.
> In fact, man mount talks about user_xattr in the filesytem-specific
> options, but not at all about ext_attr. Hmmmm....
> 
> About user_xattr/nouser_xattr man says, "Support "user." extended
> attributes (or not)", which again makes me believe it is enough.
> 
As I said above, your system now should be ready to use the Extended
Attributes needed for Beagle (and hopefully, other things in the near
future).  Just test Beagle and see if it really works or not.

If you need farther confirmation, install the package "attr", and go
inside a directory on the file-system we want to test "xattr", and do:
        touch my_file
        setfattr -n user.comment -v 'xattr is working!' my_file
        getfattr my_file
        getfattr -n user.comment my_file

Here's what happens when a run the above commands on my system:
        zamb ~ $ 
        zamb ~ $ touch my_file
        zamb ~ $ setfattr -n user.comment -v 'xattr is working!' my_file
        zamb ~ $ getfattr my_file
        # file: my_file
        user.comment
        
        zamb ~ $ getfattr -n user.comment my_file
        # file: my_file
        user.comment="xattr is working!"
        
        zamb ~ $ 
        

> Thank you,
> Mario
>
I hope it works for you, and enjoy Beagle!
Ziyad.





More information about the ubuntu-users mailing list