Thursday, August 6, 2015

RHEL6 - Boot using storage device (SAN)

Setup SAN Boot for RHEL 6

Pre-requisites task.
1. Have your RHEL 6 OS ready, rack and run the cable.
2. Closely colaborate with your storage team and have them present with single path to the system.

Procedures:

1. Your server comes with loaded OS (mostly). Boot your system using ILO and login to the system.

2. Now, Enable multipathing
# mpathconf --enable –-with_multipathd y

3. Edit multipath conf file and remove all other un necessary stuffs.

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 the logical path mapping of root disk. Find out the logical path the root disk is mapped
# multipath –v3
It should be /dev/mapper/mpatha

5. Create initramfs with multipath module
# dracut --force -–add multipath

6. Make sure multipath.conf is included in initrd image
# lsinitrd /boot/initramfs-*.x86_64.img | grep multipath.conf
-rw-r--r--   1 root     root         2525 Feb 27 13:31 etc/multipath.conf

7. 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.

8. Reboot the server.

9. Verify multipath, check hwhandler='1 alua' and member disk sda for mpatha
# 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

# multipath -ll

13. 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

source: http://honglus.blogspot.com/search/label/Linux

No comments:

Post a Comment