CentOS7 Dm-multipath+huawei oceanstor Storage Multi-path configuration

Source: Internet
Author: User

After a look at the configuration of other people on the Internet, combined with Redhat's technical white paper, I have personally configured a Dm-multipath storage multi-path implementation on the basis of Centos7+huawei Oceanstore s2600t. Which encountered a number of small problems and do not understand the place, the book did not say that the purge, in this summary, for their own and everyone's reference.


1. Install Iscsi-initiator-utils on CentOS7 and run

# yum Install Iscsi-initiator-utils

# Service Start iSCSI

# chkconfig iSCSI on (Configuration boot-up)


2. Create storage pools and LUNs in the memory (HUAWEI OceanStor s2600t)

For specific reference: "OceanStor s2600t&s5500t&s5600t&s5800t&s6800t Storage System basic storage Business Guide", the above two steps can be configured according to the documentation instructions.


3. In CentOS7, configure the initiator

1) Change the name of the launcher, position/ETC/ISCSI/INITIATORNAME.ISCSI (optional)

IQN naming convention:iqn.<yyyy-mm>.< reverse Domain name >:< identity string (immediately) >

such as: INITIATRONAME=IQN.2016-07.COM.EXAMPLE.FOO:77C1157E7AF


4. In CentOS7, configure the IP of the memory (that is, the IP of the storage-system iSCSI host Port)

The command is:

# iscsiadm-m DISCOVERY-T st-p < storage System iSCSI host Port Ip>

Here is the system Multipath + memory dual-control configuration, it is hereby stated that the memory A-controlled iSCSI host Port is assumed to be ip-a, the memory B-controlled iSCSI host Port is assumed to be ip-b, you need to perform the following two steps separately:

# iscsiadm-m DISCOVERY-T st-p < storage System A-controlled iSCSI host Port Ip-a>

# iscsiadm-m DISCOVERY-T st-p < storage System B-controlled iSCSI host ports ip-b>


5, in the CentOS7, the login memory

The command is:

# ISCSIADM-M Node-p < Storage System iSCSI host Port Ip>-l

Here is the system Multipath + memory dual-control configuration, it is hereby stated that the memory A-controlled iSCSI host Port is assumed to be ip-a, the memory B-controlled iSCSI host Port is assumed to be ip-b, you need to perform the following two steps separately:

# ISCSIADM-M Node-p < storage System A-controlled iSCSI host Port Ip-a>-l

# ISCSIADM-M Node-p < storage System B-controlled iSCSI host Port Ip-b>-l


6. In CentOS7, set the self-boot mode and restart iSCSI

Set/etc/iscsi/iscsid.conf, node.startup= to Automatic (default, no modification required)

# Service Restart iSCSI


7, in the memory console, the creation of the host, do not care about the CENTOS7 system specifically using a few network cards with the memory of the controller connection, after creating the host name, select the type of machine using the memory, here is Linux, then you can select the above two memory initiators created.


8, in the memory console, create a mapping view, you can see the OceanStor s2600t&s5500t&s5600t&s5800t&s6800t Storage System basic storage Business Guide in the instructions to execute, I did not use the port group when I was actually using it, but instead mapped the host and LUN groups directly.


9. In CentOS7, view the full map

# iscsiadm-m Node


10. In CentOS7, view mounted disks

# fdisk-l

You can see a disk of the same size mounted on two paths


11. In CentOS7, install the Dm-multipath package

# yum Install Device-mapper-multipath


12, in CentOS7, create and modify the Dm-multipath configuration file

Copy configuration file multipath.conf

# cp/etc/multipath/.multipath.conf.tmp/etc/multipath.conf

Modify the configuration file to ensure the following configuration:

Default {

Find_multipaths Yes

User_friendly_name Yes

Path_grouping_policy multipaths (Note: multipath is a load balancer configuration, failover is configured as a primary configuration)

failback Immediate

No_path_retry fail

}


13, in the CentOS7, the mpathconf command and the relevant module loading

# mpathconf--enable

# mpathconf--with_module y

# mpathconf--with_multipathd y

See Mpathconf-h for details


14, in CentOS7, start the MULTIPATHD service and set the boot

# service MULTIPATHD Start

# Chkconfig MULTIPATHD on

After successful startup, you can see/dev/mapper/mpatha, which is a virtual multi-path device that can be used for mounting.



15. In CentOS7, partition the mounted disk

# Parted/dev/mapper/mpatha

format to GPT partition:

(parted) Mklabel GPT

Dividing all capacity into one primary partition

(parted) Mkpart primary XFS 0% 100%

Exit

(parted) Q

The/dev/mapper/mpatha1 file appears after you perform the above partitioning operation

Note: The above is partitioned using parted, but as if the CentOS7 version of Fdisk can also be GPT partitioned for disks larger than 2T.


16. Format the partition

# MKFS.XFS/DEV/MAPPER/MPATHA1


17. Mount Partition

# Mkdir/data (Create mount directory)

# mount-t Xfs/dev/mapper/mpatha1/data

# df-h (view partition Results)


18. Automatic mount on Boot

Many articles say boot mount modifies the/etc/fstab file and adds it at the end

/dev/mapper/mpatha1    /data    xfs    defaults    0 0

但我在操作过程中发现,如上修改不能成功启动和挂载系统。

个人操作是将挂载操作:

mount -t xfs /dev/mapper/mpatha1 /data

写入/etc/profile最后一行。

或者按/etc/profile文件首部建议,将挂载操作写成脚本,放入/etc/profile.d目录中。

脚本名:mount_iscsi.sh

内容:

#!/bin/bash

mount -t xfs /dev/mapper/mpatha1 /data


参考:

1、《centos上iscsi+multipath多路径存储配置手册》,http://bluefox.blog.51cto.com/380387/141907

2、Product documentation for Red Hat Enterprise Linux related chapters, https://access.redhat.com/documentation/en/ red-hat-enterprise-linux/?version=7/

3, "OceanStor s2600t&s5500t&s5600t&s5800t&s6800t Storage System v200r001 basic storage Business Guide "

This article is from the "technical space of the Yellow Sea" blog, please be sure to keep this source http://huanghai.blog.51cto.com/2466276/1796024

CentOS7 Dm-multipath+huawei oceanstor Storage Multi-path 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.