rmvdisk
Use the rmvdisk command to delete a volume. You cannot use this command for volumes that are replicated or in storage partitions.
Syntax
Parameters
- -force
- (Optional) The specified volume is to be deleted, even if mappings still exist between this
volume and one or more hosts. Host-to-volume mappings and any FlashCopy® mappings that
exist for this volume are deleted.
Important: If you stop a FlashCopy mapping that has dependent FlashCopy mappings, the dependent mapping target volumes might become unusable.
To determine your dependent FlashCopy mappings before you use the -force parameter, run the lsfcmapdependentmaps command.
Important: To prevent an active volume from being deleted unintentionally, you can use a global system setting to enable volume protection (see parameters -vdiskprotectionenabled and -vdiskprotectiontime in the chsystem command). You can specify a time period for which the volume must be idle before you can delete it. If volume protection is enabled and the time period is not expired, the volume deletion fails even if the -force or -removehostmappings parameters are used.If the -force deletion of a volume causes dependent mappings to be stopped, any target volumes for those mappings that are in 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 volume data loss.If you do not specify this parameter, a volume cannot be deleted while a backup operation is in progress. Additionally, a volume that contains image mode copies cannot be deleted while a restore operation is in progress (if the volume contains inconsistent data).
- -removehostmappings
- (Optional) Removes all host mappings for the specified volume before the volume is deleted.
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 volume data loss.Important: To prevent an active volume from being deleted unintentionally, you can use a global system setting to enable volume protection (see parameters -vdiskprotectionenabled and -vdiskprotectiontime in the chsystem command). You can specify a time period for which the volume must be idle before you can delete it. If volume protection is enabled and the time period is not expired, the volume deletion fails even if the -force or -removehostmappings parameters are used.
- vdisk_id | vdisk_name
- Specifies the name of the volume to delete, either by ID or by name.
Description
- Volume protection is enabled (by using the command chsystem) and the volume that is being removed received I/O within the defined volume protection time period.
- The data reduction pool is corrupted.
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 storage pool.
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 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 (by 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 run 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 pause 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 of the volume, which is 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.
An invocation example
rmvdisk -force vdisk5
The resulting output:
No feedback