The rmvdisk command deletes a virtual disk (VDisk).
>>- svctask -- -- rmvdisk -- --+----------+-- ------------------> '- -force -' >--+- vdisk_id ---+-------------------------------------------->< '- vdisk_name -'
This command deletes an existing managed mode virtual disk or an existing image mode virtual disk. The extents that made up this virtual disk are returned to the pool of free extents that are available on the managed disk group, if the VDisk is in managed mode.
When you use this command to delete a managed mode virtual disk, all the data on the virtual disk is deleted. The extents that make up the virtual disk are returned to the pool of free extents that are available in the managed disk group.
If host mappings exist for the virtual disk, 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 virtual disk as source or target are deleted, other mappings in a cascade might be stopped, and then the virtual disk is deleted. The -force parameter also deletes any Metro Mirror or Global Mirror relationships that exist for the specified VDisk.
If the virtual disk is in the process of migrating to an image mode virtual disk (using the svctask migratetoimage command), the deletion fails unless you use the -force parameter. If you use the -force parameter, the migration is halted and then the virtual disk is deleted. Before you issue this command, ensure that the virtual disk (and any data that resides on it) is no longer required.
If the VDisk 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 virtual disk before the VDisk is deleted. This process can take several minutes to complete, and is indicated by the fast_write_state state of the virtual disk being empty. If the -force parameter is specified, the fast-write data is discarded and the virtual disk 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, SVC attempts to move the data out of the cache; this process can time out, however.
If FlashCopy mappings or host mappings exist for the virtual disk, the deletion fails unless you use the -force parameter. If you use the -force parameter, mappings are deleted and the virtual disk is deleted. If there is any data that is not staged in the fast write cache for this virtual disk, the deletion of the virtual disk fails. When the -force parameter is specified, any data that is not staged in the fast write cache is deleted. Deleting an image mode virtual disk causes the managed disk that is associated with the virtual disk to be removed from the managed disk group. The mode of the managed disk is returned to “unmanaged.”
An invocation example
svctask rmvdisk -force vdisk5
The resulting output
No feedback