Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Your Elastic SAN resources can be deleted at different resource levels. This article covers the overall deletion process, starting from disconnecting iSCSI connections to volumes, deleting the volumes themselves, deleting a volume group, and deleting an elastic SAN itself. Before you delete your elastic SAN, make sure it's not being used in any running workloads.
Disconnect volumes from clients
Windows
You can use the following script to delete your connections. To execute it, you require the following parameters:
- $ResourceGroupName: Resource Group Name
- $ElasticSanName: Elastic SAN Name
- $VolumeGroupName: Volume Group Name
- $VolumeName: List of Volumes to be disconnected (comma separated)
Copy the script from here and save it as a .ps1 file, for example, disconnect.ps1. Then execute it with the required parameters. The following is an example of how to run the script:
./disconnect.ps1 $ResourceGroupName $ElasticSanName $VolumeGroupName $VolumeName
Linux
You can use the following script to create your connections. To execute it, you'll require the following parameters:
- subscription: Subscription ID
- g: Resource Group Name
- e: Elastic SAN Name
- v: Volume Group Name
- n <vol1, vol2, ...>: Names of volumes 1 and 2 and other volume names that you might require, comma separated
Copy the script from here and save it as a .py file, for example, disconnect.py. Then execute it with the required parameters. The following is an example of how you'd run the script:
./disconnect.py --subscription <subid> -g <rgname> -e <esanname> -v <vgname> -n <vol1, vol2>
Delete a SAN
You can delete your SAN by using the Azure portal, Azure PowerShell, or Azure CLI. If you delete a SAN or a volume group, the corresponding child resources are deleted along with it. The delete commands for each of the resource levels are below.
Delete a volume
The following command deletes a volume. If you set ForceDelete
to true
, then your volume is deleted even when there are active iSCSI connections. If you set -DeleteSnapshot
to true
, it deletes all snapshots associated with the volume, and the volume itself.
Remove-AzElasticSanVolume -ResourceGroupName $resourceGroupName -ElasticSanName $sanName -VolumeGroupName $volumeGroupName -Name $volumeName -ForceDelete false -DeleteSnapshot false
Delete a volume group
Remove-AzElasticSanVolumeGroup -ResourceGroupName $resourceGroupName -ElasticSanName $sanName -Name $volumeGroupName
Delete the entire SAN
Remove-AzElasticSan -ResourceGroupName $resourceGroupName -Name $sanName