mmdeldisk command

Deletes disks from a GPFS™ file system.

Synopsis

mmdeldisk Device {"DiskName[;DiskName...]" | -F DescFile} [-a] [-c]
          [-m | -r | -b] [-N {Node[,Node...] | NodeFile | NodeClass}]
          [--inode-criteria CriteriaFile] [-o InodeResultFile] 
          [--qos QOSClass]                        
          

Availability

Available on all IBM Spectrum Scale™ editions.

Description

The mmdeldisk command migrates all data that would otherwise be lost to the remaining disks in the file system. It then removes the disks from the file system descriptor, preserves replication at all times, and optionally rebalances the file system after removing the disks.

The mmdeldisk command has the following two functions:
  • Copying unreplicated data off the disks and removing references to the disks (deldisk step).
  • Rereplicating or rebalancing blocks across the remaining disks (restripe step).
These two functions can be done in one pass over the file system, or in two passes if the -a option is specified.

Run the mmdeldisk command when system demand is low.

If a replacement for a failing disk is available, use the mmrpldisk command in order to keep the file system balanced. Otherwise, use one of these procedures to delete a disk:
  • If the file system is replicated, replica copies can be preserved at all times by using the default -r option or the -b option.
  • Using the -m option will not preserve replication during the deldisk step because it will only copy the minimal amount of data off the disk being deleted so that every block has at least one copy. Also, using the -a option will not preserve replication during the deldisk step, but will then re-establish replication during the subsequent restripe step.
  • If you want to move all data off the disk before running mmdeldisk, use mmchdisk to suspend all the disks that will be deleted and run mmrestripefs with the -r or -b option. This step is no longer necessary, now that mmdeldisk does the same function. If mmdeldisk fails (or is canceled), it leaves the disks in the suspended state, and mmdeldisk can be retried when the problem that caused mmdeldisk to stop is corrected.
  • If the disk is permanently damaged and the file system is not replicated, or if the mmdeldisk command repeatedly fails, see the IBM Spectrum Scale: Problem Determination Guide and search for Disk media failure.

If the last disk in a storage pool is deleted, the storage pool is deleted. The mmdeldisk command is not permitted to delete the system storage pool. A storage pool must be empty in order for it to be deleted.

Results

Upon successful completion of the mmdeldisk command, these tasks are completed:
  • Data that has not been replicated from the target disks is migrated to other disks in the file system.
  • Remaining disks are rebalanced, if specified.

Parameters

Device
The device name of the file system to delete the disks from. File system names need not be fully-qualified. fs0 is as acceptable as /dev/fs0. This must be the first parameter.
"DiskName[;DiskName...]"
Specifies the names of the disks to be deleted from the file system. If there is more than one disk to be deleted, delimit each name with a semicolon (;) and enclose the list in quotation marks.
-F DiskFile
Specifies a file that contains the names of the disks (one name per line), to be deleted from the GPFS cluster.
-N {Node[,Node...] | NodeFile | NodeClass}
Specifies the nodes that participate in the restripe of the file system after the specified disks have been removed. 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.

