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 | -l | -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

-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
Directs mmrestripefile to repair the file placement within the storage pool.

Files that are assigned to one storage pool, but with data in a different pool, have their data migrated to the correct pool. These files are called ill-placed. Utilities, such as the mmchattr command, might change a file's storage pool assignment, but not move the data. The mmrestripefile command might then be invoked to migrate all of the data at once, rather than migrating each file individually. The placement option (-p) rebalances only the files that it moves. In contrast, the rebalance operation (-b) performs data placement on all files.

-b
Rebalances a list of files across all disks that are not suspended, even if they are stopped. Although blocks are allocated on a stopped disk, they are not written to a stopped disk, nor are reads allowed from a stopped disk, until that disk is started and replicated data is copied onto it.
-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.
-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 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, run the following command:
mmrestripefile -p testfile0
To confirm the change, run 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