Managing Extended Attributes

Describes what extended attributes are, and the POSIX permissions that you need to manage them.

Extended attributes (referred to as xattrs) allow user applications to associate additional metadata with a regular file or directory. Unlike system-level inode metadata, such as file permissions or modification time, extended attributes are not interpreted by the system but are instead used by applications to store additional information about an inode. Multiple extended attributes can be associated with a single inode. The maximum size allowed for an extended attribute is 64 KB.

An extended attribute is a name-value pair, with a string name and binary value. The extended attribute names are prefixed with a namespace. For example, an xattr named myXattr in the user namespace would be specified as user.myXattr.

Limitations

  • For the five valid namespaces supported by HDFS, HPE Ezmeral Data Fabric supports the following:
    Namespace HPE Ezmeral Data Fabric Functionality
    user Commonly used by client applications. Access to these extended attributes in the user namespace is controlled by corresponding file/directory permissions. For more information, see Permissions for Extended Attributes.
    trusted Available to superusers only. Access is denied for all other users. The extended attribute is not available through userspace methods.
    NOTE
    HPE Ezmeral Data Fabric does not support the raw namespace.
  • Extended attributes cannot be associated with symbolic links. If extended attributes are used on symbolic links, they are instead applied to the symbolic link target file.
  • The preserve options of commands like cp -px and distcp -px will work on extended attributes only in the following cases:
    • With Hadoop commands such as hadoop fs.
    • On FUSE mounted file paths.
    NOTE
    Extended attributes are not supported on NFS for the HPE Ezmeral Data Fabric file paths.

Permissions for Extended Attributes

The following table lists the permissions (POSIX mode bits or Access Control Expression (ACE)s) you will need to set, retrieve, or modify extended attributes.

To... For directories, you need... For files, you need...
Set extended attributes

Mode bits: write

(OR)

ACE: addchild

Mode bits: write

(OR)

ACE: writefile

Remove extended attributes

Mode bits: write

(OR)

ACE: deletechild

Mode bits: write

(OR)

ACE: writefile

Retrieve extended attributes Mode bits: read

(OR)

ACE: readdir
Mode bits: read

(OR)

ACE: readfile