rmvol

Removes one or more volumes from a storage pool and redistributes the contents to other volumes in the same storage pool.

Read syntax diagramSkip visual syntax diagram
>>-rmvol--+--------+--+-----------------------+--+-----+-------->
          +- -?----+  '- -client--client_name-'  '- -f-'
          +- -h----+
          '- -help-'

                  .-------------.
                  V             |
>--+---------+--+---volume_name-+-+----------------------------><
   '- -quiet-'  '- - -------------'

Parameters

–? | –h | –help
Displays a detailed description of this command, including syntax, parameter descriptions, and examples. If you specify a help option, all other command options are ignored.
–client client_name
Specifies the name of a client that is zoned to access the LU.
To remove a volume from a user storage pool, you must specify a SAN File System client that meets the following conditions:
  • The client must have access to the LU that is being removed as a SAN File System volume. To list all active clients that can access the volume, use the reportclient –vol command.
  • The client must be active and appear in the registered (active) client list.
  • The client must be able to access all volumes in the storage pool from which the volume is being removed. To verify that the client can see all volumes in the storage pool, use the reportclient –lun command, and then use the lsvol –pool command to view the volumes in the storage pool and cross check the results.
Note: Do not specify a client if you are removing a volume from the system storage pool.
–f
Removes all files in the specified volumes and disables draining the files to another volume in the storage pool. If there is a file in the volume, specifying this parameter causes the entire file to be deleted, even if parts of the file reside on multiple volumes.

The –f parameter is not allowed when you remove volumes from the system storage pool.

Note: There is no automatic-recovery process when you specify this parameter. You can look at the activity log to get a list of the files for which failures occurred, and then restore those files manually. You can also use the reportvolfiles command before invoking the rmvol command and review the file list to make sure that the files are not needed or are archived.
–quiet
Turns off confirmation messages for this command.
volume_name
Specifies the names of one or more volumes to delete.
Specifies that you want to read the names of one or more volumes to delete from stdin (for example, – << /work/vol_list.txt).

Prerequisites

You must have Administrator privileges to use the command.

You must be logged in to the operating system on the engine hosting the master metadata server to run this command.

The cluster must not be in an offline state when you run this command.

Description

You do not need to deactivate a volume before you remove it.

Before removing a volume, SAN File System moves (drains) the contents of the volume across other available volumes in the same storage pool. If the storage pool does not have sufficient space available in other volumes to move all of the data contained in the specified volume, the removal fails and the metadata server suspends the volume (the metadata server cannot allocate new data on that volume).

A volume must be empty to be removed from a storage pool. If one or more files cannot be moved to another volume in the same storage pool, you can specify the –f parameter to discard those files. If you do not specify the –f parameter and the files cannot be removed, the removal fails.

If an error occurs during volume removal, the volume remains in a suspended state so new allocations will not be satisfied from the volume being removed. To activate the volume, use the activatevol command.

You must explicitly remove a volume if you want to reuse it. Removing a volume removes the label and frees the device for reuse. If you want to add a device that is in the in-use state, you must remove it using the –f option before you can add it as a volume.

Example

Remove two volumes The following example removes volumes vol1 and vol2:
sfscli> rmvol -client client02 vol1 vol2
Are you sure you want to delete volume vol1? [y/n] Y
Volume vol1 removed.
Are you sure you want to delete volume vol21? [y/n] Y
Volume vol2 removed.

Parent topic: Administrative commands

Related reference
activatevol
chvol
expandvol
lslun
lsvol
mkvol
rediscoverluns
reportvolfiles
suspendvol

Terms of use | Feedback
(C) Copyright IBM Corporation 2003, 2004. All Rights Reserved.