Linux storage technology and applications: Multipath multipath

Source: Internet
Author: User

1 , two servers each configuration two network cards

Store:

Eth0:192.168.1.20/24

Eth1:192.168.2.20/24

Node:

Eth0:192.168.1.10/24

Eth1:192.168.2.10/24

2 , Storage server configuration Targert

# vim/etc/tgt/targets.conf

<target iqn.2016-02.cn.tedu.tech:sata>

Backing-store/dev/sdb1

Initiator-address 192.168.1.10

Initiator-address 192.168.2.10

</target>

# Service TGTD Restart

# Chkconfig TGTD on

3 , discovering storage on the node

# Iscsiadm--mode Discovery--type sendtargets--portal 192.168.1.20--discover

# Iscsiadm--mode Discovery--type sendtargets--portal 192.168.2.20--discover

# Service iSCSI Restart

# chkconfig iSCSI on for automatic Login shared storage

# chkconfig Iscsid on Daemon Process

now through lsblk command, you can see two more hard drives on your host. Essentially, these two hard disks are stored on the same space.

4 , through multipath Multi-path configuration, two hard drives are configured with additional names Mpatha , using Mpatha , you can automatically use SDB or SDC .

Installing on a node multipath Software

# yum Install-y Device-mapper-multipath

Build configuration file

# mpathconf--user_friendly_names N

Editing a configuration file

# vim/etc/multipath.conf

will be Defaults section changes to the following content:

Defaults {

User_friendly_names No

getuid_callout "/lib/udev/scsi_id--whitelisted--device=/dev/%n"

}

Add at the end of the file:

multipaths {

multipath {

Wwid "1IET 00010001"

Alias Mpatha

}

}

5 , start the service

#/ETC/INIT.D/MULTIPATHD Start

# Chkconfig MULTIPATHD on

6 , view /dev/mapper directory, new device files will appear in this directory Mpatha

7 , Mpatha is the shared disk, which can be partitioned

# Fdisk-cu/dev/mapper/mpatha

partition, the first name is called a Mpathap1 , it can be directly mounted using the

# mount/dev/mapper/mpathap1/mnt

8 , loading multipath information

# MULTIPATH-RR

Linux storage technology and applications: Multipath multipath

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.