Skip to content

Commit 00a5e56

Browse files
authored
Merge pull request #254673 from adarshv98/patch-2
Elastic SAN doc updates
2 parents a9aa0ef + 4daa54f commit 00a5e56

File tree

4 files changed

+45
-196
lines changed

4 files changed

+45
-196
lines changed

articles/storage/elastic-san/elastic-san-connect-linux.md

Lines changed: 20 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -26,25 +26,25 @@ In this article, you'll add the Storage service endpoint to an Azure virtual net
2626

2727
[!INCLUDE [elastic-san-regions](../../../includes/elastic-san-regions.md)]
2828

29-
## Connect to a volume
29+
## Connect to volumes
3030

31-
You can either create single sessions or multiple-sessions to every Elastic SAN volume based on your application's multi-threaded capabilities and performance requirements. To achieve higher IOPS and throughput to a volume and reach its maximum limits, use multiple sessions and adjust the queue depth and IO size as needed, if your workload allows.
31+
### Set up your client environment
3232

33-
When using multiple sessions, generally, you should aggregate them with Multipath I/O. It allows you to aggregate multiple sessions from an iSCSI initiator to the target into a single device, and can improve performance by optimally distributing I/O over all available paths based on a load balancing policy.
33+
#### Enable iSCSI Initiator
3434

35-
### Environment setup
36-
37-
To create iSCSI connections from a Linux client, install the iSCSI initiator package. The exact command may vary depending on your distribution, and you should consult their documentation if necessary.
35+
To create iSCSI connections from a Linux client, install the iSCSI initiator package. The exact command might vary depending on your distribution, and you should consult their documentation if necessary.
3836

3937
As an example, with Ubuntu you'd use `sudo apt install open-iscsi`, with SUSE Linux Enterprise Server (SLES) you'd use `sudo zypper install open-iscsi` and with Red Hat Enterprise Linux (RHEL) you'd use `sudo yum install iscsi-initiator-utils`.
4038

41-
#### Multipath I/O - for multi-session connectivity
39+
#### Install Multipath I/O
40+
41+
To achieve higher IOPS and throughput to a volume and reach its maximum limits, you need to create multiple-sessions from the iSCSI initiator to the target volume based on your application's multi-threaded capabilities and performance requirements. You need Multipath I/O to aggregate these multiple paths into a single device, and to improve performance by optimally distributing I/O over all available paths based on a load balancing policy.
4242

4343
Install the Multipath I/O package for your Linux distribution. The installation will vary based on your distribution, and you should consult their documentation. As an example, on Ubuntu the command would be `sudo apt install multipath-tools`, for SLES the command would be `sudo zypper install multipath-tools` and for RHEL the command would be `sudo yum install device-mapper-multipath`.
4444

4545
Once you've installed the package, check if **/etc/multipath.conf** exists. If **/etc/multipath.conf** doesn't exist, create an empty file and use the settings in the following example for a general configuration. As an example, `mpathconf --enable` will create **/etc/multipath.conf** on RHEL.
4646

47-
You'll need to make some modifications to **/etc/multipath.conf**. You'll need to add the devices section in the following example, and the defaults section in the following example sets some defaults are generally applicable. If you need to make any other specific configurations, such as excluding volumes from the multipath topology, see the main page for multipath.conf.
47+
You'll need to make some modifications to **/etc/multipath.conf**. You'll need to add the devices section in the following example, and the defaults section in the following example sets some defaults are generally applicable. If you need to make any other specific configurations, such as excluding volumes from the multipath topology, see the manual page for multipath.conf.
4848

