mmlsattr command
Queries file attributes.
Synopsis
mmlsattr [-L] [-l]
[-d | --dump-attr]
[-n AttributeName | --get-attr AttributeName]
[-X | --hex-attr] [--hex-attr-name]
Filename[ Filename...]
Availability
Available on all IBM Spectrum Scale™ editions.
Description
Use the mmlsattr command to display attributes of a file.
Results
For the specified
file, the mmlsattr command lists:
- The current number of copies of data for a file and the maximum value
- The number of copies of the metadata for a file and the maximum value
- Whether the Direct I/O caching policy is in effect for a file
Parameters
- Filename
- The name of the file to be queried. You must enter at least one file name; if you specify more than one, delimit each file name by a space. Wildcard characters are supported in file names; for example, project*.sched.
- -l
- Specifies that this command works only with regular files and directories and does not follow symlinks. The default is to follow symlinks.
- -L
- Displays additional file attributes:
- The assigned storage pool name of the file.
- The name of the fileset that includes the file.
- If a file is a snapshot file, the name of the snapshot that includes the file is shown. If the file is a regular file, an empty string is displayed.
- Whether the file is exposed, ill replicated, ill placed, or unbalanced (displayed under the flags heading).
- Whether the file is immutable.
- Whether the file is in appendOnly mode.
- The creation time of the file.
- If the compact attribute is nonzero, then this parameter displays the number of directory slots that were set by the mmchattr command with the --compact option or by the gpfs_prealloc subroutine. For more information, see the topics mmchattr command and gpfs_prealloc() subroutine.
-L can be combined with -d | --dump-attr to display all extended attribute names and values for each file.
- -d | --dump-attr
- Displays the names of all extended attributes for each file.
- -n AttributeName | --get-attr AttributeName
- Displays the name and value of the specified extended attribute for each file.
- -X | --hex-attr
- Displays the attribute value in hex.
- --hex-attr-name
- Displays the attribute name in hex.
Exit status
- 0
- Successful completion.
- nonzero
- A failure has occurred. The return code equals the number of files from which the command was not able to get attribute information.
Security
You must have read access to run the mmlsattr command.
You may issue the mmlsattr command only from a node in the GPFS cluster where the file system is mounted.
Examples
- To list the attributes of a file, issue this command:
The system displays information similar to:mmlsattr -L newfile
file name: newfile metadata replication: 1 max 2 data replication: 1 max 2 immutable: no appendOnly: no flags: directio storage pool name: system fileset name: root snapshot name: creation Time: Wed Feb 22 15:16:29 2012 Misc attributes: ARCHIVE COMPRESSION (library lz4)
- To show the attributes for all files in the root directory of
file system fs0, issue this command:
The system displays information similar to:mmlsattr /fs0/*
replication factors metadata(max) data(max) file [flags] ------------- --------- --------------- 1 ( 1) 1 ( 1) /fs0/project4.sched 1 ( 1) 1 ( 1) /fs0/project4.hist 1 ( 1) 1 ( 1) /fs0/project5.plan
- To show all extended attribute names and values for the file /ba1/newfile,
issue this command:
mmlsattr -d -L /ba1/newfile
The system displays information similar to:file name: /ba1/newfile metadata replication: 1 max 2 data replication: 1 max 2 immutable: no appendOnly: no flags: directio storage pool name: system fileset name: root snapshot name: creation time: Fri Jun 9 15:58:07 2017 Misc attributes: ARCHIVE COMPRESSION (library lz4) Encrypted: no user.attr1: "value1" user.attr: "val1" gpfs.DIRECTIO: "1" user.ea1: "value1" gpfs.CompressLibs: 0x02