- OS : Red Hat Enterprise Linux Server release 6.10 (Santiago)
- Kernel : 2.6.32-431.29.2.e16
1. 현재 상태
- 이중화 구성으로 동일 디스크가 2개로 보이고 있는 상태 ( 총 3개의 디스크를 묶을 예정 )
# fdisk -l
Disk /dev/sdb: 4295.0 GB, 4294967296000 bytes
255 heads, 63 sectors/track, 522166 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/sde: 4295.0 GB, 4294967296000 bytes
255 heads, 63 sectors/track, 522166 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
2. 패키지 설치
- 패키지 설치 확인
# rpm -qa | grep device-mapper-multipath
- 패키지 설치
# yum -y install device-mapper-multipath
3. 설정 파일 복사
# cp /usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf /etc/multipath.conf
4. wwid 확인
- wwid 확인 후 기록 (device 2개가 동일 wwid로 구성되어 있음)
# scsi_id --whitelisted --device=/dev/sdb
360060e8007c57e000030c57e00001605
# scsi_id --whitelisted --device=/dev/sdc
360060e8007c57e000030c57e00001606
# scsi_id --whitelisted --device=/dev/sdd
360060e8007c57e000030c57e00001607
# scsi_id --whitelisted --device=/dev/sde
360060e8007c57e000030c57e00001605
# scsi_id --whitelisted --device=/dev/sdf
360060e8007c57e000030c57e00001606
# scsi_id --whitelisted --device=/dev/sdg
360060e8007c57e000030c57e00001607
5. /etc/multipath.conf 수정
- 주석 제거
## Use user friendly names, instead of using WWIDs as names.
defaults {
user_friendly_names yes
}
- 설정 추가
blacklist_exceptions {
wwid "360060e8007c57e000030c57e00001605"
wwid "360060e8007c57e000030c57e00001606"
wwid "360060e8007c57e000030c57e00001607"
}
multipaths {
multipath {
wwid 360060e8007c57e000030c57e00001605
alias mpath1
path_grouping_policy multibus
path_selector "round-robin 0"
failback manual
rr_weight priorities
no_path_retry 5
}
multipath {
wwid 360060e8007c57e000030c57e00001606
alias mpath2
}
multipath {
wwid 360060e8007c57e000030c57e00001607
alias mpath3
}
}
6. 서비스 가동 및 등록
# service multipathd start
# chkconfig multipathd on
7. 확인
# multipath -ll
mpath2 (360060e8007c57e000030c57e00001606) dm-1 HITACHI,OPEN-V
size=3.9T features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
|- 1:0:0:1 sdc 8:32 active ready running
`- 2:0:0:1 sdf 8:80 active ready running
mpath1 (360060e8007c57e000030c57e00001605) dm-0 HITACHI,OPEN-V
size=3.9T features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
|- 1:0:0:0 sdb 8:16 active ready running
`- 2:0:0:0 sde 8:64 active ready running
mpath3 (360060e8007c57e000030c57e00001607) dm-2 HITACHI,OPEN-V
size=2.0T features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
|- 1:0:0:2 sdd 8:48 active ready running
`- 2:0:0:2 sdg 8:96 active ready running
이 후 디스크 포맷 및 마운트 후 사용하면 됨.