ããLinuxå¤è·¯å¾æçæ¯é¤äºä¸»æºå硬çä¸æ¡è·¯å¾çè¿æ¥ï¼è¿å
æ¬äºä¸»æºåç½ç»æå¡å¨çè¿æ¥å½¢æç主æºä¸å¯¹å¤çè·¯å¾è¿æ¥å
³ç³»ãéè¿å¤è·¯å¾çè¿æ¥ï¼å®ç°äºç£ççèæåã
ãã1ãå®è£
å¤è·¯å¾è½¯ä»¶å
ï¼
ããdevice-mapper-1.02.67-2.el5
ããdevice-mapper-event-1.02.67.2.el5
ããdevice-mapper-multipath-0.4.7-48.el5
ããï¼»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 installed
ãã2ã设置å¼æºå¯å¨ï¼å¹¶æ£æ¥å®è£
å
æ¯å¦æ£å¸¸ï¼
ããchkconfig --level 345 multipathd on
ããlsmod |grep dm_multipath
ããï¼»root@RKDB01 Serverï¼½# chkconfig --level 345 multipathd on
ããï¼»root@RKDB01 Serverï¼½# lsmod |grep dm_multipath
ããdm_multipath 58969 0
ããscsi_dh 42561 1 dm_multipath
ããdm_mod 102417 4 dm_mirrorï¼dm_multipathï¼dm_raid45ï¼dm_log
ããï¼»root@RKDB01 Serverï¼½#
ãã3ãé
ç½®multipathd 使å
¶æ£å¸¸å·¥ä½ï¼ç¼è¾/etc/multipath.confï¼å¼æ¾å¦ä¸å
容ï¼
ããdefaults {
ããudev_dir /dev
ããpolling_interval 10
ããselector âround-robin 0â
ããpath_grouping_policy multibus
ããgetuid_callout â/sbin/scsi_id -g -u -s /block/%nâ
ããprio_callout 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ã并å
³éå¦ä¸å
容
ãã#blacklist {
ãã# devnode â*â
ãã#}
ãã#defaults {
ãã27 # user_friendly_names yes
ãã28 #}
ãã5ãå®æä¹åæ§è¡å¦ä¸å½ä»¤åç°å¤è·¯å¾ï¼
ããï¼»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
ããæ£å¨å
³émultipathd 端å£çæ§ç¨åºï¼ [确å®ï¼½
ããæ£å¨å¯å¨å®æ¤è¿ç¨multipathdï¼ ï¼»ç¡®å®ï¼½
ããï¼»root@RKDB01 Serverï¼½# multipath -v2
ããï¼»root@RKDB01 Serverï¼½# multipath -v2
ããï¼»root@RKDB01 Serverï¼½# multipath -ll
ããmpath1 ï¼3600d02310000011b16a5d57c6a1bd99aï¼ dm-0 TOYOUï¼NetStor_iSUM510
ããï¼»size=3.3T][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 8:32 ï¼»failed][readyï¼½
ããï¼»root@RKDB01 Serverï¼½#
ãã6ãéå¯æå¡å¨åï¼å¯ä»¥çå°å¤è·¯å¾ä¿¡æ¯äºï¼
ããï¼»root@RKDB01 ~ï¼½# ll /dev/mapper/
ããæ»è®¡ 0
ããcrw------- 1 root root 10ï¼ 60 11-05 22:35 control
ããbrw-rw---- 1 root disk 253ï¼ 0 11-05 22:35 mpath1
ããbrw-rw---- 1 root disk 253ï¼ 1 11-05 22:35 mpath2
ããï¼»root@RKDB01 ~ï¼½# multipath -ll
ããmpath2 ï¼3600d02310000011b76128b9c63138cf4ï¼ dm-1 TOYOUï¼NetStor_iSUM510
ããï¼»size=3.2T][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 ï¼»active][readyï¼½
ãã\_ 1:0ï¼1:0 sdd 8:48 ï¼»active][readyï¼½
ãã7ãéè¿fdisk çå¯ä»¥çæäºDM-0/DM-1两个çï¼æ£æ¯ä¸é¢sdc/sdeï¼sdb/sddå¤è·¯å¾ååºæ¥çï¼
ããï¼»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 = cylinders 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ãåæ¶ä¹å¯ä»¥å¨/dev/mapperç®å½ä¸æ¥çå°å¤è·¯å¾æ å°çä¿¡æ¯ï¼
ããï¼»root@RKDB01 ~ï¼½# ll /dev/mapper/
ããæ»è®¡ 0
ããcrw------- 1 root root 10ï¼ 60 11-06 00:49 control
ããbrw-rw---- 1 root disk 253ï¼ 2 11-06 00:49 data-data001
ããbrw-rw---- 1 root disk 253ï¼ 0 11-06 00:49 mpath1
ããbrw-rw---- 1 root disk 253ï¼ 1 11-06 00:49 mpath2
温馨提示:内容为网友见解,仅供参考