--inode-criteria CriteriaFile
Specifies the interesting inode criteria flag, where CriteriaFile is one of the following:
BROKEN
Indicates that a file has a data block with all of its replicas on disks that have been removed.
Note: BROKEN is always included in the list of flags even if it is not specified.
dataUpdateMiss
Indicates that at least one data block was not updated successfully on all replicas.
exposed
Indicates an inode with an exposed risk; that is, the file has data where all replicas are on suspended disks. This could cause data to be lost if the suspended disks have failed or been removed.
illCompressed
Indicates an inode in which file compression or decompression is deferred, or in which a compressed file is partly decompressed to allow the file to be written into or memory-mapped.
illPlaced
Indicates an inode with some data blocks that might be stored in an incorrect storage pool.
illReplicated
Indicates that the file has a data block that does not meet the setting for the replica.
metaUpdateMiss
Indicates that there is at least one metadata block that has not been successfully updated to all replicas.
unbalanced
Indicates that the file has a data block that is not well balanced across all the disks in all failure groups.
Note: If a file matches any of the specified interesting flags, all of its interesting flags (even those not specified) will be displayed.
-o InodeResultFile
Contains a list of the inodes that met the interesting inode flags that were specified on the --inode-criteria parameter. The output file contains the following:
INODE_NUMBER
This is the inode number.
DISKADDR
Specifies a dummy address for later tsfindinode use.
SNAPSHOT_ID
This is the snapshot ID.
ISGLOBAL_SNAPSHOT
Indicates whether or not the inode is in a global snapshot. Files in the live file system are considered to be in a global snapshot.
INDEPENDENT_FSETID
Indicates the independent fileset to which the inode belongs.
MEMO (INODE_FLAGS FILE_TYPE [ERROR])
Indicates the inode flag and file type that will be printed:
Inode flags:
BROKEN
exposed
dataUpdateMiss
illCompressed
illPlaced      
illReplicated
metaUpdateMiss  
unbalanced 
File types:
BLK_DEV 
CHAR_DEV 
DIRECTORY
FIFO
LINK
LOGFILE
REGULAR_FILE
RESERVED
SOCK
*UNLINKED*
*DELETED*
Notes:
  1. An error message will be printed in the output file if an error is encountered when repairing the inode.
  2. DISKADDR, ISGLOBAL_SNAPSHOT, and FSET_ID work with the tsfindinode tool (/usr/lpp/mmfs/bin/tsfindinode) to find the file name for each inode. tsfindinode uses the output file to retrieve the file name for each interesting inode.
--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 GPFS 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 the topic Setting the Quality of Service for I/O operations (QoS).

Options

-a
Specifies that the mmdeldisk command not wait for rereplicating or rebalancing to complete before returning. When this flag is specified, the mmdeldisk command runs asynchronously and returns after the file system descriptor is updated and the rebalancing scan is started, but it does not wait for rebalancing to finish. If no rebalancing is requested (-r option is not specified), this option has no effect.

If -m is specified, this option has no effect. If -r or -b is specified (no option defaulting to -r), then the deldisk step is done using -m, and the restripe step is done using the specified option.

-b
Rebalances the blocks onto the other disks while moving data off the disks being deleted. This might have to move much more data than the -r operation.
Note: Rebalancing of files is an I/O intensive and time consuming operation, and is important only for file systems with large files that are mostly invariant. In many cases, normal file update and creation will rebalance your file system over time, without the cost of the rebalancing.
-c
Specifies that processing continues even in the event that unreadable data exists on the disks being deleted. Data that has not been replicated is lost. Replicated data is not lost as long as the disks containing the replication are accessible.
-m
Does minimal data copying to preserve any data that is located only on the disks being removed. This is the fastest way to get a disk out of the system, but it could reduce replication of some blocks of the files and metadata.
Note: This might be I/O intensive if there is a lot of data to be copied or rereplicated off the disks that are being deleted.
-r
Preserves replication of all files and metadata during the mmdeldisk operation (except when the -a option is specified). This is the default.
Note: This might be I/O intensive if there is a lot of data to be copied or rereplicated off the disks that are being deleted.

Exit status

0
Successful completion.
nonzero
A failure has occurred.

Security

You must have root authority to run the mmdeldisk 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.

Example

To delete gpfs1016nsd from file system fs1 and rebalance the files across the remaining disks, issue this command:
 mmdeldisk fs1 gpfs1016nsd
The system displays information similar to:
Deleting disks ...
Scanning sp1 storage pool
Scanning user file metadata ...
 100.00 % complete on Tue Mar 13 15:48:51 2012
Scan completed successfully.
Checking Allocation Map for storage pool 'sp1'
tsdeldisk64 completed.
mmdeldisk: Propagating the cluster configuration data to all
  affected nodes.  This is an asynchronous process.

Location

/usr/lpp/mmfs/bin