rmvdisk

Use the rmvdisk command to delete a volume. This command cannot be used for high availability volumes. Use the rmvolume command for high availability volumes.

Syntax

rmvdisk { [ -removehostmappings ] | [ -force ] } { vdisk_id | vdisk_name }

Parameters

-force
(Optional) Deletes the specified volume, even if mappings still exist between this volume and one or more hosts. This parameter deletes any host-to-volume mappings and any FlashCopy mappings that exist for this volume. If the -force deletion of a volume causes dependent mappings to be stopped, any target volumes for those mappings that are in Metro Mirror or Global Mirror relationships are also stopped. The dependent mappings can be identified by using the lsvdiskdependentmaps command on the volume that you want to delete.
Note: Using the -force parameter might result in a data loss. Use it only under the direction of your product support information, or if you are willing to accept the risk of data loss in the volume to which the drive belongs.
-removehostmappings
(Optional) Removes all host mappings for the specified volume before deleting the volume itself.
Note: Using the -removehostmappings parameter might result in a data loss. Use it only under the direction of your product support information, or if you are willing to accept the risk of data loss in the volume to which the drive belongs.
vdisk_id | vdisk_name
Specifies the name of the volume to delete, either by ID or by name.
Note: To deactivate compression, use the rmvdiskcopy to delete the last compressed volume copy for an I/O group.

Description

This command deletes an existing managed mode volume or an existing image mode volume. The extents that made up this volume are returned to the pool of free extents that are available on the managed disk group, if the volume is in managed mode.
Remember: If you issue this command, any data that was on the volume is lost. Before you issue this command, ensure that the volume (and any data that resides on it) is no longer required.
This command is unsuccessful if:
  • Volume protection is enabled (using the chsystem command)
  • The volume being removed has received I/O within the defined volume protection time period

With an active-active relationship, either or both of the master and auxiliary volumes can provide the information for host systems to read through the master volume ID. To remove the auxiliary volume from the relationship, delete the relationship so hosts can access the master copy.

Remember: Any FlashCopy mappings with the specified volume as their source volume are deleted when you specify this command.

Deleting a managed mode volume

When you use this command to delete a managed mode volume, all the data on the volume is deleted. The extents that make up the volume are returned to the pool of free extents that are available in the managed disk group.

If host mappings exist for the volume, or if any FlashCopy mappings would be affected, the deletion fails. You can use the -force parameter to force the deletion. If you use the -force parameter, mappings that have the volume as source or target are deleted, other mappings in a cascade might be stopped, and then the volume is deleted. The -force parameter also deletes any Metro Mirror or Global Mirror relationships that exist for the specified volume (and any information that is not staged in the fast write cache).

If the volume is in the process of migrating to an image mode volume (using the migratetoimage command), the deletion fails unless you use the -force parameter. If you use the -force parameter, the migration is halted and then the volume is deleted. Before you issue this command, ensure that the volume (and any data that resides on it) is no longer required.

Deleting an image mode volume

If the volume is mirrored and one or both copies is in image mode, you must first wait for all fast-write data to be moved to the controller logical unit. This ensures that the data on the controller is consistent with the data on the image mode volume before the volume is deleted. This process can take several minutes to complete, and is indicated by the fast_write_state state of the volume being empty. If the -force parameter is specified, the fast-write data is discarded and the volume is deleted immediately; the data on the controller logical unit is left inconsistent and unusable. If the copies are not synchronized, you must use the -force parameter.

If you run the command while data is in the cache, the system attempts to move the data out of the cache; this process can time out, however.

If there are any virtual medium errors on the volume, the command fails. You can force the deletion by using the -force parameter; however, this can cause data integrity problems.
Note: A virtual medium error occurs when you copy data from one disk (the source) to another (the target). Reading the source indicates that there is a medium error. At that moment, you must have two identical copies of data and you must then simulate a medium error on the target disk. You can simulate a medium error on the target disk by creating a virtual medium error on the target disk.

If FlashCopy mappings or host mappings exist for the volume, the deletion fails unless you use the -force parameter. If you use the -force parameter, mappings are deleted and the volume is deleted. If there is any data that is not staged in the fast write cache for this volume, the deletion of the volume fails. When the -force parameter is specified, any data that is not staged in the fast write cache is deleted. Deleting an image mode volume causes the managed disk that is associated with the volume to be removed from the managed disk group. The mode of the managed disk is returned to unmanaged.

If the relationship is in consistent_copying or consistent_stopped state, and the change volume is being used by a Global Mirror relationship using multicycling mode, the relationship moves to inconsistent_copying or inconsistent_stopped state.
Note: If the relationship is part of a consistency group entire group is affected by this state transition.
The secondary volume becomes corrupt, and inaccessible for host input/output I/O data if:
  • A changed volume is part of an idling relationship
  • The changed volume is being used for secondary protection
  • The background copy process is still migrating the change volume data to the secondary volume
You must issue recovervdisk to gain access to the volume contents once more. If a change volume was part of an idling relationship and being used for Global Mirror relationship using multicycling mode, and the relationship was deleted but the background copy process continued and is still migrating data to the secondary volume then the secondary volume also becomes corrupt. In any of these cases, this recovervdisk fails without -force being specified.
Note:
  • The -force parameter must be used if rmvdisk is specified and rejected if the volume is a change volume for a relationship.
  • If the volume is a change volume for a relationship, specifying rmvdisk with -force removes the change volume from the relationship.

An invocation example

rmvdisk -force vdisk5

The resulting output:

No feedback

An invocation example

rmvdisk -removehostmappings vdisk3

The resulting output:

No feedback