Esse conteúdo foi útil?
Como poderíamos tornar este artigo mais útil?
You can use lmacli to configure an iSCSI data path between a Linux host and a Lyve Mobile Rackmount Receiver connected to the same data network.
The following steps are required:
To install Open-iSCSI and multipath tools:
sudo yum install lsscsi device-mapper-multipath iscsi-initiator-utils
To install Open-iSCSI and multipath tools:
sudo apt install lsscsi multipath-tools open-iscsi
The iSCSI data path between the Linux host and the Lyve Mobile Rackmount Receiver is made of 1-4 network interfaces. On the Linux host, the network interfaces used to transport iSCSI traffic should be configured with static IP addresses.
You can visually identify a network interface by blinking its LED.
To identify a network port:
sudo ethtool --identify interface name
where interface name is a network interface on the Linux host, for example:
sudo ethtool --identify eno1
Netplan is the network configuration abstraction renderer used by Ubuntu Server.
Below is a sample configuration file for Netplan to set static IP addresses on 4 network ports and enable jumbo frames of 9000 bytes.
Sample configuration file |
---|
network: version: 2 ethernets: ens3f0np0: addresses: [192.168.0.1/24] mtu: 9000 ens3f1np1: addresses: [192.168.1.1/24] mtu: 9000 ens1f0np0: addresses: [192.168.2.1/24] mtu: 9000 ens1f1np1: addresses: [192.168.3.1/24] mtu: 9000 |
NetworkManager is the network management daemon used by Red Hat Enterprise Linux or Ubuntu Desktop.
nmcli is a command-line interface for the NetworkManager daemon. The following is an example of using nmcli to create a network connection with a static IP address and jumbo frames.
nmcli device
Example output |
---|
DEVICE TYPE STATE CONNECTION eno1 ethernet connected eno1 enp108s0f0 ethernet disconnected -- enp108s0f1 ethernet disconnected -- |
nmcli connection add type ethernet ifname interface name ipv4.method manual ipv4.addr "IP address" 802-3-ethernet.mtu 9000
where interface name is a Rackmount Receiver iSCSI port and IP address is a Rackmount Receiver port IP address, for example:
nmcli connection add type ethernet ifname enp108s0f0 ipv4.method manual ipv4.addr "192.168.0.1/24" 802-3-ethernet.mtu 9000
Example output |
---|
Connection 'ethernet-enp108s0f0' (93b21958-1e3e-49e8-9c38-0a63f0e6c77c) successfully added. |
nmcli device show
Example output | |
---|---|
GENERAL.DEVICE: | enp108s0f0 |
GENERAL.TYPE: | ethernet |
GENERAL.HWADDR: | F4:E9:D4:73:AE:14 |
GENERAL.MTU: | 9000 |
GENERAL.STATE: | 100 (connected) |
GENERAL.CONNECTION: | ethernet-enp108s0f0 |
GENERAL.CON-PATH: | /org/freedesktop/NetworkManager/ActiveConnection/17 |
WIRED-PROPTERTIES.CARRIER: | on |
IP4.ADDRESS[1]: | 192.168.0.1/24 |
IP4.GATEWAY: | -- |
IP4.ROUTE[1]: | dst = 192.168.0.0/24, nh = 0.0.0.0, mt = 103 |
IP6.ADDRESS[1]: | fe80::2b25:ace7:3d38:979a/64 |
IP6.GATEWAY: | -- |
IP6.ROUTE[1]: | dst = fe80::/64, nh = ::, mt = 103 |
IP6.ROUTE[2]: | dst = ff00::/8, nh = ::, mt = 256, table=255 |
The connection type for your Lyve Mobile Array is displayed as iSCSI.
To view device details:
lmacli info IP address
where IP address is a Rackmount Receiver port IP address, for example:
lmacli info 192.168.0.100
Example output | |
---|---|
=== Identification === | |
Product | : STJX46000400 |
Serial number | : NB261234 |
Connection type | : iSCSI |
Name | : |
=== Disk encryption === | |
Status | : Secured, unlocked |
=== Pools === | |
Name | : dg |
Total size | : 46.0TB |
Available size | : 0B |
Number of volumes | : 1 |
=== Volumes === | |
Name | : volume-0 |
Pool name | : dg |
Size | : 46.0TB |
RAID level | : RAID0 |
Status | : OK |
Mapped | : No |
lmacli reads the iSCSI configuration for a Lyve Mobile rackmount Receiver from a file. You can edit the file to modify the iSCSI configuration of a Lyve Mobile Rackmount Receiver.
An example iSCSI configuration file is included in the lmacli package.
Copy the example iSCSI configuration file and modify the copy to match your environment.
Note some important iSCSI parameters:
Below is an iSCSI configuration file for LMACLI that enables jumbo frames and configures the network ports reserved for iSCSI traffic so that they all belong to different subnets.
Sample file | |
---|---|
# | |
# Sample iSCSI configuration file for `lmacli rackmount-setup` | |
# | |
# The parameters specified in this file are used to configure the | |
# network ports and the iSCSI target service of a Lyve Mobile | |
# Rackmount Receiver. | |
# | |
# The iSCSI configuration can be applied with: | |
# $ lmacli rackmount-setup --iscsi-config FILE DESTINATION | |
# | |
# | |
# iSCSI target parameters. | |
# | |
[iscsi] | |
# At least one initiator must be specified. | |
# To determine the iSCSI initiator name | |
# * Linux : cat /etc/iscsi/initiatorname.iscsi | |
# * Windows : Control Panel > iSCSI Initiator > Configuration > Initiator name | |
allowed_initiators = ["iqn.2001-04.com.example:initiator", ] | |
# Be sure to enable jumbo frames in your network adapter before | |
# setting the following "jumbo_frame" parameter to true. | |
jumbo_frame = true | |
# | |
# Network ports configuration. | |
# Up to 4 network ports, numbered from 0 (leftmost) to 3 (rightmost). | |
# Please comment-out any port you do not want to use. | |
# | |
[[ports]] | |
index = 0 | |
ip = "192.168.0.100" | |
netmask = "255.255.255.0" | |
# gateway = | |
[[ports]] | |
index = 1 | |
ip = "192.168.1.100" | |
netmask = "255.255.255.0" | |
# gateway = | |
[[ports]] | |
index = 2 | |
ip = "192.168.2.100" | |
netmask = "255.255.255.0" | |
# gateway = | |
[[ports]] | |
index = 3 | |
ip = "192.168.3.100" | |
netmask = "255.255.255.0" | |
# gateway = |
To apply the iSCSI configuration:
lmacli rackmount-setup --iscsi-config my-server.conf IP address
where IP address is a Rackmount Receiver port IP address, for example:
lmacli rackmount-setup --iscsi-config my-server.conf 192.168.0.100
Example output |
---|
Checking device configuration (iSCSI) Checking iSCSI configuration file Clearing existing rackmount configuration Creating new rackmount configuration |
Checking for network connectivity between the host and the Lyve Mobile Rackmount Receiver may eliminate future issues. Each rackmount receiver port declared in the iSCSI configuration file should be tested with the ping command.
To check network connectivity for jumbo frames:
ping -s 8972 IP address
where IP address is a Rackmount Receiver port IP address declared in the iSCSI configuration file, for example:
ping -s 8972 192.168.0.100
Example output |
---|
PING 192.168.0.100 (192.168.0.100) 8972(9000) bytes of data. 8980 bytes from 192.168.0.100: icmp_seq=1 ttl=64 time=0.150 ms 8980 bytes from 192.168.0.100: icmp_seq=2 ttl=64 time=0.150 ms |
The iSCSI target on the Lyve Mobile Rackmount Receiver can be discovered with the iscsiadm command. The --portal parameter should be set to one of the IP addresses declared in lmacli's iSCSI configuration file.
To discover the iSCSI target:
sudo iscsiadm --mode discovery --type sendtargets --portal IP address
where IP address is a Rackmount Receiver port IP address declared in the iSCSI configuration file, for example:
sudo iscsiadm --mode discovery --type sendtargets --portal 192.168.0.100
Example output |
---|
192.168.0.100:3260,1 iqn.1995-03.com.dothill:01.array.00c0fff39296-624ebda2.a 192.168.1.100:3260,2 iqn.1995-03.com.dothill:01.array.00c0fff39296-624ebda2.a 192.168.2.100:3260,3 iqn.1995-03.com.dothill:01.array.00c0fff39296-624ebda2.a 192.168.3.100:3260,4 iqn.1995-03.com.dothill:01.array.00c0fff39296-624ebda2.a |
The iscsiadm command can also be used to connect the iSCSI initiator to the iSCSI target through all its portals.
To log in to the iSCSI target:
sudo iscsiadm --mode node --target IQN --login
where IQN is an iSCSI Qualified Name obtained from the discover command, for example:
sudo iscsiadm --mode node --target iqn.1995-03.com.dothill:01.array.00c0fff39296-624ebda2.a --login
Example output |
---|
Logging in to [iface: default, target: iqn.1995-03.com.dothill:01.array.00c0fff39296-624ebda2.a, portal: 192.168.2.100,3260] (multiple) Logging in to [iface: default, target: iqn.1995-03.com.dothill:01.array.00c0fff39296-624ebda2.a, portal: 192.168.1.100,3260] (multiple) Logging in to [iface: default, target: iqn.1995-03.com.dothill:01.array.00c0fff39296-624ebda2.a, portal: 192.168.3.100,3260] (multiple) Logging in to [iface: default, target: iqn.1995-03.com.dothill:01.array.00c0fff39296-624ebda2.a, portal: 192.168.0.100,3260] (multiple) Login to [iface: default, target: iqn.1995-03.com.dothill:01.array.00c0fff39296-624ebda2.a, portal: 192.168.2.100,3260] successful. Login to [iface: default, target: iqn.1995-03.com.dothill:01.array.00c0fff39296-624ebda2.a, portal: 192.168.1.100,3260] successful. Login to [iface: default, target: iqn.1995-03.com.dothill:01.array.00c0fff39296-624ebda2.a, portal: 192.168.3.100,3260] successful. Login to [iface: default, target: iqn.1995-03.com.dothill:01.array.00c0fff39296-624ebda2.a, portal: 192.168.0.100,3260] successful. |
The lsscsi command can be used to display the block devices. Each block device listed represents a path to the same LUN.
Example output | |||||
---|---|---|---|---|---|
[5:0:0:0] | enclosu | SEAGATE | STJX46000400 | M100 | - |
[5:0:0:1] | disk | SEAGATE | STJX46000400 | M100 | /dev/sdc |
[6:0:0:0] | enclosu | SEAGATE | STJX46000400 | M100 | - |
[6:0:0:1] | disk | SEAGATE | STJX46000400 | M100 | /dev/sde |
[7:0:0:0] | enclosu | SEAGATE | STJX46000400 | M100 | - |
[7:0:0:1] | disk | SEAGATE | STJX46000400 | M100 | /dev/sdd |
[8:0:0:0] | enclosu | SEAGATE | STJX46000400 | M100 | - |
[8:0:0:1] | disk | SEAGATE | STJX46000400 | M100 | /dev/sdf |
The multiple paths to the device are coalesced by the device mapper multipath daemon.
See below for details on configuring I/O multipath for a Lyve Mobile Rackmount Receiver.
The role of the device mapper multipath daemon is to detect and coalesce multiple paths to devices, for fail-over or performance reasons.
To display the list of multipath devices:
sudo multipath -ll
Example output |
---|
mpatha (3600c0ff000f390bace61ac6201000000) dm-1 SEAGATE,STJX46000400 size=40T features='0' hwhandler='1 alua' wp=rw |-+- policy='service-time 0' prio=50 status=active | `- 5:0:0:1 sdc 8:32 active ready running |-+- policy='service-time 0' prio=50 status=enabled | `- 6:0:0:1 sde 8:64 active ready running |-+- policy='service-time 0' prio=50 status=enabled | `- 8:0:0:1 sdf 8:80 active ready running `-+- policy='service-time 0' prio=50 status=enabled `- 7:0:0:1 sdd 8:48 active ready running |
To improve I/O bandwidth, it is recommended to change the path_grouping_policy parameter from the default failover to group_by_prio. To set the path_grouping_policy to group_by_prio for all Lyve Mobile Arrays, add the following snippet to /etc/multipath.conf:
Example output |
---|
devices { device { vendor "SEAGATE" product "STJX.*" path_grouping_policy "group_by_prio" } } |
After restarting the device mapper multipath daemon, the output of multipath -ll appears as follows:
Example output |
---|
mpatha (3600c0ff000f390bac420bb6201000000) dm-1 SEAGATE,STJX46000400 size=40T features='0' hwhandler='1 alua' wp=rw `-+- policy='service-time 0' prio=50 status=active |- 5:0:0:1 sdc 8:32 active ready running |- 6:0:0:1 sdd 8:48 active ready running |- 7:0:0:1 sde 8:64 active ready running `- 8:0:0:1 sdf 8:80 active ready running |
The first line starts with the multipath device name (mpatha in the example above). The full path to the device is /dev/mapper/mpatha.