Deleting disks from a file system

Before you delete a disk from an IBM Storage Scale file system, use the mmdf command to determine whether the file system has sufficient free space to accommodate all data or metadata in the storage pool where the disk is located.

Before you begin

  • See Querying file system space for more information about diagnosing space problems.
  • For file systems where the majority of files are smaller than the file system block size, resulting in fragmentation of storage space, it is recommended that the free space in the file system be at least 150 percent of the space consumed by the disks that will be deleted. For example, to delete a 400 GB disk from a file system, you must first confirm that the file system contains minimum 600 GB of free space in the storage pool from where the disk is being removed.
    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 rebalance your file system over time, without the cost of the rebalancing.
  • A disk that is being deleted must be in an accessible state, that is started or suspended, to allow for data to be moved off of the disk to another disk in the storage pool. If a disk is being removed because it is damaged or is no longer working, then additional precautions are necessary before the disk is deleted from the file system. Deleting a disk that is no longer accessible can cause a loss of data, and if the disk contains metadata, you may need to run the mmfsck command. For further information about removing damaged or inaccessible disk see NSD and underlying disk subsystem failures and Disk media failure.

About this task

When you need to remove or replace one or more disks in a file system, you can use the mmrestripefs command. Because this command is tolerant to stop and restart, you can control the process of moving data off of one or more disks that are being removed or replaced. You can also use the quality of service (QoS) feature (the mmqos command) to control the impact of the I/Os necessary to move data from one or more disks that are being removed or replaced to other disks.

To use the mmrestripefs command before the removal or replacement of a disk complete the following steps:

Procedure

  1. Confirm that there is sufficient free space in the storage pool where the disk is located.
  2. Suspend the disks that need to be removed or replaced by using the mmchdisk command.
  3. Use the mmrestripefs command to move all data from the suspended disks.
  4. Use the mmdeldisk command to remove one or more disks, or use the mmrpldisk command to replace one or more disks.

    For syntax and usage information, refer to mmdeldisk command.

Example

Specify the file system and the names of one or more disks to delete with the mmdeldisk command. For example, to delete the disk hd2n97 from the file system fs2 enter:
mmdeldisk fs2 hd2n97
The system displays information similar to:
Deleting disks ...
Scanning system storage pool
Scanning file system metadata, phase 1 ...
19 % complete on Fri Mar 16 23:23:50 2012
100 % complete on Fri Mar 16 23:23:51 2012
Scan completed successfully.
Scanning file system metadata, phase 2 ...
46 % complete on Fri Mar 16 23:23:55 2012
93 % complete on Fri Mar 16 23:23:58 2012
100 % complete on Fri Mar 16 23:23:58 2012
Scan completed successfully.
Scanning file system metadata, phase 3 ...
Scan completed successfully.
Scanning file system metadata, phase 4 ...
Scan completed successfully.
Scanning user file metadata ...
19.50 % complete on Fri Mar 16 23:24:25 2012 ( 35777 inodes 1207 MB)
47.92 % complete on Fri Mar 16 23:24:49 2012 ( 199955 inodes 2966 MB)
50.05 % complete on Fri Mar 16 23:25:09 2012 ( 235356 inodes 3098 MB)
53.09 % complete on Fri Mar 16 23:25:31 2012 ( 261831 inodes 3286 MB)
55.12 % complete on Fri Mar 16 23:25:51 2012 ( 283815 inodes 3412 MB)
63.25 % complete on Fri Mar 16 23:26:12 2012 ( 319236 inodes 3915 MB)
63.27 % complete on Fri Mar 16 23:26:33 2012 ( 382031 inodes 6223 MB)
63.29 % complete on Fri Mar 16 23:27:03 2012 ( 699858 inodes 9739 MB)
100.00 % complete on Fri Mar 16 23:27:35 2012
Scan completed successfully.
Checking Allocation Map for storage pool 'system'
17 % complete on Fri Mar 16 23:27:42 2012
31 % complete on Fri Mar 16 23:27:47 2012
48 % complete on Fri Mar 16 23:27:52 2012
62 % complete on Fri Mar 16 23:27:57 2012
76 % complete on Fri Mar 16 23:28:02 2012
90 % complete on Fri Mar 16 23:28:07 2012
100 % complete on Fri Mar 16 23:28:08 2012
tsdeldisk completed.
mmdeldisk: Propagating the cluster configuration data to all
  affected nodes.  This is an asynchronous process.