mmrestripefile command

Rebalances or restores the replication factor of the specified files, or performs any incomplete or deferred file compression or decompression.

Synopsis

mmrestripefile {-m | -r | -p | -b [--strict] | -l | -c | -z} {-F FilenameFile | Filename [Filename...]}

Availability

Available on all IBM Spectrum Scale™ editions.

Description

The mmrestripefile command attempts to repair the specified files, or performs any deferred or incomplete compression or decompression of the specified files. You can use -F option to specify a file that contains the list of file names to be processed, with one file name per line.

The repair options are rebalancing (-b), restoring replication factors (-r), migrating data (-m), and migrating file data to the proper pool (-p). The -b option not only rebalances files but also performs all the operations of the -m and -r options. For more information, see Restriping a GPFS file system.

If you do not use replication, the -r and -m options are equivalent. Their behavior differs only on replicated files. After a successful rereplicate (-r), all suspended disks are empty. But a migrate operation (-m) leaves data on a suspended disk as long as at least one other replica of the data remains on a disk that is not suspended.

Use the -l option to relocate the block placement of the files.

Use the -z option to perform any deferred or incomplete compression or decompression of the files.

CAUTION:
Do not run the mmrestripefs or mmrestripefile command while an mmrestorefs command is running.

Parameters

-F FilenameFile
Specifies a file that contains a list of names of files to be restriped, one name per line.
Filename
Specifies the names of one or more files to be restriped.

Options

stop
-m
Migrates critical data from any suspended disk for a list of specified files. Critical data is all data that would be lost if currently suspended disks were removed.
-r
Migrates all data for a list of files from suspended disks. If a disk failure or removal makes some replicated data inaccessible, this command also restores replicated files to their designated level of replication. Use this option immediately after a disk failure to protect replicated data against a subsequent failure. You can also use this option before you take a disk offline for maintenance to protect replicated data against the failure of another disk during the maintenance process.
-p
Moves the data of ill-placed files to the correct storage pool.

Some utilities, including the mmchattr command, can assign a file to a different storage pool without moving the data of the file to the new pool. Such files are called ill-placed. The -p parameter causes the command to move the data of ill-placed files to the correct storage pools.

-b [--strict]
Rebalances the specified files to improve file system performance. Rebalancing attempts to distribute file blocks evenly across the disks of the file system. In IBM Spectrum Scale 5.0.0 and later, rebalancing is implemented by a lenient round-robin method that typically runs faster than the previous method of strict round robin. To rebalance the file system using the strict round-robin method, include the --strict option.
--strict
Rebalances the specified files with a strict round-robin method. In IBM Spectrum Scale v4.2.3 and earlier, rebalancing always uses this method.
Note: Rebalancing distributes file blocks across all the disks in the cluster that are not suspended, including stopped disks. For stopped disks, rebalancing does not allow read operations and allocates data blocks without writing them to the disk. When the disk is restarted and replicated data is copied onto it, the file system completes the write operations.
-l
Relocates the block placement of the file. The location of the blocks depends on the current write affinity depth, write affinity failure group setting, block group factor, and the node from which the command is run. For example, for an existing file, regardless of how its blocks are distributed on disks currently, if mmrestripefile -l is run from node A, the final block distribution looks as if the file was created from scratch on node A.
To specify the write affinity failure group where the replica is put, before you run mmrestripefile -l, enter a command like the following example:
mmchattr --write-affinity-failure-group "WadfgValueString" filename
where WadfgValueString is the failure group.
-c
Compares the data of the specified files with their replicas and attempts to fix any inconsistencies. This option does not compare metadata blocks. It also does not compare files whose size is less than the inode size, because their data is stored in the inode. To find the inode size, enter the following command:
mmlsfs <file_system_name> -i
-z
Performs any deferred or incomplete compression or decompression of files. For more information, see the topic File compression.

Exit status

0
Successful completion.
nonzero
A failure has occurred.

Security

You must have root authority to run the mmrestripefile 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 example illustrates restriping a file that is named testfile0. The following command confirms that the file is ill-placed:
mmlsattr -L testfile0
The system displays the following output:
file name:            testfile0
metadata replication: 2 max 2
data replication:     2 max 2
immutable:            no
appendOnly:           no
flags:                illplaced
storage pool name:    system
fileset name:         root
snapshot name:
To correct the problem, issue the following command:
mmrestripefile -p testfile0
To confirm the change, issue the following command:
mmlsattr -L testfile0
The system displays the following output:
file name:            testfile0
metadata replication: 2 max 2
data replication:     2 max 2
immutable:            no
appendOnly:           no
flags:                
storage pool name:    system
fileset name:         root
snapshot name:
The following command compresses or decompresses a file for which compression or decompression is deferred or incomplete:
mmrestripefile -z  largefile.data

Location

/usr/lpp/mmfs/bin