7.1.3. Attaching resources to a Block Storage Volume

After creating a new Volume, attach the created Volume from a Resource, both of which exist in the same Tenant.

7.1.3.1. Linux Server

Following describes how to configure the Multipath connectivity settings from the Linux OS to the Volume. First, create a new configuration file for the Multipath connectivity.

RHEL6.X

# vi /etc/multipath.conf

defaults {
    user_friendly_names   no
    max_fds               max
    flush_on_last_del     yes
    queue_without_daemon  no
}
blacklist {
    devnode "^hd[a-z]"
    devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
    devnode "^cciss.*"
}
devices {
    device {
        vendor                  "NETAPP"
        product                 "LUN"
        path_grouping_policy    group_by_prio
        features                "1 queue_if_no_path"
        prio                    "alua"
        path_checker            directio
        failback                immediate
        path_selector           "round-robin 0"
        hardware_handler        "1 alua"
        rr_weight               uniform
        rr_min_io               128
        getuid_callout          "/lib/udev/scsi_id -g -u -d /dev/%n"
    }
}

RHEL7.X

# vi /etc/multipath.conf

defaults {
    user_friendly_names   no
    max_fds               max
    flush_on_last_del     yes
    queue_without_daemon  no
}
blacklist {
    devnode "^hd[a-z]"
    devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
    devnode "^cciss.*"
}
devices {
    device {
        vendor                  "NETAPP"
        product                 "LUN"
        path_grouping_policy    group_by_prio
        features                "1 queue_if_no_path"
        prio                    "alua"
        path_checker            directio
        failback                immediate
        path_selector           "round-robin 0"
        hardware_handler        "1 alua"
        rr_weight               uniform
        rr_min_io               128
        uid_attribute           ID_SERIAL
    }
}

Next, modify the timeout value and of iSCSI initiator into 5 seconds, which is Service Provider’s recommended setting.

# vi /etc/iscsi/iscsid.conf
            :
#node.session.timeo.replacement_timeout = 120
node.session.timeo.replacement_timeout = 5
            :

Once the above OS settings have been completed, mount the iscsi Volume.

1.Log in to [ iscsi ]

# iscsiadm -m discovery -t sendtargets -p [iscsi target IP address] --login

Note

You can verify [ iscsi Target IP Address ] at the [ Volume Details ] page at the Control Panel.

2.Restart the multipathd service

# service multipathd restart

3.Confirm a multipath device

