Setup SAN Boot for RHEL 6.x using native multipath on EMC storage
Requirements:
1) RHEL 6.x (most apply to RHEL 5.x too, RHEL 5.x use mkinitrd instead of Dracut and the /etc/multipath.conf is slightly different refer to Red Hat KB in reference section)
2) EMC storage was setup with Active/Active (ALUA)
3) Boot LUN was presented with single path for initial install
Procedures:
1. Server boots up after initial install
2. Login to server as root to enable multipath
[root@server1]#mpathconf --enable –-with_multipathd y
3. Edit /etc/multipath.conf and make sure it only contains following valid parameters
[root@server1]#multipath –v3
It should be /dev/mapper/mpatha
5. Create initramfs with multipath module
[root@server1]#dracut --force -–add multipath
6. Make sure multipath.conf is included in initrd image
8. Reboot the server.
9. Verify multipath, check hwhandler='1 alua' and member disk sda for mpatha
NOTE: any change to /etc/multipath.conf requires re-create initramfs ( dracut --force -–add multipath) and a reboot, because the boot LUN is on SAN, if boot LUN is local disk, change to /etc/multipath.conf only requires multipathd restart
1) RHEL 6.x (most apply to RHEL 5.x too, RHEL 5.x use mkinitrd instead of Dracut and the /etc/multipath.conf is slightly different refer to Red Hat KB in reference section)
2) EMC storage was setup with Active/Active (ALUA)
3) Boot LUN was presented with single path for initial install
Procedures:
1. Server boots up after initial install
2. Login to server as root to enable multipath
[root@server1]#mpathconf --enable –-with_multipathd y
3. Edit /etc/multipath.conf and make sure it only contains following valid parameters
blacklist { } defaults { user_friendly_names yes } devices { device { vendor "DGC" product ".*" product_blacklist "LUNZ" hardware_handler "1 alua" path_checker directio prio alua } }4.Find out the logical path the root disk is mapped
[root@server1]#multipath –v3
It should be /dev/mapper/mpatha
5. Create initramfs with multipath module
[root@server1]#dracut --force -–add multipath
6. Make sure multipath.conf is included in initrd image
[root@server1]#lsinitrd /boot/initramfs-*.x86_64.img | grep multipath.conf -rw-r--r-- 1 root root 2525 Feb 27 13:31 etc/multipath.conf7. Modify the /boot/grub/device.map and change
(hd0) /dev/sda to (hd0) /dev/mapper/mpathaThis is assuming the boot disk is on /dev/mapper/mpatha as verified in step 2 above.
8. Reboot the server.
9. Verify multipath, check hwhandler='1 alua' and member disk sda for mpatha
[root@server1]#multipath –ll mpatha (3600601609973310067eb1e1ed69ae311) dm-0 DGC,VRAID size=150G features='1 queue_if_no_path' hwhandler='1 alua' wp=rw `-+- policy='round-robin 0' prio=10 status=enabled |- 1:0:0:0 sda 8:0 active ready running 10. Ask storage administrator to enable other paths for boot LUN. 11. Reboot server again after multipath is aenabled in storage too 12. Login server to verify all paths, check hwhandler='1 alua' prio>0 if hwhandler='1 emc' or prio=0 means PNR mode [root@server1]#multipath -ll mpatha (3600601609973310067eb1e1ed69ae311) dm-0 DGC,VRAID size=150G features='1 queue_if_no_path' hwhandler='1 alua' wp=rw |-+- policy='round-robin 0' prio=130 status=active | |- 1:0:1:0 sdd 8:48 active ready running | `- 2:0:1:0 sdj 8:144 active ready running `-+- policy='round-robin 0' prio=10 status=enabled |- 1:0:0:0 sda 8:0 active ready running `- 2:0:0:0 sdg 8:96 active ready running mpathb (360060160997331009fd6e124d69ae311) dm-1 DGC,VRAID size=800G features='1 queue_if_no_path' hwhandler='1 alua' wp=rw |-+- policy='round-robin 0' prio=130 status=active | |- 1:0:0:1 sdb 8:16 active ready running | `- 2:0:0:1 sdh 8:112 active ready running `-+- policy='round-robin 0' prio=10 status=enabled |- 1:0:1:1 sde 8:64 active ready running `- 2:0:1:1 sdk 8:160 active ready running13. Partition other LUNS using fdisk command as normal, but use logical path /dev/mapper/mpathb etc (partition will be created as /dev/mapper/mpathbp1 instead of /dev/mapper/mpathb1
NOTE: any change to /etc/multipath.conf requires re-create initramfs ( dracut --force -–add multipath) and a reboot, because the boot LUN is on SAN, if boot LUN is local disk, change to /etc/multipath.conf only requires multipathd restart
<출처: http://honglus.blogspot.kr/2014/03/setup-san-boot-for-rhel-6x-using-native.html>
'Linux 이야기. > LInux Article.' 카테고리의 다른 글
리눅스 LVM 사이즈 변경에 대한 절차 (0) | 2014.04.07 |
---|---|
리눅스 디스크의 순서 변경 (0) | 2014.03.31 |
難攻不落(난공불락) 리눅스 및 오픈소스 인프라 세미나 발표양식 (0) | 2014.03.21 |
2014 難攻不落(난공불락) 리눅스 및 오픈소스 인프라 세미나 강사진 (2) | 2014.02.27 |
難攻不落(난공불락) 리눅스 및 오픈소스 인프라 세미나 (3) | 2014.02.08 |