Skip to content

Commit 84b2027

Browse files
Merge pull request #227853 from roygara/connectFix
Fixing special characters
2 parents b875439 + 6ede314 commit 84b2027

File tree

2 files changed

+57
-57
lines changed

2 files changed

+57
-57
lines changed

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn how to connect to an Azure Elastic SAN (preview) volume from
44
author: roygara
55
ms.service: storage
66
ms.topic: how-to
7-
ms.date: 11/07/2022
7+
ms.date: 02/17/2023
88
ms.author: rogarana
99
ms.subservice: elastic-san
1010
ms.custom: references_regions, ignite-2022
@@ -117,17 +117,17 @@ You'll need to make some modifications to **/etc/multipath.conf**. You'll need t
117117

118118
```
119119
defaults {
120-
    user_friendly_names yes # To create ‘mpathn’ names for multipath devices
121-
    path_grouping_policy multibus # To place all the paths in one priority group
122-
    path_selector "round-robin 0" # To use round robin algorithm to determine path for next I/O operation
123-
    failback immediate # For immediate failback to highest priority path group with active paths
124-
    no_path_retry 1 # To disable I/O queueing after retrying once when all paths are down
120+
user_friendly_names yes # To create ‘mpathn’ names for multipath devices
121+
path_grouping_policy multibus # To place all the paths in one priority group
122+
path_selector "round-robin 0" # To use round robin algorithm to determine path for next I/O operation
123+
failback immediate # For immediate failback to highest priority path group with active paths
124+
no_path_retry 1 # To disable I/O queueing after retrying once when all paths are down
125125
}
126126
devices {
127-
device {
128-
    vendor "MSFT"
129-
    product "Virtual HD"
130-
}
127+
device {
128+
vendor "MSFT"
129+
product "Virtual HD"
130+
}
131131
}
132132
```
133133

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

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn how to connect to an Azure Elastic SAN (preview) volume from
44
author: roygara
55
ms.service: storage
66
ms.topic: how-to
7-
ms.date: 11/07/2022
7+
ms.date: 02/17/2023
88
ms.author: rogarana
99
ms.subservice: elastic-san
1010
ms.custom: references_regions, ignite-2022
@@ -122,7 +122,7 @@ Install Multipath I/O, enable multipath support for iSCSI devices, and set a def
122122

123123
```powershell
124124
# Install Multipath-IO
125-
Add-WindowsFeature-Name'Multipath-IO'
125+
Add-WindowsFeature -Name 'Multipath-IO'
126126
127127
# Verify if the installation was successful
128128
Get-WindowsFeature -Name 'Multipath-IO'
@@ -168,62 +168,62 @@ To script multi-session configurations, use two files. An XML configuration file
168168
The following example shows you how to format your XML file for the script, for each volume, create a new `<Target>` section:
169169

170170
```xml
171-
<?xmlversion="1.0"encoding="utf-8"?>
171+
<?xml version="1.0" encoding="utf-8"?>
172172
<Targets>
173-
  <Target>
174-
     <Iqn>Volume 1 Storage Target Iqn</Iqn>
175-
     <Hostname>Volume 1 Storage Target Portal Hostname</Hostname>
176-
     <Port>Volume 1 Storage Target Portal Port</Port>
177-
     <NumSessions>Number of sessions</NumSessions>
178-
     <EnableMultipath>true</EnableMultipath>
179-
  </Target>
180-
  <Target>
181-
     <Iqn>Volume 2 Storage Target Iqn</Iqn>
182-
     <Hostname>Volume 2 Storage Target Portal Hostname</Hostname>
183-
     <Port>Volume 2 Storage Target Portal Port</Port>
184-
     <NumSessions>Number of sessions</NumSessions>
185-
     <EnableMultipath>true</EnableMultipath>
186-
  </Target>