4949
```config
5050
defaults {
@@ -64,80 +64,27 @@ devices {
6464

6565
After creating or modifying the file, restart Multipath I/O. On Ubuntu, the command is `sudo systemctl restart multipath-tools.service` and on RHEL and SLES the command is `sudo systemctl restart multipathd`.
6666

67-
### Gather information
68-
69-
Before you can connect to a volume, you'll need to get **StorageTargetIQN**, **StorageTargetPortalHostName**, and **StorageTargetPortalPort** from your Azure resources.
70-
71-
Run the following command to get these values:
72-
73-
```azurecli
74-
# Connect to Azure
75-
az login
76-
77-
# Get volume information
78-
az elastic-san volume show -e yourSanName -g yourResourceGroup -v yourVolumeGroupName -n yourVolumeName
79-
```
80-
81-
You should see a list of output that looks like the following:
82-
83-
:::image type="content" source="media/elastic-san-create/elastic-san-volume.png" alt-text="Screenshot of command output." lightbox="media/elastic-san-create/elastic-san-volume.png":::
8467

68+
### Attach Volumes to the client
8569

86-
Note down the values for **targetIQN**, **targetPortalHostName**, and **targetPortalPort**, you'll need them for the next sections.
70+
You can use the following script to create your connections. To execute it, you will require the following parameters:
71+
- subscription: Subscription ID
72+
- g: Resource Group Name
73+
- e: Elastic SAN Name
74+
- v: Volume Group Name
75+
- n <vol1, vol2, ...>: Names of volumes 1 and 2 and other volume names that you might require, comma separated
76+
- s: Number of sessions to each volume (set to 32 by default)
8777

88-
## Determine sessions to create
89-
90-
You can either create single sessions or multiple-sessions to every Elastic SAN volume based on your application's multi-threaded capabilities and performance requirements. To achieve higher IOPS and throughput to a volume and reach its maximum limits, use multiple sessions and adjust the queue depth and IO size as needed, if your workload allows.
91-
92-
For multi-session connections, install [Multipath I/O - for multi-session connectivity](#multipath-io---for-multi-session-connectivity).
93-
94-
### Multi-session connections
95-
96-
To establish multiple sessions to a volume, first you'll need to create a single session with particular parameters.
97-
98-
To establish persistent iSCSI connections, modify **node.startup** in **/etc/iscsi/iscsid.conf** from **manual** to **automatic**.
99-
100-
Replace **yourTargetIQN**, **yourTargetPortalHostName**, and **yourTargetPortalPort** with the values you kept, then run the following commands from your compute client to connect an Elastic SAN volume.
78+
Copy the script from [here](https://github.com/Azure-Samples/azure-elastic-san/blob/main/CLI%20(Linux)%20Multi-Session%20Connect%20Scripts/connect_for_documentation.py) and save it as a .py file, for example, connect.py. Then execute it with the required parameters. The following is an example of how you'd run the script:
10179

10280
```bash
103-
sudo iscsiadm -m node --targetname yourTargetIQN --portal yourTargetPortalHostName:yourTargetPortalPort -o new
104-
105-
sudo iscsiadm -m node --targetname yourTargetIQN -p yourTargetPortalHostName:yourTargetPortalPort -l
106-
```
107-
108-
Then, get the session ID and create as many sessions as needed with the session ID. To get the session ID, run `iscsiadm -m session` and you should see output similar to the following:
109-
110-
```output
111-
tcp:[15] <name>:port,-1 <iqn>
112-
tcp:[18] <name>:port,-1 <iqn>
113-
```
114-
15 is the session ID we'll use from the previous example.
115-
116-
The following script is a loop that creates as many additional sessions as you specify. Replace **numberOfAdditionalSessions** with your desired number of additional sessions and replace **sessionID** with the session ID you'd like to use, then run the script.
117-
118-
```bash
119-
sudo for i in `seq 1 numberOfAdditionalSessions`; do sudo iscsiadm -m session -r sessionID --op new; done
81+
./connect.py --subscription <subid> -g <rgname> -e <esanname> -v <vgname> -n <vol1, vol2> -s 32
12082
```
12183

12284
You can verify the number of sessions using `sudo multipath -ll`
12385

124-
When you've finished creating sessions for each of your volumes, run the following command once for each volume you'd like to maintain persistent connections to. This keeps the volume's connections active when your client reboots.
125-
126-
```bash
127-
sudo iscsiadm -m node --targetname yourTargetIQN --portal yourTargetPortalHostName:yourTargetPortalPort --op update -n node.session.nr_sessions -v numberofAdditionalSessions+1
128-
```
129-
130-
### Single-session connections
131-
132-
To establish persistent iSCSI connections, modify **node.startup** in **/etc/iscsi/iscsid.conf** from **manual** to **automatic**.
133-
134-
Replace **yourTargetIQN**, **yourTargetPortalHostName**, and **yourTargetPortalPort** with the values you kept, then run the following commands from your compute client to connect an Elastic SAN volume.
135-
136-
```bash
137-
sudo iscsiadm -m node --targetname yourTargetIQN --portal yourTargetPortalHostName:yourTargetPortalPort -o new
138-
139-
sudo iscsiadm -m node --targetname yourTargetIQN -p yourTargetPortalHostName:yourTargetPortalPort -l
140-
```
86+
#### Number of sessions
87+
You need to use 32 sessions to each target volume to achieve its maximum IOPS and/or throughput limits.
14188

14289
## Next steps
14390

articles/storage/elastic-san/elastic-san-connect-windows.md

Lines changed: 21 additions & 120 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ms.custom: references_regions, ignite-2022
1313

1414
This article explains how to connect to an Elastic storage area network (SAN) volume from a Windows client. For details on connecting from a Linux client, see [Connect to Elastic SAN Preview volumes - Linux](elastic-san-connect-linux.md).
1515

16-
In this article, you'll add the Storage service endpoint to an Azure virtual network's subnet, then you'll configure your volume group to allow connections from your subnet. Finally, you'll configure your client environment to connect to an Elastic SAN volume and establish a connection.
16+
In this article, you add the Storage service endpoint to an Azure virtual network's subnet, then you configure your volume group to allow connections from your subnet. Finally, you configure your client environment to connect to an Elastic SAN volume and establish a connection. For best performance, ensure that your VM and your Elastic SAN are in the same zone.
1717

1818
## Prerequisites
1919

@@ -26,14 +26,10 @@ In this article, you'll add the Storage service endpoint to an Azure virtual net
2626

2727
[!INCLUDE [elastic-san-regions](../../../includes/elastic-san-regions.md)]
2828

29-
## Connect to a volume
30-
31-
You can either create single sessions or multiple-sessions to every Elastic SAN volume based on your application's multi-threaded capabilities and performance requirements. To achieve higher IOPS and throughput to a volume and reach its maximum limits, use multiple sessions and adjust the queue depth and IO size as needed, if your workload allows.
32-
33-
When using multiple sessions, generally, you should aggregate them with Multipath I/O. It allows you to aggregate multiple sessions from an iSCSI initiator to the target into a single device, and can improve performance by optimally distributing I/O over all available paths based on a load balancing policy.
34-
35-
### Set up your environment
29+
## Connect to volumes
3630

31+
### Set up your client environment
32+
#### Enable iSCSI Initiator
3733
To create iSCSI connections from a Windows client, confirm the iSCSI service is running. If it's not, start the service, and set it to start automatically.
3834

3935
```powershell
@@ -47,7 +43,9 @@ Start-Service -Name MSiSCSI
4743
Set-Service -Name MSiSCSI -StartupType Automatic
4844
```
4945

50-
#### Multipath I/O - for multi-session connectivity
46+
#### Install Multipath I/O
47+
48+
To achieve higher IOPS and throughput to a volume and reach its maximum limits, you need to create multiple-sessions from the iSCSI initiator to the target volume based on your application's multi-threaded capabilities and performance requirements. You need Multipath I/O to aggregate these multiple paths into a single device, and to improve performance by optimally distributing I/O over all available paths based on a load balancing policy.
5149

5250
Install Multipath I/O, enable multipath support for iSCSI devices, and set a default load balancing policy.
5351

@@ -66,124 +64,27 @@ Enable-MSDSMAutomaticClaim -BusType iSCSI
6664
Set-MSDSMGlobalDefaultLoadBalancePolicy -Policy RR
6765
```
6866

