Setting up SAN boot for RHEL 6.x using native multipath on EMC storage
You can set up a SAN boot LUN to work in a Red Hat Enterprise Linux environment that is using the FC protocol. This article specifically looks at RHEL 6.x but the procedure will work with RHEL 5.x environments
Before you begin
- Verify that your system setup supports SAN boot LUNs
- You are running RHEL 6.x (see bottom of article for 5.x details)
- EMC storage setup with Active/Active (ALUA)
- Boot lun was presented with single path for initial install
Procedure:
- Server boots up after initial install
- Login to server as root to enable multipath
[root@server1]# mpathconf --enable —-with_multipathd y
- Edit
/etc/multipath.conf
and make sure it only contains following valid parametersblacklist { } defaults { user_friendly_names yes } devices { device { vendor "DGC" product ".*" product_blacklist "LUNZ" hardware_handler "1 alua" path_checker directio prio alua } }
- Find out the logical path the root disk is mapped
[root@server1]# multipath —v3
It should be/dev/mapper/mpatha
- Create initramfs with multipath module
[root@server1]# dracut --force -—add multipath
- 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.conf
- Modify the /boot/grub/device.map and change
(hd0) /dev/sda
to(hd0) /dev/mapper/mpatha
This is assuming the boot disk is on/dev/mapper/mpatha
as verified in step 2 above. - Reboot the server.
- 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
- Ask storage administrator to enable other paths for boot LUN.
- Reboot server again after multipath is aenabled in storage too
- 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 running
- 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
RHEL 5.x
You can also apply this procedure to RHEL 5.x based systems. However, for RHEL 5.x use mkinitrd
instead of dracut
and the /etc/multipath.conf
is slightly different.