173+
<Target>
174+
<Iqn>Volume 1 Storage Target Iqn</Iqn>
175+
<Hostname>Volume 1 Storage Target Portal Hostname</Hostname>
176+
<Port>Volume 1 Storage Target Portal Port</Port>
177+
<NumSessions>Number of sessions</NumSessions>
178+
<EnableMultipath>true</EnableMultipath>
179+
</Target>
180+
<Target>
181+
<Iqn>Volume 2 Storage Target Iqn</Iqn>
182+
<Hostname>Volume 2 Storage Target Portal Hostname</Hostname>
183+
<Port>Volume 2 Storage Target Portal Port</Port>
184+
<NumSessions>Number of sessions</NumSessions>
185+
<EnableMultipath>true</EnableMultipath>
186+
</Target>
187187
</Targets>
188188
```
189189

190190
Use the following script to create the connections, to run the script use `.\LoginTarget.ps1 -TargetConfigPath [path to config.xml]`:
191191

192192
```
193193
param(
194-
  [string]$TargetConfigPath
194+
[string] $TargetConfigPath
195195
)
196-
$TargetConfig = New-ObjectXML
196+
$TargetConfig = New-Object XML
197197
$TargetConfig.Load($TargetConfigPath)
198-
foreach($Target in $TargetConfig.Targets.Target)
198+
foreach ($Target in $TargetConfig.Targets.Target)
199199
{
200-
  $TargetIqn = $Target.Iqn
201-
  $TargetHostname = $Target.Hostname
202-
  $TargetPort = $Target.Port
203-
  $NumSessions = $Target.NumSessions
204-
  $succeeded = 1
205-
  iscsicliAddTarget$TargetIqn * $TargetHostname$TargetPort * 0 * * * * * * * * * 0
206-
  while($succeeded-le$NumSessions)
207-
  {
208-
    Write-Host"Loggingsession${succeeded}/${NumSessions}into${TargetIqn}"
209-
    $LoginOptions = '*'
210-
    if ($Target.EnableMultipath)
211-
    {
212-
        Write-Host"EnabledMultipath"
213-
        $LoginOptions = '0x00000002'
214-
    }
215-
    # PersistentLoginTarget will not establish login to the target until after the system is rebooted.
216-
    # Use LoginTarget if the target is needed before rebooting. Using just LoginTarget will not persist the
217-
    # session(s).
218-
    iscsicliPersistentLoginTarget$TargetIqn t $TargetHostname$TargetPortRoot\ISCSIPRT\0000_0 -1 * $LoginOptions * * * * * * * * * 0
219-
    #iscsicliLoginTarget$TargetIqn t $TargetHostname$TargetPortRoot\ISCSIPRT\0000_0 -1 * $LoginOptions * * * * * * * * * 0
220-
    if ($LASTEXITCODE-eq0)
221-
    {
222-
        $succeeded += 1
223-
    }
224-
    Start-Sleep -s 1
225-
    Write-Host""
226-
  }
200+
$TargetIqn = $Target.Iqn
201+
$TargetHostname = $Target.Hostname
202+
$TargetPort = $Target.Port
203+
$NumSessions = $Target.NumSessions
204+
$succeeded = 1
205+
iscsicli AddTarget $TargetIqn * $TargetHostname $TargetPort * 0 * * * * * * * * * 0
206+
while ($succeeded -le $NumSessions)
207+
{
208+
Write-Host "Logging session ${succeeded}/${NumSessions} into ${TargetIqn}"
209+
$LoginOptions = '*'
210+
if ($Target.EnableMultipath)
211+
{
212+
Write-Host "Enabled Multipath"
213+
$LoginOptions = '0x00000002'
214+
}
215+
# PersistentLoginTarget will not establish login to the target until after the system is rebooted.
216+
# Use LoginTarget if the target is needed before rebooting. Using just LoginTarget will not persist the
217+
# session(s).
218+
iscsicli PersistentLoginTarget $TargetIqn t $TargetHostname $TargetPort Root\ISCSIPRT\0000_0 -1 * $LoginOptions * * * * * * * * * 0
219+
#iscsicli LoginTarget $TargetIqn t $TargetHostname $TargetPort Root\ISCSIPRT\0000_0 -1 * $LoginOptions * * * * * * * * * 0
220+
if ($LASTEXITCODE -eq 0)
221+
{
222+
$succeeded += 1
223+
}
224+
Start-Sleep -s 1
225+
Write-Host ""
226+
}
227227
}
228228
```
229229

0 commit comments

Comments
 (0)