Skip to content

Commit eb817aa

Browse files
Merge pull request #233800 from msaenzbosupport/patch-10
[Doc-A-Thon] Adding SLES command.
2 parents b8b40ec + a9fe560 commit eb817aa

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -105,17 +105,17 @@ When using multiple sessions, generally, you should aggregate them with Multipat
105105

106106
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.
107107

108-
As an example, with Ubuntu you'd use `sudo apt -y install open-iscsi` and with Red Hat Enterprise Linux (RHEL) you'd use `sudo yum install iscsi-initiator-utils -y`.
108+
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`.
109109

110110
#### Multipath I/O - for multi-session connectivity
111111

112-
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` and for RHEL the command would be `sudo yum install device-mapper-multipath`.
112+
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`.
113113

114114
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.
115115

116116
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 man page for multipath.conf.
117117

118-
```
118+
```config
119119
defaults {
120120
user_friendly_names yes # To create ‘mpathn’ names for multipath devices
121121
path_grouping_policy multibus # To place all the paths in one priority group
@@ -131,7 +131,7 @@ devices {
131131
}
132132
```
133133

134-
After creating or modifying the file, restart Multipath I/O. On Ubuntu, the command is `sudo systemctl restart multipath-tools.service` and on RHEL the command is `sudo systemctl restart multipathd`.
134+
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`.
135135

136136
### Gather information
137137

@@ -164,31 +164,31 @@ To establish persistent iSCSI connections, modify **node.startup** in **/etc/isc
164164

165165
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.
166166

167-
```
168-
iscsiadm -m node --targetname yourTargetIQN --portal yourTargetPortalHostName:yourTargetPortalPort -o new
167+
```bash
168+
sudo iscsiadm -m node --targetname yourTargetIQN --portal yourTargetPortalHostName:yourTargetPortalPort -o new
169169

170-
iscsiadm -m node --targetname yourTargetIQN -p yourTargetPortalHostName:yourTargetPortalPort -l
170+
sudo iscsiadm -m node --targetname yourTargetIQN -p yourTargetPortalHostName:yourTargetPortalPort -l
171171
```
172172

173173
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:
174174

175-
```
175+
```output
176176
tcp:[15] <name>:port,-1 <iqn>
177177
tcp:[18] <name>:port,-1 <iqn>
178178
```
179179
15 is the session ID we'll use from the previous example.
180180

181181
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.
182182

183-
```
184-
for i in `seq 1 numberOfAdditionalSessions`; do sudo iscsiadm -m session -r sessionID --op new; done
183+
```bash
184+
sudo for i in `seq 1 numberOfAdditionalSessions`; do sudo iscsiadm -m session -r sessionID --op new; done
185185
```
186186

187187
You can verify the number of sessions using `sudo multipath -ll`
188188

189189
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.
190190

191-
```
191+
```bash
192192
sudo iscsiadm -m node --targetname yourTargetIQN --portal yourTargetPortalHostName:yourTargetPortalPort --op update -n node.session.nr_sessions -v numberofAdditionalSessions+1
193193
```
194194

@@ -198,10 +198,10 @@ To establish persistent iSCSI connections, modify **node.startup** in **/etc/isc
198198

199199
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.
200200

201-
```
202-
iscsiadm -m node --targetname yourTargetIQN --portal yourTargetPortalHostName:yourTargetPortalPort -o new
201+
```bash
202+
sudo iscsiadm -m node --targetname yourTargetIQN --portal yourTargetPortalHostName:yourTargetPortalPort -o new
203203

204-
iscsiadm -m node --targetname yourTargetIQN -p yourTargetPortalHostName:yourTargetPortalPort -l
204+
sudo iscsiadm -m node --targetname yourTargetIQN -p yourTargetPortalHostName:yourTargetPortalPort -l
205205
```
206206

207207
## Next steps

0 commit comments

Comments
 (0)