설정 이전에 Redhat 에서 제공하는 DM-MultiPath 를 사용하는 목적
이중화
DM-Multipath는 활성/비활성 설정에서 장애 조치를 제공할 수 있습니다. 활성/비활성 설정에서, 경로 절반만이 아무때에나 I/O 용으로 사용됩니다. I/O 경로 요소 (케이블, 스위치, 제어기)에 장애가 발생할 경우 DM-Multipath는 다른 경로로 전환합니다.
성능 향상
DM-Multipath는 I/O가 라운드 로빈 (round-robin) 상태에 있는 경로를 통해 지나가는 위치에서 활성/비활성 모드로 설정될 수 있습니다. 일부 설정에서 DM-Multipath는 I/O 경로에서의 부하량을 감지하여 이를 재조정할 수 있습니다.
구성 시나리오
SR (iSCSI) - 192.168.50.20
Node - 192.168.50.50 // /iSCSI 할당된 파티션 dev/sdb
필요한 패키지 목록 - device-mapper-multipath-x.x.x.x.x
패키지가 없다면 yum 을 통해 설치한다.
Node> 현재 기본 설정되어 있는 파티션
[root@50-VM ~]# fdisk -l
Disk /dev/sda: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 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: 0x00048ad6
Device Boot Start End Blocks Id System
/dev/sda1 * 1 39 307200 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 39 3917 31149056 8e Linux LVM
Disk /dev/mapper/vg_sys-lv_root: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 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/mapper/vg_sys-lv_swap: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 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/sdb: 10.7 GB, 10733958144 bytes
64 heads, 32 sectors/track, 10236 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Node> wwiid 확인 후 멀티패스 conf 파일 생성
[root@50-VM ~]# scsi_id -gu /dev/sdb
1IET_00010001
/etc/multipath.conf 파일 생성
(/usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf 복사도 가능)
multipaths {
multipath {
wwid 1IET_00010001
alias red
}
}
Node> service multipathd start // 데몬 실행
Node> multipath -ll // 추가된 mutipath 확인
Disk /dev/mapper/1IET\x20\x20\x20\x20\x2000010001: 10.7 GB, 10733958144 bytes
255 heads, 63 sectors/track, 1304 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