mmrestrictedctl command
Enables specific system functions that are reserved for privileged escalated administrators.
Synopsis
mmrestrictedctl Device deleteSnapshot [[Fileset]:]Snapshot[,[[Fileset]:]Snapshot]...
[-j FilesetName[,FilesetName...]]
[-N {all | mount | Node[,Node...]|NodeFile | NodeClass}]
[--pit-continues-on-error] [--qos QosClass]
Availability
Available on all IBM Storage Scale editions.
Description
Root users and sudo root users can use the mmrestrictedctl command to delete a GPFS snapshot prior to the expiration date of the retention period, if one is set. The command can be run on both global and fileset snapshots on which retention periods are set.
Parameters
- Device
- The device name of the file system for which the snapshot is to be deleted. File system names do not need to be fully qualified.
- Fileset
- Specifies the name of the fileset that contains the fileset snapshot to be deleted.
- deleteSnapshot
- Deletes a GPFS snapshot even if there is a current retention date which has not expired.
- Snapshot
- Specifies the name of the snapshot to be deleted.
The snapshot names are separated by a comma.
The snapshot specifier describes global and fileset snapshots. For example, Fileset1:Snapshot1 specifies a fileset snapshot named Snapshot1 for fileset Fileset1. If Fileset1 is empty, Snapshot1 is a global snapshot named Snapshot1.
Note: Ensure that the snapshot name does not include a colon (:), a comma (,), and whitespaces. If the snapshot name consists of a whitespace, the whitespace must be quoted and part of the snapshot name. For example, if the snap1 and snap A snapshots must be deleted, use the command 'mmrestrictedctl pk2 deleteSnapshot "snap A, snap1"'. - -j FilesetName
- Specifies the name of the fileset that contains the fileset snapshot to be deleted
(SnapshotName). If -j is not specified, the
mmrestrictedctl command attempts to delete a global snapshot named
SnapshotName.Note: When a list of snapshots separated by a comma (,) is used with the -j option, the fileset is applicable to each snapshot that does not use the colon (:) syntax. The fileset name must not consist of a white space.
- -N{all | mount | Node[,Node...]|NodeFile | NodeClass}]
- Specifies the nodes that participate in deleting the snapshot. This command supports all defined
node classes. The default is all or the current value of the
defaultHelperNodes parameter of the mmchconfig
command.
For general information on how to specify node names, see Specifying nodes as input to GPFS commands.
- --pit-continues-on-error
- Allows the mmrestrictedctl command to continue removing the remaining files,
if errors are encountered in the parallel inode traverse (PIT) phase that performs the deletion of
files in the snapshot. An output file is generated if an error occurs while deleting files in the
snapshot. The location of the file that logs the errors is displayed in the command output. Note:
- The mmrestrictedctl command continues to run only if the error is reported in the PIT phase of the command execution. If the error is reported in other phases of command execution, the command stops running.
- The --pit-continues-on-error option works only if the minimum release level of the IBM Storage Scale cluster is 5.1.1 or later.
- --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.
Exit status
- 0
- Successful completion.
- Nonzero
- A failure occurred.
Security
You must have root authority or sudo root authority to run the mmrestrictedctl command when you delete global or fileset snapshots.
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.
Examples
[root@c40bbc4xn10 bin]# mmlssnapshot fs1
Snapshots in file system fs1:
Directory SnapId Status Created ExpirationTime Fileset
snap1 34 Valid Thu Jul 28 12:57:26 2022 Sat Dec 31 00:00:00 2022
[root@c40bbc4xn10 bin]# date
Thu Jul 28 13:34:04 EDT 2022
[root@c40bbc4xn10 bin]# mmdelsnapshot fs1 snap1
The snapshot :snap1 cannot be deleted since its snapshot retention time is not yet expired.
Delete snapshot Error: :snap1, err = 1.
mmdelsnapshot: Command failed. Examine previous error messages to determine cause.
[root@c40bbc4xn10 bin]# mmrestrictedctl fs1 deletesnapshot snap1
Invalidating snapshot files in :snap1...
Deleting files in snapshot :snap1...
100.00 % complete on Thu Jul 28 13:32:06 2022 ( 353280 inodes with total 4 MB data processed)
Invalidating snapshot files in :snap1/F/...
Delete snapshot :snap1 successful.
[root@c40bbc4xn10 bin]# ./mmlssnapshot fs1
No snapshots in file system fs1