mmlsattr command
Queries file attributes.
Synopsis
mmlsattr [-L] [-l]
[-d | --dump-attr]
[-n AttributeName | --get-attr AttributeName]
[-X | --hex-attr] [--hex-attr-name]
[-D | --dump-data-block-disk-numbers]
{--inode-number [SnapPath/]InodeNumber [[SnapPath/]InodeNumber...] |
Filename[ Filename...]}
Availability
Available on all IBM Storage 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
- The disk number distribution of all data block replicas for a file
Parameters
- -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.
- -D | --dump-data-block-disk-numbers
- Displays the disk number distribution for all replicas of all data blocks for each file. It is used for resolving data block replica mismatches. For more information, see Replica mismatches.
- --inode-number [SnapPath/]InodeNumber
- The inode number of the file to be queried. You must enter at least one inode number or file
name, but not both; if you specify more than one inode number, delimit each inode number by a space.
If the current working directory is not already inside the active file system or snapshot, then the
inode number has to be prefixed by the path to the active file system or snapshot. For
example:
mmlsattr –inode-number /fs0/.snapshots/snap1/34608
You must have root authority to use this option.
- Filename
- The name of the file to be queried. You must enter at least one file name or inode number, but not both; if you specify more than one file name, delimit each file name by a space. Wildcard characters are supported in file names; for example, project*.sched.
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 the following command:
The system displays information as in the following example: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 the following command:
The system displays information as in the following example: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.fastq
, issue the following command:mmlsattr -d -L /ba1/newfile.fastq
The system displays information as in the following example: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 alphae) Encrypted: no user.attr1: "value1" user.attr: "val1" gpfs.DIRECTIO: "1" user.ea1: "value1" gpfs.CompressLibs: 0x0x4141616C7068616500
- To show the disk number distribution of all data block replicas for
the file /fs0/file1, which has 2 DataReplicas and 3 MaxDataReplicas, issue the following
command:
The system displays information as in the following example:mmlsattr -D /ba1/newfile.fastq
Block Index Replica 0 Replica 1 Replica 2 ----------- --------- --------- --------- 0 *2 1 - 1 *3 1 - 2 *1 3 - 3 *2 3 - 4 *3 2 -
See also
Location
/usr/lpp/mmfs/bin