Configure multi-path in Linux

Source: Internet
Author: User
In Linux, configure the multi-path 1, install the multi-path software package: device-mapper-10267-2el5device-mapper-event-102672el5device-mapper-multipath-047-48el5 [plain] [root @ RKDB01Server] rpm-ivhdevi in Linux multi-path 1, install the multi-path software package: device-mapper-1.02.67-2.el5device-mapper-event-1.02.67.2.el5device-mapper-multipath-0.4.7-48.el5 [plain] [root @ RKDB01 Server] # rpm-ivh device-mapper-1.02.67-2.el5.x86_64.rpm warning: device-mapper-1.02.67-2.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186 Preparing... ######################################## ### [100%] package device-mapper-1.02.67-2.el5.x86_64 is already installed [root @ RKDB01 Server] # rpm-ivh device-mapper-event-1.02.67-2.el5.x86_64.rpm warning: device-mapper-event-1.02.67-2.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186 Preparing... ######################################## # # [100%] package device-mapper-event-1.02.67-2.el5.x86_64 is already installed [root @ RKDB01 Server] # rpm-ivh device-mapper-multipath-0.4.7-48.el5.x86_64.rpm warning: device-mapper-multipath-0.4.7-48.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186 Preparing... ######################################## ### [100%] package device-mapper-multipath-0.4.7-48.el5.x86_64 is already installe D 2. set boot and check whether the installation package is normal: chkconfig -- level 345 multipathd onlsmod | grep dm_multipath [plain] [root @ RKDB01 Server] # chkconfig -- level 345 multipathd on [root @ RKDB01 Server] # lsmod | grep dm_multipath 58969 0 scsisi_dh 42561 1 dm_multipath dm_mod 102417 4 dm_mirror, dm_multipath, dm_raid45, dm_log [root @ RKDB01 Server] #3. configure multipathd to make it work properly. edit/etc/multipath. conf: [plain] defaults {udev_dir /Dev polling_interval 10 selector "round-robin 0" initiate multibus routing "/sbin/scsi_id-g-u-s/block/% n" specify none path_checker readsector0 rr_min_io 100 max_fds 8192 rr_weight priorities failback immediate no_path_retry fail user_friendly_names yes} blacklist {wwid 26353900f02796769 devnode "^ (ram | raw | loop | fd | md | dm-| sr | scd | st) [0-9] * "devnode" ^ hd [a-z] "} 4. disable Content in [plain] # blacklist {# devnode "*" #}# defaults {27 # user_friendly_names yes 28 #} 5. after completion, run the following command to find the multi-path: [plain] [root @ RKDB01 Server] # modprobe dm-multipath [root @ RKDB01 Server] # multipath-F [root @ RKDB01 Server] # multipath dm-multipath [root @ RKDB01 Server] # multipath dm-round-robin [root @ RKDB01 Server] # service multipathd restart is shutting down the multipathd port monitoring program: [OK] starting the daemon multipathd: [OK] [root @ RKDB01 Server] # multipath-v2 [root @ RKDB01 Server] # multipath-v2 [root @ RKDB01 Server] # multipath-ll mpath1 (3600d02310000011b16a5d57c6a1bd99a) dm-0 TOYOU, netStor_iSUM510 [size = 3.3 T] [features = 0] [hwhandler = 0] [rw] \ _ round-robin 0 [prio = 2] [ena bled] \ _ 1: 0: 0: 0 sdb 8: 16 [failed] [ready] \ _ 1: 0: 1: 0 sdc [failed] [ready] [root @ RKDB01 Server] #6. after restarting the Server, we can see the multi-path information: [plain] [root @ RKDB01 ~] # Ll/dev/mapper/Total 0 crw ------- 1 root 10, 60 11-05 control brw-rw ---- 1 root disk 253, 0 11-05 mpath1 brw-rw ---- 1 root disk 253, 1 11-05 mpath2 [root @ RKDB01 ~] # Multipath-ll mpath2 (3600d02310000011b76128b9c63138cf4) DM-1 TOYOU, netStor_iSUM510 [size = 3.2 T] [features = 0] [hwhandler = 0] [rw] \ _ round-robin 0 [prio = 2] [active] \ _ 1: 0: 0: 1 sdc 8:32 [active] [ready] \ _ 1: 0: 1: 1 sde 8: 64 [active] [ready] mpath1 (3600d02310000011b16a5d57c6a1bd99a) dm-0 TOYOU, netStor_iSUM510 [size = 20G] [features = 0] [hwhandler = 0] [rw] \ _ round-robin 0 [prio = 2] [active] \ _ 1: 0: 0: 0 sdb 8: 16 [act Ive] [ready] \ _ 1: 0: 1: 0 sdd 8: 48 [active] [ready] 7. through fdisk, two DM-0/DM-1 disks can be generated, this is exactly what sdc/sde and sdb/sdd come up with: [plain] [root @ RKDB01 ~] # Fdisk-l Disk/dev/sda: 299.4 GB, 299439751168 bytes 255 heads, 63 sectors/track, 36404 cylinders Units = cylinders of 16065*512 = 8225280 bytes Device Boot Start End Blocks Id System/dev/sda1 * 1 38 305203 + 83 Linux/dev/sda2 39 13092 104856255 83 Linux/ dev/sda3 13093 19619 52428127 + 83 Linux/dev/sda4 19620 36404 134825512 + 5 Extended/dev/sda5 19620 26146 52428096 83 Linux/dev/sda6 26147 28757 20972826 83 Linux/dev/sda7 28758 30324 12586896 82 Linux swap/Solaris/dev/sda8 30325 36404 48837568 + 83 Linux Disk/dev/sdb: 21.4 GB, 21474836480 bytes 255 heads, 63 sectors/track, 2610 cylinders Units = cylinders of 16065*512 = 8225280 bytes Disk/dev/sdb doesn't contain a valid partition table Disk/dev/sdc: 3568.4 GB, 3568429957120 bytes 255 heads, 63 sectors/track, 433836 cylinders Units = cylinders of 16065*512 = 8225280 bytes Disk/dev/sdc doesn't contain a valid partition table Disk/dev/sdd: 21.4 GB, 21474836480 bytes 255 heads, 63 sectors/track, 2610 cylinders Units = cylinders of 16065*512 = 8225280 bytes Disk/dev/sdd doesn't contain a valid partition table Disk/dev/sde: 3568.4 GB, 3568429957120 bytes 255 heads, 63 sectors/track, 433836 cylinders Units = cylinde Rs of 16065*512 = 8225280 bytes Disk/dev/sde doesn't contain a valid partition table Disk/dev/dm-0: 21.4 GB, 21474836480 bytes 255 heads, 63 sectors/track, 2610 cylinders Units = cylinders of 16065*512 = 8225280 bytes Disk/dev/dm-0 doesn't contain a valid partition table Disk/dev/DM-1: 3568.4 GB, 3568429957120 bytes 255 heads, 63 sectors/track, 433836 cylinders Units = cylinders of 16065*512 = 8225280 bytes Disk/dev/DM-1 doesn't contain a valid partition table Disk/dev/sdf: 4009 MB, 4009754624 bytes 255 heads, 63 sectors/track, 487 cylinders Units = cylinders of 16065*512 = 8225280 bytes Device Boot Start End Blocks Id System/dev/sdf4 * 1 488 3915744 + B W95 FAT32 Partition 4 has different physical/logical endings: phys = (486,254, 63) logical = (487,125, 22) [root @ RKDB01 ~] #8. you can also view the multi-path ing information in the/dev/mapper Directory: [plain] [root @ RKDB01 ~] # Ll/dev/mapper/Total 0 crw ------- 1 root 10, 60 11-06 control brw-rw ---- 1 root disk 253, 2 11-06 data-data001 brw-rw ---- 1 root disk 253, 0 11-06 mpath1 brw-rw ---- 1 root disk 253, 1 11-06 mpath2
Related Article

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.