mmfsctl command

Issues a file system control request.

Synopsis

mmfsctl Device {suspend | suspend-write | resume}

or

mmfsctl Device {exclude | include}
               {-d "DiskName[;DiskName...]" | -F DiskFile | -G FailureGroup}

or

mmfsctl Device syncFSconfig 
               {-n RemoteNodesFile | -C RemoteClusterName} [-S SpecFile]

Availability

Available on all IBM Spectrum Scale editions.

Description

Use the mmfsctl command to issue control requests to a particular GPFS file system. The command is used to temporarily suspend the processing of all application I/O requests, and later resume them, as well as to synchronize the file system's configuration state between peer clusters in disaster recovery environments.

Using mmfsctl suspend and mmfsctl resume
Before creating a FlashCopy® image of the file system, the user must run mmfsctl suspend to temporarily quiesce all file system activity and flush the internal buffers on all nodes that mount this file system. The on-disk metadata will be brought to a consistent state, which provides for the integrity of the FlashCopy snapshot. If a request to the file system is issued by the application after the invocation of this command, GPFS suspends this request indefinitely, or until the user issues mmfsctl resume.

Once the FlashCopy image has been taken, the mmfsctl resume command can be issued to resume the normal operation and complete any pending I/O requests.

Using mmfsctl syncFSconfig
The mmfsctl syncFSconfig command extracts the file system's related information from the local GPFS configuration data, transfers this data to one of the nodes in the peer cluster, and attempts to import it there.

Once the GPFS file system has been defined in the primary cluster, users run this command to import the configuration of this file system into the peer recovery cluster. After producing a FlashCopy image of the file system and propagating it to the peer cluster using Peer-to-Peer Remote Copy (PPRC), users similarly run this command to propagate any relevant configuration changes made in the cluster after the previous snapshot.

The primary cluster configuration server of the peer cluster must be available and accessible using remote shell and remote copy at the time of the invocation of the mmfsctl syncFSconfig command, and remote nodes must be reachable by the ping utility. Also, the peer GPFS clusters should be defined to use the same remote shell and remote copy mechanism, and they must be set up to allow nodes in peer clusters to communicate without the use of a password.

Note: In a cluster that is CCR-enabled, you cannot run mmfsctl syncFSconfig on a file system that has tiebreaker disks.
Not all administrative actions performed on the file system necessitate this type of resynchronization. It is required only for those actions that modify the file system information maintained in the local GPFS configuration data. These actions include:
  • Adding, removing, and replacing disks (commands mmadddisk, mmdeldisk, mmrpldisk)
  • Modifying disk attributes (command mmchdisk)
  • Changing the file system's mount point (command mmchfs -T)
  • Changing the file system device name (command mmchfs -W)

The process of synchronizing the file system configuration data can be automated by utilizing the syncfsconfig user exit.

Using mmfsctl exclude
The mmfsctl exclude command is to be used only in a disaster recovery environment, only after a disaster has occurred, and only after ensuring that the disks in question have been physically disconnected. Otherwise, unexpected results may occur.

The mmfsctl exclude command can be used to manually override the file system descriptor quorum after a site-wide disaster. This command enables users to restore normal access to the file system with less than a quorum of available file system descriptor replica disks, by effectively excluding the specified disks from all subsequent operations on the file system descriptor. After repairing the disks, the mmfsctl include command can be issued to restore the initial quorum configuration.

Parameters

Device
The device name of the file system. File system names need not be fully-qualified. fs0 is just as acceptable as /dev/fs0. If all is specified with the syncFSconfig option, this command is performed on all GPFS file systems defined in the cluster.
The following options can be specified after Device:
suspend
Instructs GPFS to flush the internal buffers on all nodes, bring the file system to a consistent state on disk, and suspend the processing of all subsequent application I/O requests.
suspend-write
Suspends the execution of all new write I/O requests coming from user applications, flushes all pending requests on all nodes, and brings the file system to a consistent state on disk.
resume
Instructs GPFS to resume the normal processing of I/O requests on all nodes.
exclude
Instructs GPFS to exclude the specified group of disks from all subsequent operations on the file system descriptor, and change their availability state to down, if the conditions in the following Note are met.

