This example walks you through connecting Everpure Cloud Dedicated volumes to an Ubuntu 18.04 Linux host. Some steps might be repeated from steps seen earlier in this guide and some steps might be slightly different for different Linux distributions though the same basic concepts apply.
The steps include:
- Configuring the Linux host for iSCSI and MPIO with Everpure Cloud Dedicated
- Host and volume creation on Everpure Cloud Dedicated
- Connecting and mounting Everpure Cloud Dedicated volumes to Linux host
The following instructions cover the 'basics' in terms of setting up Linux Host iSCSI connectivity to Everpure Cloud Dedicated. More in-depth best practices for Linux can be found in this Linux Recommended Settings .
Configuring iSCSI on Linux host initiator with Everpure Cloud Dedicated
On Linux Host
-
SSH into Linux Ubuntu VM instance for which you wish to provision Everpure Cloud Dedicated storage.
-
Install iscsi initiator utils as root:
sudo apt install open-iscsi -
Install lsscs:
sudo apt install lsscsi -
Install multi-path tools:
sudo apt install multipath-tools -
Start iscsi services:
sudo service iscsid start -
Start iSCSI daemon service:
sudo /etc/init.d/open-iscsi restart -
Run command below:
sudo sed -i 's/^\(node\.session\.nr_sessions\s*=\s*\).*$/\116/' /etc/iscsi/iscsid.confNote: This step is optional and may help increase the total bandwidth performance by allowing the application host to create 16 iSCSI sessions per iSCSI connection. This command edits the
/etc/iscsi/iscsid.conffile and changes thenode.session.nr_sessionsfield to 16. The value of 16 is used here as an example - actual performance gains may vary. Customers should always test with their specific workloads to determine the optimal number of sessions, as higher values do not always guarantee better performance. -
Edit the
/etc/iscsi/iscsid.conffile to enable automatic iSCSI login by changing the following parameter:
node.startup = automatic
Example:
#*****************
# Startup settings
#*****************
# To request that the iscsi initd scripts startup a session set to "automatic".
# node.startup = automatic
#
# To manually startup the session set to "manual". The default is manual.
node.startup = automatic
9. Create (or edit) /etc/multipath.conf file with the following contents:
Example:
defaults {
polling_interval 10
user_friendly_names no
find_multipaths yes
}
devices {
device {
vendor "PURE"
product "FlashArray"
path_selector "queue-length 0"
path_grouping_policy group_by_prio
path_checker tur
fast_io_fail_tmo 10
no_path_retry queue
hardware_handler "1 alua"
prio alua
failback immediate
}
}
10. Restart multipathd service to get the multipath.conf changes to take effect:
sudo service multipathd restart
11. Retrieve the Initiator IQN on Ubuntu VM:
sudo cat /etc/iscsi/initiatorname.iscsi
Example:
user@MyUbuntuVM:~$ sudo cat /etc/iscsi/initiatorname.iscsi
## DO NOT EDIT OR REMOVE THIS FILE!
## If you remove this file, the iSCSI daemon will not start.
## If you change the InitiatorName, existing access control lists
## may reject this initiator. The InitiatorName must be unique
## for each iSCSI initiator. Do NOT duplicate iSCSI InitiatorNames.
InitiatorName=iqn.1993-08.org.debian:01:756ae638fabb
12. Configure new udev rules to help with performance a reliability between the host and Everpure Cloud Dedicated volumes.
Create a new udev rules file called 99-pure-storage.rules for Everpure and copy the contents into the file as shown in the following example:
RHEL 6.x, 7.x: vim /etc/udev/rules.d/99-pure-storage.rules
Ubuntu 18: vim /lib/udev/rules.d/99-pure-storage.rules
# Recommended settings for Pure Storage FlashArray.
# Use none scheduler for high-performance solid-state storage
ACTION=="add|change", KERNEL=="sd*[!0-9]", SUBSYSTEM=="block", ENV{ID_VENDOR}=="PURE", ATTR{queue/scheduler}="noop"
# Reduce CPU overhead due to entropy collection
ACTION=="add|change", KERNEL=="sd*[!0-9]", SUBSYSTEM=="block", ENV{ID_VENDOR}=="PURE", ATTR{queue/add_random}="0"
# Spread CPU load by redirecting completions to originating CPU
ACTION=="add|change", KERNEL=="sd*[!0-9]", SUBSYSTEM=="block", ENV{ID_VENDOR}=="PURE", ATTR{queue/rq_affinity}="2"
# Set the HBA timeout to 300 seconds
ACTION=="add", SUBSYSTEMS=="scsi", ATTRS{model}=="FlashArray ", RUN+="/bin/sh -c 'echo 300 > /sys/$DEVPATH/device/timeout'"
In RHEL 8.x, SuSE 15.2, Ubuntu 20+ and higher 'noop' no longer exists and has been replaced by 'none'. The paths to udev rules remain the same as in older versions (see above):
# Recommended settings for Pure Storage FlashArray.
# Use none scheduler for high-performance solid-state storage for SCSI devices
ACTION=="add|change", KERNEL=="sd*[!0-9]", SUBSYSTEM=="block", ENV{ID_VENDOR}=="PURE", ATTR{queue/scheduler}="none"
ACTION=="add|change", KERNEL=="dm-[0-9]*", SUBSYSTEM=="block", ENV{DM_NAME}=="3624a937*", ATTR{queue/scheduler}="none"
# Reduce CPU overhead due to entropy collection
ACTION=="add|change", KERNEL=="sd*[!0-9]", SUBSYSTEM=="block", ENV{ID_VENDOR}=="PURE", ATTR{queue/add_random}="0"
ACTION=="add|change", KERNEL=="dm-[0-9]*", SUBSYSTEM=="block", ENV{DM_NAME}=="3624a937*", ATTR{queue/add_random}="0"
# Spread CPU load by redirecting completions to originating CPU
ACTION=="add|change", KERNEL=="sd*[!0-9]", SUBSYSTEM=="block", ENV{ID_VENDOR}=="PURE", ATTR{queue/rq_affinity}="2"
ACTION=="add|change", KERNEL=="dm-[0-9]*", SUBSYSTEM=="block", ENV{DM_NAME}=="3624a937*", ATTR{queue/rq_affinity}="2"
# Set the HBA timeout to 300 seconds
ACTION=="add|change", KERNEL=="sd*[!0-9]", SUBSYSTEM=="block", ENV{ID_VENDOR}=="PURE", ATTR{device/timeout}="300"
On the Everpure Cloud Dedicated Instance
13. Log onto the Everpure Cloud Dedicated instance via SSH using the Everpure Cloud Dedicated Management IP address.
14. Create a hostname on the Everpure Cloud Dedicated instance and associate it with the Linux Ubuntu initiator IQN in previous step:
purehost create --iqnlist <IQN number> <hostname>
where:
<IQN number> is the initiator IQN number gathered in step 11.
<hostname> is the desired hostname for your existing Ubuntu VM in Azure.
Example:
pureuser@MyCBS> purehost create --iqnlist iqn.1994-05.com.redhat:361dfc3de387 MyUbuntuVM
Name WWN IQN NQN Host Group
MyUbuntuVM - iqn.1994-05.com.redhat:361dfc3de387 - -
15. Create volume on Pure:
purevol create <vol name> --size <volume size>
where:
<vol name> is the desired
name of the Everpure Cloud Dedicated volume.
<volume size> is the volume size (ex: 50M, 50G, 10T).
This example shows the creation of a 2 TB volume:
pureuser@MyCBS> purevol create vol1 --size 2TB
Name Size Source Created Serial
vol1 2T - 2019-09-09 11:41:55 PDT 2B60622E2B014A2200011010
16. Connect volume to the Ubuntu host VM:
purevol connect <vol name> --host <hostname>
where:
<vol name> is the name of the
Everpure Cloud Dedicated volume.
<hostname> is the name of your Ubuntu VM.
Example:
pureuser@MyCBS> purevol connect vol1 --host MyUbuntuVM
Name Host Group Host LUN
vol1 - MyUbuntuVM 1
To check the connection between your volumes and hosts, run:
purevol list --connect
17. Collect the IP addresses of each controller and the IQN number for Everpure Cloud Dedicated. The IQN is identical for both iSCSI interfaces.
pureport list
Example
pureuser@MyCBS> pureport list
Name WWN Portal IQN NQN Failover
CT0.ETH2 - 172.16.180.8:3260 iqn.2010-06.com.purestorage:flasharray.81ce503fd81d0c8 - -
CT1.ETH2 - 172.16.180.11:3260 iqn.2010-06.com.purestorage:flasharray.81ce503fd81d0c8 - -
vphan@CBSwestus2van>
iSCSI login
On the Linux host:
18. Create a new iSCSI interface on the Linux host initiator.
sudo iscsiadm -m iface -I iscsi0 -o new
Example:
user@MyUbuntuVM:~$ sudo iscsiadm -m iface -I iscsi0 -o new
New interface iscsi0 added
19. Discover target iSCSI portals using iSCSI interface IP.
sudo iscsiadm -m discovery -t st -p <CBS iSCSI IP>:3260
where
<CBS iSCSI IP> is the iSCSI
IP address of the Everpure Cloud Dedicated controller 1 or
controller 2, collected in step 16. You only need to enter one iSCSI IP address.
Example: It will discover iSCSI IP's from both Everpure Cloud Dedicated controllers.
user@MyUbuntuVM:~$ sudo iscsiadm -m discovery -t st -p 172.16.180.8:3260
172.16.180.8:3260,1 iqn.2010-06.com.purestorage:flasharray.81ce503fd81d0c8
172.16.180.11:3260,1 iqn.2010-06.com.purestorage:flasharray.81ce503fd81d0c8
20. Connect the Linux host to the Everpure Cloud Dedicated instance.
sudo iscsiadm -m node --login
Example: You will notice there will be 32 logins (16 iSCSi session login per Everpure Cloud Dedicated controller)
user@MyUbuntuVM:~$ sudo iscsiadm -m node --login
Logging in to [iface: iscsi0, target: iqn.2010-06.com.purestorage:flasharray.81ce503fd81d0c8, portal: 172.16.180.8:3260] (multiple)
Logging in to [iface: iscsi0, target: iqn.2010-06.com.purestorage:flasharray.81ce503fd81d0c8, portal: 172.16.180.8:3260] (multiple)
.
.
.
Logging in to [iface: iscsi0, target: iqn.2010-06.com.purestorage:flasharray.81ce503fd81d0c8, portal: 172.16.180.11:3260] (multiple)
Logging in to [iface: iscsi0, target: iqn.2010-06.com.purestorage:flasharray.81ce503fd81d0c8, portal: 172.16.180.11:3260] (multiple)
Login to [iface: iscsi0, target: iqn.2010-06.com.purestorage:flasharray.81ce503fd81d0c8, portal: 172.16.180.8:3260] successful.
Login to [iface: iscsi0, target: iqn.2010-06.com.purestorage:flasharray.81ce503fd81d0c8, portal: 172.16.180.8:3260] successful.
.
.
.
Login to [iface: iscsi0, target: iqn.2010-06.com.purestorage:flasharray.81ce503fd81d0c8, portal: 172.16.180.11:3260] successful.
Login to [iface: iscsi0, target: iqn.2010-06.com.purestorage:flasharray.81ce503fd81d0c8, portal: 172.16.180.11:3260] successful.
21. Confirm the number of iSCSI sessions. There should be 32 entries (16 iSCSi sessions per Everpure Cloud Dedicated controller)
iscsiadm --mode session
Example: There should be 32 entries (16 iSCSI sessions per Everpure Cloud Dedicated controller)
user@MyUbuntuVM:~$ iscsiadm --mode session
tcp: [1] 172.16.180.8:3260,1 iqn.2010-06.com.purestorage:flasharray.81ce503fd81d0c8 (non-flash)
tcp: [10] 172.16.180.8:3260,1 iqn.2010-06.com.purestorage:flasharray.81ce503fd81d0c8 (non-flash)
tcp: [11] 172.16.180.8:3260,1 iqn.2010-06.com.purestorage:flasharray.81ce503fd81d0c8 (non-flash)
tcp: [12] 172.16.180.8:3260,1 iqn.2010-06.com.purestorage:flasharray.81ce503fd81d0c8 (non-flash)
tcp: [13] 172.16.180.8:3260,1 iqn.2010-06.com.purestorage:flasharray.81ce503fd81d0c8 (non-flash)
.
.
.
tcp: [31] 172.16.180.11:3260,1 iqn.2010-06.com.purestorage:flasharray.81ce503fd81d0c8a (non-flash)
tcp: [32] 172.16.180.11:3260,1 iqn.2010-06.com.purestorage:flasharray.81ce503fd81d0c8 (non-flash)
tcp: [7] 172.16.180.11:3260,1 iqn.2010-06.com.purestorage:flasharray.81ce503fd81d0c8 (non-flash)
tcp: [8] 172.16.180.11:3260,1 iqn.2010-06.com.purestorage:flasharray.81ce503fd81d0c8 (non-flash)
tcp: [9] 172.16.180.11:3260,1 iqn.2010-06.com.purestorage:flasharray.81ce503fd81d0c8 (non-flash)
22. Confirm that each volume has 32 entries, each representing a virtual device path.
lsscsi -d
Example: There should be 32 entries per Everpure Cloud Dedicated volume connected to this Linux host.
user@MyUbuntuVM:~$ lsscsi -d
[0:0:0:0] disk Msft Virtual Disk 1.0 /dev/sda [8:0]
[1:0:1:0] disk Msft Virtual Disk 1.0 /dev/sdb [8:16]
[5:0:0:0] cd/dvd Msft Virtual CD/ROM 1.0 /dev/sr0 [11:0]
[6:0:0:1] disk PURE FlashArray 8888 /dev/sdc [8:32]
[7:0:0:1] disk PURE FlashArray 8888 /dev/sdb [8:16]
[8:0:0:1] disk PURE FlashArray 8888 /dev/sda [8:0]
.
.
.
[67:0:0:1] disk PURE FlashArray 8888 /dev/sdar[66:176]
[68:0:0:1] disk PURE FlashArray 8888 /dev/sdbe[67:128]
[69:0:0:1] disk PURE FlashArray 8888 /dev/sdbj[67:208]
23. Run the multipath command below to confirm each Everpure Cloud Dedicated volume has multiple paths. A multipathed Everpure Cloud Dedicated volume should be represented by a device-mapped ID, as seen in the example below. Verify the paths are divided into two priority groups, as seen i in the following example.
sudo multipath -ll
Example: Each Everpure Cloud Dedicated volumes are represented by a device-mapped IDs.
user@MyUbuntuVM:~$ sudo multipath -ll
3624a93702b60622e2b014a2200011011 dm-0 PURE ,FlashArray
size=2.0T features='0' hwhandler='1 alua' wp=rw
|-+- policy='queue-length 0' prio=50 status=active
| |- 2:0:0:2 sdb 8:16 active ready running
| |- 3:0:0:2 sdf 8:80 active ready running
| |- 4:0:0:2 sdl 8:176 active ready running
| `- 5:0:0:2 sdk 8:160 active ready running
.
.
.
.
`-+- policy='queue-length 0' prio=10 status=enabled
|- 6:0:0:2 sdd 8:48 active ready running
|- 7:0:0:2 sdh 8:112 active ready running
|- 8:0:0:2 sdp 8:240 active ready running
`- 9:0:0:2 sdo 8:224 active ready running
.
.
.
24. Create mount points on the initiator.
sudo mkdir /mnt/store0
25. Create the desired file system on each Everpure Cloud Dedicated volume using the device-mapped IDs, and then mount each volume to the mount point.
sudo mkfs.ext4 /dev/mapper/<device-mapped ID>
where:
<device-mapped ID> is the device-mapped ID from step 23.
The following example uses filesystem ext4 for the Everpure Cloud Dedicated volume
user@MyUbuntuVM:~$ sudo mkfs.ext4 /dev/mapper/3624a93702b60622e2b014a2200011011
mke2fs 1.42.9 (28-Dec-2013)
Discarding device blocks: done
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=1024 blocks
134217728 inodes, 536870912 blocks
26843545 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=2684354560
16384 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848, 512000000
Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
26. Mount Everpure Cloud Dedicated volume onto mount point.
sudo mount /dev/mapper/<device-mapped ID> <mount point>
where:
<device-mapped ID> is the device-mapped ID collected from step 23.
<mount point> is the mount point created in step 24.
user@MyUbuntuVM:~$ sudo mount /dev/mapper/3624a93702b60622e2b014a2200011011 /mnt/store0
To make iSCSI device mount persistent across reboots, you will need to add an entry in /etc/fstab.
In this case we recommend to use _netdev and nofail options in /etc/fstab which will prevent the OS boot failure in case a iSCSI block device doesn't even exists, network isn't initialized yet etc.
Example of /etc/fstab:
# <file system> <mount point> <type> <options> <dump> <pass>
# iSCSI LUN mounted to /mnt/store0
/dev/mapper/3624a93702b60622e2b014a2200011011 /mnt/store0 ext4 defaults,_netdev,nofail, 0 2
27. The mount points now report 2TB, and block storage can be consumed.
user@MyUbuntuVM:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/3624a93702b60622e2b014a2200011010 2.0T 81M 1.9T 1% /mnt/store0
On Everpure Cloud Dedicated
Optional Check - I/O should only flow to the primary controller instance. Run I/O on your Linux host and confirm on your Everpure Cloud Dedicated instance with the following command:
purehost monitor --balance --interval 3
Example:
pureuser@CBS> purehost monitor --balance --interval 3
Name Time Initiator WWN Initiator IQN Initiator NQN Target Target WWN Failover I/O Count I/O Relative to Max
MyUbuntuVM 2019-08-26 10:31:32 PDT - iqn.1994-05.com.redhat:b9ddc64322ef - (primary) - - 1626 100%
iqn.1994-05.com.redhat:b9ddc64322ef (secondary) - 0 0%
Adding More Volumes
You can add more volume using CLI or GUI.