Results 1 to 7 of 7

Thread: How do I enable xattr?

  1. #1

    Default How do I enable xattr?

    I can't find any info anywhere. Does Opensuse 12.1 have extended attributes enabled by default in ext4? How do I even check something like that?

  2. #2
    Join Date
    Jul 2008
    Location
    Bellevue, WA
    Posts
    14,395

    Default Re: How do I enable xattr?

    On Thu, 10 May 2012 21:46:02 +0000, Maxxi12 wrote:

    > I can't find any info anywhere. Does Opensuse 12.1 have extended
    > attributes enabled by default in ext4? How do I even check something
    > like that?


    As near as I can tell, it should be enabled by default as part of ext4.

    setfattr and getfattr are the command used to manipulate extended file
    attributes.

    Jim

    --
    Jim Henderson
    openSUSE Forums Administrator
    Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

  3. #3
    Join Date
    Mar 2010
    Location
    Austin - Texas
    Posts
    10,500
    Blog Entries
    48

    Smile Re: How do I enable xattr?

    Quote Originally Posted by Maxxi12 View Post
    I can't find any info anywhere. Does Opensuse 12.1 have extended attributes enabled by default in ext4? How do I even check something like that?
    So I found several things of interest.

    1) A kernel option must be enabled to use xattr & I found this in the default kernel config in openSUSE 12.1: CONFIG_EXT4_FS_XATTR=y
    2) A fstab mount option entry for the mounting of the EXT4 partition must include: user_xattr (ie fstab entry: /dev/disk/by-id//dev/disk/by-id/ata-ST31000528AS_9VP1AEZJ-part1 / ext4 acl,user_xattr 0 1)
    3) I found a reference about using it like this: setfattr -n user.name -v val file (use man setattr for more info)
    4) There does not seem to be a command called xattr in openSUSE I can find.

    Hope this helps.

    Thank You,
    My Blog: https://forums.opensuse.org/blogs/jdmcdaniel3/

    Software efficiency halves every 18 months, thus compensating for Moore's Law

    Its James again from Austin, Texas

  4. #4
    Join Date
    Jul 2008
    Location
    Bellevue, WA
    Posts
    14,395

    Default Re: How do I enable xattr?

    On Thu, 10 May 2012 22:26:06 +0000, jdmcdaniel3 wrote:

    > 3) I found a reference about using it like this: setfattr -n user.name
    > -v val file (use man setattr for more info)


    Something I found that's of importance is that you *must* use the 'user.'
    prefix.

    I tried it on my laptop earlier today and found that adding that prefix
    let me set any arbitrary extended attribute in the filesystem.

    Jim



    --
    Jim Henderson
    openSUSE Forums Administrator
    Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

  5. #5

    Default Re: How do I enable xattr?

    Thank you. I guess if I want to configure that value, I have to install kernel-source, and use some kind of kernel configuration tool...
    Here is the config that I found: GIT Browse

    I think I rather do these steps in a VM first (if/when I need to).. How to: Compile Linux kernel 2.6

  6. #6
    Join Date
    Jul 2008
    Location
    Bellevue, WA
    Posts
    14,395

    Default Re: How do I enable xattr?

    On Fri, 11 May 2012 07:06:02 +0000, Maxxi12 wrote:

    > Thank you. I guess if I want to configure that value, I have to install
    > kernel-source, and use some kind of kernel configuration tool...
    > Here is the config that I found: 'GIT Browse'
    > (http://kernel.opensuse.org/cgit/kern...onfig?h=stable)
    >
    > I think I rather do these steps in a VM first (if/when I need to).. 'How
    > to: Compile Linux kernel 2.6'
    > (http://www.cyberciti.biz/tips/compil...kernel-26.html)


    Have you tried setting an attribute using the command I indicated?

    I think you'll find that the feature is already enabled.

    From my 12.1 system at home with a stock kernel:

    Code:
    lamuella:/proc # zcat config.gz | grep XATTR
    CONFIG_EXT3_FS_XATTR=y
    CONFIG_EXT4_FS_XATTR=y
    CONFIG_REISERFS_FS_XATTR=y
    CONFIG_TMPFS_XATTR=y
    CONFIG_JFFS2_FS_XATTR=y
    CONFIG_UBIFS_FS_XATTR=y
    CONFIG_SQUASHFS_XATTR=y
    CONFIG_CIFS_XATTR=y
    So it's enabled in the stock kernel.

    Jim
    --
    Jim Henderson
    openSUSE Forums Administrator
    Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

  7. #7
    Join Date
    Mar 2010
    Location
    Austin - Texas
    Posts
    10,500
    Blog Entries
    48

    Default Re: How do I enable xattr?

    Quote Originally Posted by Maxxi12 View Post
    Thank you. I guess if I want to configure that value, I have to install kernel-source, and use some kind of kernel configuration tool...
    Here is the config that I found: GIT Browse

    I think I rather do these steps in a VM first (if/when I need to).. How to: Compile Linux kernel 2.6
    I indicated the kernel option is enabled already AND the /home & root mounts have the option enabled by default as well. If you have any other Linux mounts in your fstab file you could enable those partitions as well. If you want to compile a kernel, why not have a look at my bash script instead if you are set on doing such a thing, but its not required?

    S.A.K.C. - SUSE Automated Kernel Compiler - Version 2.71 - Blogs - openSUSE Forums

    Thank You,
    My Blog: https://forums.opensuse.org/blogs/jdmcdaniel3/

    Software efficiency halves every 18 months, thus compensating for Moore's Law

    Its James again from Austin, Texas

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •