Lenovo DS storage Linux under iSCSI multipath mapping configuration

Source: Internet
Author: User
Tags lenovo

Lenovo DSStorageLinuxunderISCSIMulti-Path mapping configuration

Renren 2018-01-17

Lab Environment:

     ds4200 storage, B The director pool divides a size of 18g volume 1G Iscsi port port2 and Port3 Port B2 port ip 172.16.1.14/24 port B3 port ip 172.16.1.15/24

the client system is a CentOS 6.9 , two Ethernet ports,eth0 port ip 172.16.1.195/24,eth1 Port IP for 172.16.1.196/24. Network is the state of Unicom. The client needs to use this 18G volume with open multipath .

Detailed configuration is as follows:

Volume mapping configuration

Storage The ISCSI map port network configuration is as follows:

The client NIC settings are as follows:

the client and the stored The ISCSI Port network connectivity situation is as follows:

client initial disk and file system conditions such as, only SDA one disk:

Experimental operation Process:

For the experiment to be successful, do the following to the client (specific methods do not repeat):

Turn off selinux

Close iptables firewall

Two Ethernet ports are set to self-boot.

Configure an Extranet Yum source that can be used normally

1, the client installs the ISCSI Discovery Program iscsi-initiator-utils

use yum to install the Yum–y install iscsi* , the installation is successful as

normally after installation is complete iSCSI The service will be added to boot, or it can be used chkconfig iSCSI on Add

Verify that you view the iSCSI IQN number for this computer, and use the CAT/ETC/ISCSI/INITIATORNAME.ISCSI command to view:

(Note: For example, start directly with a command iSCSI The service is not in effect, the restart is not valid, it is irrelevant here, pending execution ISCSI the service will start itself after discovery)

2, execute the command for theISCSI discovery Target (target), iscsiadm–m discovery–t st–p 172.16.1.14:3260

For example, just take one of the stored the IP of the ISCSI Port executes the Discovery command. All ISCSI mappings on this store can be found , we only need to use the

172.16.1.14 and 172.16.1.15 are two, and the other two are ISCSI mappings that store other ports , regardless of the test.

3, login to the target node that was found

Iscsiadm–m node–p 172.16.1.14:3260–l

Iscsiadm–m node–p 172.16.1.15:3260–l

Login connection successful such as:

Verify that you view the disk on this computer, for example, because the login is connected to two nodes, the system has new SDB and SDC Two drive letter,

that is, a volume map of two paths, followed by the need to turn on the Multipath function to merge into one use.

4. Installing Multi-path software for Linux

Install with command yum–y Install Device-mapper device-mapper-multipath

after the installation is complete, use Rpm–qa |grep Mapper The command verifies that the installation was successful and lists the version of the installed package, such as:

verifying the running state of the Multipath software, using the multipath–ll command

For example, prompt The DM multipath kernel module is not loaded.

Use the Command service MULTIPATHD start to start the Multipath service, such as. Check the multi-path software run status again,

there is still an error message-multipath configuration file does not exist. This configuration file needs to be established /etc/multipath.conf .

5, set up and configure the configuration file of Multipath software.

Use the command vi/etc/multipath.conf to create and start this configuration file, and enter the contents of the configuration file (General configuration).

The configuration file is also listed here in text form:

Blacklist {

Devnode "^SDA"

}

Defaults {

User_friendly_names Yes

Path_grouping_policy Multibus

failback Immediate

No_path_retry fail

}

Save the configuration file and exit.

6, set the multi-path software boot automatically

using the command chkconfig MULTIPATHD on

Use the command chkconfig–list to view the service boot-up items, such as

7, restart the client, perform the view multipath software running state, such as multi-path software successfully manipulated the DS4200 storage mapped volumes.

Verify the View client disk status and generate a multipath device Mpatha under /dev/mapper.

8, use this mapped 18G volume under the client computer to use this mpatha device directly (actually is a link of the volume dm-0 , Operation /dev/dm-0 partition, format, and mount the directory.

Format partition Mounted Multipath device

In order to verify the redundancy characteristics of multipath, an artificial disconnection of a connected storage B2 Port is IP 172.16.1.14 this physical link.

1, partitioning The multipath device/dev/mapper/mpatha in

Command Fdisk/dev/mapper/mpatha

Use default settings to divide a zone (partitioning procedure does not repeat)

after the partitionis complete, fdisk–l view the partitions that have been completed /dev/mapper/mpathap1 such as:

but at this point in /dev/mapper/ The directory does not appear Mpathap1 this partition, such as

the /dev/mapper/mpathap1 formatting will also error, indicating that there is no partition

workaround for the above problem-- restart The iSCSI service,service iSCSI Restart let him log in to the target node again. , prompting 172.16.1.14 to be unable to log in because it has already been artificially broken. the other two IPs are ISCSI mappings that store other ports , regardless of the test.

Check again in the/dev/mapper/directory where Mpathap1 this partition appears

2, format the /dev/mapper/mpathap1 into ext4 format

Mkfs.ext4/dev/mapper/mpathap1

Write test operations on partitions, such as

3, for /dev/mapper/mpathap1 This partition mount directory use

Create a new test catalog : mkdir/datatest

mount directory : mount/dev/mapper/mpathap1/datatest/

Test read-write usage for this directory, normal. If you have an error such as EXT4-FS error on the directory operation , you can try restarting the server.


Lenovo DS storage Linux under iSCSI multipath mapping configuration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.