# multipath -ll
3600a098038303652643f4861334f5875 dm-0 NETAPP  ,LUN C-Mode
size=100G features='2 queue_if_no_path retain_attached_hw_handler' hwhandler='1 alua' wp=rw
|-+- policy='round-robin 0' prio=50 status=active
| `- 2:0:0:0 sdb 8:16 active ready running
`-+- policy='round-robin 0' prio=10 status=enabled
    `- 3:0:0:0 sda 8:0  active ready running

Once the [ iscsi ] connectivity has done collectively, both of [ sda ] & [ sdb ] as pictured above will display as [ Running ].

4.Confirm a mounted device

# fdisk -l

Disk /dev/vda: 16.1 GB, 16106127360 bytes, 31457280 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
        :
Disk /dev/sdb: 107.4 GB, 107389255680 bytes, 209744640 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
        :
Disk /dev/sda: 107.4 GB, 107389255680 bytes, 209744640 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
        :
Disk /dev/mapper/3600a098038303652643f4861334f5875: 107.4 GB, 107389255680 bytes, 209744640 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

A volume connected with the above [ iscsi ] will display, as pictured above:

5.Format a Volume into any file format. The following example describes that the Volume has set up in [ xfs ] format.

# mkfs.xfs /dev/mapper/3600a098038303652643f4861334f5875

Note

NOTE: NOT format [ /dev/sda, /dev/sdb ], which you can view at [ fdisk -l ] but format it by specifying [ /dev/mapper/3600a098038303652643f4861334f5875 ].

6.Mount the formatted region.

# mount /dev/mapper/3600a098038303652643f4861334f5875 /mnt

Note

In RHEL 7.3 / CentOS 7.3 or later, when I / O is performed with a block size larger than 64 KB, the secured performance may not be fully used. If I / O is done with a block size larger than 64 KB, for the iSCSI devices that make up the multipath device and the multipath device, do the following: Each device name can be confirmed from [multipath -ll].

# echo 512 > /sys/block/sdb/queue/max_sectors_kb
# echo 512 > /sys/block/sdc/queue/max_sectors_kb
# echo 512 > /sys/block/dm-0/queue/max_sectors_kb

7.Persistence of mounts as described in /etc/fstab

Note

When writing in /etc/fstab, since the file system provided by the volume of this service needs to be mounted after network start up, it is described with the _netdev flag added. If _netdev flag is not given, it may not start normally when OS is restarted.

7.1.3.2. Windows Server

Following shows how you mount the Storage, created by the Windows Server, to the iSCSI target.

7.1.3.2.1 For Baremetal server

In the case of Baremetal server, we will put a total of 4 MultiPath as shown below.

multipath.png

1.Start the iSCSI Initiator from the detection start menu of the target portal. Select the Discovery tab and click Discovery Portal. On the “Discover Target Portal” screen, enter the target IP address of the storage.

Discover Target Portal
Discover Target Portal2

After setting above, start MPIO from the start menu, check “Add support for iSCSI devices” on “Discover Multipath” tab and press ADD. (You will be asked to restart the server after completion)

Discover Multupath MPIO

Once Server has successfully rebooted and a MPIO has rebooted, an device will be also added to the screen as pictured below.

Discover Multipath Device

2.iSCSI Connectivity

Next, the [ Targets ] tab is displayed as [ Inactive ], when you verify the[ Target ] tab after booting an [ iSCSI ] Initiator. At the [ Target ] tab, click [ Connect ] and mark to a [ Enable multi-path ] check box at pictured popup. Finally, click [ Advanced ].

Enable Multipath

On “Advanced Setting” screen, select “Local adapter” · “Initiator IP” · “Target Portal IP” from the pull-down and press OK. You need to do the same work for another IP address in the pulldown.

Advanced Setting1
Advanced Setting2
Advanced Setting3
Advanced Setting4

Returning to the “Targets” tab, the state of Target has been changed from Inactive to Connected. Therefore, when you click on “Properties”, four items are displayed in “Identifier” as shown below.

Targets list properties3

If you click “Devices” here, a screen like the one shown below will be displayed and confirm that the four devices are displayed.

Devices2

3.Disk Format When you select “File and Storage Services” from Windows Server Manager and click “Disks”, the volumes connected by iSCSI are displayed in Offline status as shown below.

volume_list

7.1.3.2.2 For Virtual instance

1.Detect an Target Portal.

First, start up an [ iSCSI ] Initiator from the start menu. Choose the “Discovery” tab then click “Discovery Portal”. At the “Discover Target Portal” screen, fill in a Target IP Addresses of Storage.

Discover Target

Next, boot a MPIO from the Start menu and mark to a check box of “Add support for iSCSI devises”. (After completion of this task, you are asked to reboot the Server, so you need to follow such instruction) .

Discover Multupath MPIO

Once Server has successfully rebooted and a MPIO has rebooted, an device will be also added to the screen as pictured below.

Discover Multipath Device

2.iSCSI Connectivity

Next, the [ Targets ] tab is displayed as [ Inactive ], when you verify the[ Target ] tab after booting an [ iSCSI ] Initiator. At the [ Target ] tab, click [ Connect ] and mark to a [ Enable multi-path ] check box at pictured popup. Finally, click [ Advanced ].

Enable Multipath

Upon the [ Advanced Settings ] screen, select [ Target Portal IP ] from the pull-down menu, and then click [ OK ]. Repeat a same task for another IP Addresses displayed in the pull-down menu.

Advanced Setting

Once you have come back to the [ Targets ] tab, the Target state is changed from [ Inactive ] to [ Connected ]. After you click [ Properties ] with checking this [ Connected ] state, the following screen will display.

Targets list properties

Once you click [ Devices ] at this above screen, you need to verify the 2 devices to be shown there.

Devices

3.Format Disks.

Select [ File and Storage Services ] from the Windows Server Manager, then click [ Disks ], so the Volume connected by iSCSI will display as [ Offline ] as follows:

volume_list

Here, configure the Volume partition(s) settings and format the Volume, by right-clicking the mouse button to change the Volume into the [ offline ] state.