You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/storage/elastic-san/elastic-san-delete.md
+15-30Lines changed: 15 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,47 +17,32 @@ Your Elastic storage area network (SAN) resources can be deleted at different re
17
17
18
18
### Windows
19
19
20
-
To delete iSCSI connections to volumes, you'll need to get **StorageTargetIQN**, **StorageTargetPortalHostName**, and **StorageTargetPortalPort** from your Azure Elastic SAN volume.
21
-
22
-
Run the following commands to get these values:
23
-
24
-
```azurepowershell
25
-
# Get the target name and iSCSI portal name to connect a volume to a client
Note down the values for **StorageTargetIQN**, **StorageTargetPortalHostName**, and **StorageTargetPortalPort**, you'll need them for the next commands.
33
-
34
-
In your compute client, retrieve the sessionID for the Elastic SAN volumes you'd like to disconnect using `iscsicli SessionList`.
35
-
36
-
Replace **yourStorageTargetIQN**, **yourStorageTargetPortalHostName**, and **yourStorageTargetPortalPort** with the values you kept, then run the following commands from your compute client to disconnect an Elastic SAN volume.
20
+
You can use the following script to delete your connections. To execute it, you require the following parameters:
21
+
- $ResourceGroupName: Resource Group Name
22
+
- $ElasticSanName: Elastic SAN Name
23
+
- $VolumeGroupName: Volume Group Name
24
+
- $VolumeName: List of Volumes to be disconnected (comma separated)
37
25
26
+
Copy the script from [here](https://github.com/Azure-Samples/azure-elastic-san/blob/main/PSH%20(Windows)%20Multi-Session%20Connect%20Scripts/ElasticSanDocScripts0523/disconnect.ps1) 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:
To delete iSCSI connections to volumes, you'll need to get **StorageTargetIQN**, **StorageTargetPortalHostName**, and **StorageTargetPortalPort** from your Azure Elastic SAN volume.
48
-
49
-
Run the following command to get these values:
50
-
51
-
```azurecli
52
-
az elastic-san volume-group list -e $sanName -g $resourceGroupName -v $searchedVolumeGroup -n $searchedVolume
53
-
```
34
+
You can use the following script to create your connections. To execute it, you will require the following parameters:
54
35
55
-
Note down the values for **StorageTargetIQN**, **StorageTargetPortalHostName**, and **StorageTargetPortalPort**, you'll need them for the next commands.
36
+
- subscription: Subscription ID
37
+
- g: Resource Group Name
38
+
- e: Elastic SAN Name
39
+
- v: Volume Group Name
40
+
- n <vol1, vol2, ...>: Names of volumes 1 and 2 and other volume names that you might require, comma separated
56
41
57
-
Replace **yourStorageTargetIQN**, **yourStorageTargetPortalHostName**, and **yourStorageTargetPortalPort** with the values you kept, then run the following commands from your compute client to connect an Elastic SAN volume.
42
+
Copy the script from [here](https://github.com/Azure-Samples/azure-elastic-san/blob/main/CLI%20(Linux)%20Multi-Session%20Connect%20Scripts/disconnect_for_documentation.py)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:
0 commit comments