If necessary, this command assigns additional disks to serve as the disk descriptor replica holders, and migrate the disk descriptor to the new replica set. The excluded disks are not deleted from the file system, and still appear in the output of the mmlsdisk command.

Note: The mmfsctl exclude command is to be used only in a disaster recovery environment, only after a disaster has occurred, and only after ensuring that the disks in question have been physically disconnected. Otherwise, unexpected results may occur.
include
Informs GPFS that the previously excluded disks have become operational again. This command writes the up-to-date version of the disk descriptor to each of the specified disks, and clears the excl tag.
-d "DiskName[;DiskName...]"
Specifies the names of the NSDs to be included or excluded by the mmfsctl command. Separate the names with semicolons (;) and enclose the list of disk names in quotation marks.
-F DiskFile
Specifies a file containing the names of the NSDs, one per line, to be included or excluded by the mmfsctl command.
-G FailureGroup
A failure group identifier for the disks to be included or excluded by the mmfsctl command.
syncFSconfig
Synchronizes the configuration state of a GPFS file system between the local cluster and its peer in two-cluster disaster recovery configurations.
The following options can be specified after syncFSconfig:
-n RemoteNodesFile
Specifies a list of contact nodes in the peer recovery cluster that GPFS uses when importing the configuration data into that cluster. Although any node in the peer cluster can be specified here, users are advised to specify the identities of the peer cluster's primary and secondary cluster configuration servers, for efficiency reasons.
-C RemoteClusterName
Specifies the name of the GPFS cluster that owns the remote GPFS file system.
-S SpecFile
Specifies the description of changes to be made to the file system, in the peer cluster during the import step. The format of this file is identical to that of the ChangeSpecFile used as input to the mmimportfs command. This option can be used, for example, to define the assignment of the NSD servers for use in the peer cluster.

Exit status

0
Successful completion.
nonzero
A failure has occurred.

Results

The mmfsctl command returns 0 if successful.

Security

You must have root authority to run the mmfsctl command.

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

This sequence of commands creates a FlashCopy image of the file system and propagates this image to the recovery cluster using the Peer-to-Peer Remote Copy technology. The following configuration is assumed:
Site LUNs
Primary cluster (site A) lunA1, lunA2
Recovery cluster (site B) lunB1
lunA1
FlashCopy source
lunA2
FlashCopy target, PPRC source
lunB1
PPRC target
A single GPFS file system named fs0 has been defined in the primary cluster over lunA1.
  1. In the primary cluster, suspend all file system I/O activity and flush the GPFS buffers
    mmfsctl fs0 suspend
    The output is similar to this:
    Writing dirty data to disk.
    Quiescing all file system operations.
    Writing dirty data to disk again.
  2. Establish a FlashCopy pair using lunA1 as the source and lunA2 as the target.
  3. Resume the file system I/O activity:
    mmfsctl fs0 resume
    The output is similar to this:
    Resuming operations.
  4. Establish a Peer-to-Peer Remote Copy (PPRC) path and a synchronous PPRC volume pair lunA2-lunB1 (primary-secondary). Use the 'copy entire volume' option and leave the 'permit read from secondary' option disabled.
  5. Wait for the completion of the FlashCopy background task. Wait for the PPRC pair to reach the duplex (fully synchronized) state.
  6. Terminate the PPRC volume pair lunA2-lunB1.
  7. If this is the first time the snapshot is taken, or if the configuration state of fs0 changed since the previous FlashCopy snapshot, propagate the most recent configuration to site B:
    mmfsctl fs0 syncFSconfig -n recovery_clust_nodelist
    

Location

/usr/lpp/mmfs/bin