mmlssnapshot command

Displays GPFS snapshot information.

Synopsis

mmlssnapshot Device [-d [--fast][--block-size {BlockSize | auto}]]
    [-s {all | global | [[Fileset]:]Snapshot[,[[Fileset]:]Snapshot...]} | -j Fileset[,Fileset...]]
    [--qos QOSClass] [-Y]

Availability

Available on all IBM Storage Scale editions.

Description

Use the mmlssnapshot command to display GPFS snapshot information including the snapshot retention time, for the specified file system or fileset. You can optionally display the amount of storage that is used by the snapshot.
Note: For snapshots that are created without the retention period defined, the expiration time is the same as its creation time.

Parameters

Device
The device name of the file system for which snapshot information is to be displayed. File system names do not need to be fully qualified. fs0 is as acceptable as /dev/fs0.
-d
Displays the amount of storage that is used by the snapshot.

This operation requires an amount of time that is proportional to the size of the file system; therefore, it can take several minutes or even hours on a large and heavily-loaded file system.

This optional parameter can impact overall system performance. Avoid running the mmlssnapshot command with this parameter frequently or during periods of high file system activity.

--fast
Enables a faster way of calculating the amount of storage that is used by the snapshot, minimizing the impact on the performance of the system. This is achieved by getting the required details from the inode of the snapshots without locking the snapshot files, and by reducing the scanning on the indirect block tree of snapshot files. This results in the reduced I/O load as well. However, without proper locks on the snapshots, the calculation of metadata storage space for the latest snapshot or the previous snapshot that is being emptied might be inaccurate. The --fast option is available only if the minimum release level of the IBM Storage Scale cluster is upgraded to 5.1.1 or later.
--block-size {BlockSize | auto}
Specifies the unit in which the number of blocks is displayed. The value must be of the form [n]K, [n]M, [n]G or [n]T, where n is an optional integer in the range 1 - 1023. The default is 1 K. If auto is specified, the number of blocks is automatically scaled to an easy-to-read value.
-s
Displays the attributes for the specified snapshots.
all
Displays information for all snapshots. This option is the default.
global
Displays information for global snapshots.
[[Fileset]:]
:
A colon (:) followed by a snapshot name indicates a global snapshot. For example, :SS01 indicates a global snapshot with the name SS01. If a global snapshot with that name exists, the command displays information about it.
Fileset:
A fileset name followed by a colon (:) followed by a snapshot name indicates a fileset snapshot. For example, fset02:SS01 indicates a snapshot of fileset fset02 with the name SS01. If a snapshot of the fileset with that snapshot name exists, then the command displays information about it.
Snapshot[,Snapshot...]
Displays information for the specified snapshots.
-j Fileset[,Fileset...]
Displays only snapshots that contain the specified filesets; including all global snapshots.
--qos QosClass
Specifies the Quality of Service for I/O operations (QoS) class to which the instance of the command is assigned. If you do not specify this parameter, the instance of the command is assigned by default to the maintenance QoS class. This parameter has no effect unless the QoS service is enabled. For more information, see the topic mmchqos command. Specify one of the following QoS classes:
maintenance
This QoS class is typically configured to have a smaller share of file system IOPS. Use this class for I/O-intensive, potentially long-running IBM Storage Scale commands, so that they contribute less to reducing overall file system performance.
other
This QoS class is typically configured to have a larger share of file system IOPS. Use this class for administration commands that are not I/O-intensive.
For more information, see Setting the Quality of Service for I/O operations.
-Y
Displays the command output in a parseable format with a colon (:) as the field delimiter. Each column is described by a header.
Note: Fields having a colon are encoded to prevent confusion. If a field contains a % (percent sign) character, it is most likely encoded. Use the mmclidecode command to decode the field.

Exit status

0
Successful completion.
nonzero
A failure occurred.

Security

You must be a root user or fileset owner to use the -d parameter.

If you are a root user, the node on which the command is issued must be able to execute remote shell commands on any other node in the cluster without the use of a password and without producing any extraneous messages. For more information, see Requirements for administering a GPFS file system.

If you are a non-root user, you can specify only file systems that belong to the same cluster as the node on which the mmlssnapshot command was issued.

Examples

Note: Ensure that the snapshot name does not include a colon (:).
The following command displays information about all the existing snapshots in file system fs1:
mmlssnapshot fs1
The following command displays information about snapshots named SS01. The snapshots can be global snapshots or fileset snapshots:
mmlssnapshot fs1 -s SS01
The following command displays information about a global snapshot named gSS01:
mmlssnapshot fs1 -s :gSS01
The following command displays information about a fileset snapshot with the name fsSS01 that is a snapshot of fileset fset02:
mmlssnapshot fs1 -s fset02:fsSS01
The following command displays information about global snapshots with the names gSS01 and gSS02 and a fileset snapshot of fileset fset02 named fsSS02:
mmlssnapshot fs1 -s :gSS01,:gSS02,fset02:fsSS02
The following command displays information about global snapshots and fileset snapshots that contain the filesets fset02 and fset03:
mmlssnapshot fs1 -j fset02,fset03
A sample output displaying the expiration time is shown.
Snapshots in file system gpfs2:
Directory             SnapId          Status         Created                            ExpirationTime                Fileset
gsnap1                1                Valid        Mon Jul 4 22:49:17 2022          Mon Jul 4 22:49:17 2022
gsnap2                20               Valid        Tue Jul 26 06:00:00 2022         Mon Aug 8 12:00:00 2022
fset1-snap1           21               Valid        Tue Jul 26 06:00:40 2022         Tue Jul 26 06:00:40 2022          fset1
fset1-snap2           22               Valid        Tue Jul 26 06:01:07 2022         Fri Sep 9 12:00:00 2022           fset1

See also

Location

/usr/lpp/mmfs/bin