69-
### Gather information
67+
### Attach Volumes to the client
7068

71-
Before you can connect to a volume, you'll need to get **StorageTargetIQN**, **StorageTargetPortalHostName**, and **StorageTargetPortalPort** from your Azure Elastic SAN volume.
69+
You can use the following script to create your connections. To execute it, you require the following parameters:
70+
- $rgname: Resource Group Name
71+
- $esanname: Elastic SAN Name
72+
- $vgname: Volume Group Name
73+
- $vol1: First Volume Name
74+
- $vol2: Second Volume Name
75+
and other volume names that you might require
76+
- 32: Number of sessions to each volume
7277

73-
Fill in the variables with your values, then run the following commands:
78+
Copy the script from [here](https://github.com/Azure-Samples/azure-elastic-san/blob/main/CLI%20(Linux)%20Multi-Session%20Connect%20Scripts/connect_for_documentation.py) and save it as a .ps1 file, for example, connect.ps1. Then execute it with the required parameters. The following is an example of how to run the script:
7479

75-
```azurepowershell
76-
# Connect to Azure
77-
Connect-AzAccount
78-
79-
# Get the target name and iSCSI portal name to connect a volume to a client
80-
$resourceGroupName="yourRGName"
81-
$sanName="yourSANName"
82-
$volumeGroup="yourVolumeGroupName"
83-
$volumeName="yourVolumeName"
84-
85-
$connectVolume = Get-AzElasticSanVolume -ResourceGroupName $resourceGroupName -ElasticSanName $sanName -VolumeGroupName $volumeGroup -Name $volumeName
86-
$connectVolume.storagetargetiqn
87-
$connectVolume.storagetargetportalhostname
88-
$connectVolume.storagetargetportalport
89-
```
90-
91-
Note down the values for **StorageTargetIQN**, **StorageTargetPortalHostName**, and **StorageTargetPortalPort**, you'll need them for the next sections.
92-
93-
## Determine sessions to create
94-
95-
You can either create single sessions or multiple-sessions to every Elastic SAN volume based on your application's multi-threaded capabilities and performance requirements. To achieve higher IOPS and throughput to a volume and reach its maximum limits, use multiple sessions and adjust the queue depth and IO size as needed, if your workload allows.
96-
97-
For multi-session connections, install [Multipath I/O - for multi-session connectivity](#multipath-io---for-multi-session-connectivity).
98-
99-
### Multi-session configuration
100-
101-
To create multiple sessions to each volume, you must configure the target and connect to it multiple times, based on the number of sessions you want to that volume.
102-
103-
You can use the following scripts to create your connections.
104-
105-
To script multi-session configurations, use two files. An XML configuration file includes the information for each volume you'd like to establish connections to, and a script that uses the XML files to create connections.
106-
107-
The following example shows you how to format your XML file for the script, for each volume, create a new `<Target>` section:
108-
109-
```xml
110-
<?xml version="1.0" encoding="utf-8"?>
111-
<Targets>
112-
<Target>
113-
<Iqn>Volume 1 Storage Target Iqn</Iqn>
114-
<Hostname>Volume 1 Storage Target Portal Hostname</Hostname>
115-
<Port>Volume 1 Storage Target Portal Port</Port>
116-
<NumSessions>Number of sessions</NumSessions>
117-
<EnableMultipath>true</EnableMultipath>
118-
</Target>
119-
<Target>
120-
<Iqn>Volume 2 Storage Target Iqn</Iqn>
121-
<Hostname>Volume 2 Storage Target Portal Hostname</Hostname>
122-
<Port>Volume 2 Storage Target Portal Port</Port>
123-
<NumSessions>Number of sessions</NumSessions>
124-
<EnableMultipath>true</EnableMultipath>
125-
</Target>
126-
</Targets>
127-
```
128-
129-
Use the following script to create the connections, to run the script use `.\LoginTarget.ps1 -TargetConfigPath [path to config.xml]`:
130-
131-
```
132-
param(
133-
[string] $TargetConfigPath
134-
)
135-
$TargetConfig = New-Object XML
136-
$TargetConfig.Load($TargetConfigPath)
137-
foreach ($Target in $TargetConfig.Targets.Target)
138-
{
139-
$TargetIqn = $Target.Iqn
140-
$TargetHostname = $Target.Hostname
141-
$TargetPort = $Target.Port
142-
$NumSessions = $Target.NumSessions
143-
$succeeded = 1
144-
iscsicli AddTarget $TargetIqn * $TargetHostname $TargetPort * 0 * * * * * * * * * 0
145-
while ($succeeded -le $NumSessions)
146-
{
147-
Write-Host "Logging session ${succeeded}/${NumSessions} into ${TargetIqn}"
148-
$LoginOptions = '*'
149-
if ($Target.EnableMultipath)
150-
{
151-
Write-Host "Enabled Multipath"
152-
$LoginOptions = '0x00000002'
153-
}
154-
# PersistentLoginTarget will not establish login to the target until after the system is rebooted.
155-
# Use LoginTarget if the target is needed before rebooting. Using just LoginTarget will not persist the
156-
# session(s).
157-
iscsicli PersistentLoginTarget $TargetIqn t $TargetHostname $TargetPort Root\ISCSIPRT\0000_0 -1 * $LoginOptions * * * * * * * * * 0
158-
#iscsicli LoginTarget $TargetIqn t $TargetHostname $TargetPort Root\ISCSIPRT\0000_0 -1 * $LoginOptions * * * * * * * * * 0
159-
if ($LASTEXITCODE -eq 0)
160-
{
161-
$succeeded += 1
162-
}
163-
Start-Sleep -s 1
164-
Write-Host ""
165-
}
166-
}
80+
```bash
81+
./connnect.ps1 $rgname $esanname $vgname $vol1,$vol2,$vol3 32
16782
```
16883

16984
Verify the number of sessions your volume has with either `iscsicli SessionList` or `mpclaim -s -d`
17085

171-
### Single-session configuration
172-
173-
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. If you'd like to modify these commands, run `iscsicli commandHere -?` for information on the command and its parameters.
174-
175-
```
176-
# Add target IQN
177-
# The *s are essential, as they are default arguments
178-
iscsicli AddTarget yourStorageTargetIQN * yourStorageTargetPortalHostName yourStorageTargetPortalPort * 0 * * * * * * * * * 0
179-
180-
# Login
181-
# The *s are essential, as they are default arguments
182-
iscsicli LoginTarget yourStorageTargetIQN t yourStorageTargetPortalHostName yourStorageTargetPortalPort Root\ISCSIPRT\0000_0 -1 * * * * * * * * * * * 0
183-
184-
# This command instructs the system to automatically reconnect after a reboot
185-
iscsicli PersistentLoginTarget yourStorageTargetIQN t yourStorageTargetPortalHostName yourStorageTargetPortalPort Root\ISCSIPRT\0000_0 -1 * * * * * * * * * * * 0
186-
```
86+
#### Number of sessions
87+
You need to use 32 sessions to each target volume to achieve its maximum IOPS and/or throughput limits. Windows iSCSI initiator has a limit of maximum 256 sessions. If you need to connect more than 8 volumes to a Windows client, reduce the number of sessions to each volume.
18788

18889
## Next steps
18990

articles/storage/elastic-san/elastic-san-create.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ There are no additional registration steps required.
3232
1. Select **+ Create a new SAN**
3333
1. On the basics page, fill in the appropriate values.
3434
- **Elastic SAN name** must be between 3 and 24 characters long. The name may only contain lowercase letters, numbers, hyphens and underscores, and must begin and end with a letter or a number. Each hyphen and underscore must be preceded and followed by an alphanumeric character.
35+
For best performance, your SAN should be in the same zone as your VM.
3536

3637
1. Specify the amount of base capacity you require, and any additional capacity, then select next.
3738

articles/storage/elastic-san/elastic-san-performance.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Your application's performance gets throttled when it requests more IOPS or thro
2020

2121
### Elastic SAN performance
2222

23-
An Elastic SAN has three attributes that determine its performance: total capacity, IOPS, and throughput.
23+
An Elastic SAN has three attributes that determine its performance: total capacity, IOPS, and throughput. For the best possible performance, your SAN should be in the same zone as the VM you're provisioning.
2424

2525
### Capacity
2626

@@ -64,7 +64,7 @@ Each of the example scenarios in this article uses the following configuration f
6464

6565
## Example scenarios
6666

67-
The following example scenarios depict how your Elastic SAN handles performance allocation.
67+
The following example scenarios depict how your Elastic SAN handles performance allocation. For best performance, both the VMs and the SAN need to be in the same zone.
6868

6969
### Typical workload
7070

@@ -114,4 +114,4 @@ In this scenario, all the workloads hit their spike at almost the same time. At
114114

115115
## Next steps
116116

117-
[Deploy an Elastic SAN (preview)](elastic-san-create.md).
117+
[Deploy an Elastic SAN (preview)](elastic-san-create.md).

0 commit comments

Comments
 (0)