Convert Powerpath to Multipath for Redhat Linux 5.x
Convert Linux PowerPath Servers to MPIO
This document outlines the procedure for switching a SAN boot Linux server running RHEL 5.1 and above from EMC PowerPath to MPIO.
Copy the correct /etc/multipath.conf file to the server
(lab1)# cp /nfs/packages/ga/mpio/RH5/multipath.conf.trpdefault
/etc/multipath.conf
Boot into single user mode
(lab1)# init S
Remove the swap device
(lab1)# swapoff /dev/emcpowera3
Edit the /etc/rc.sysint script and remove the following section, so PowerPath does not start
###BEGINPP
# Configure and initialize PowerPath.
if [ -f /etc/init.d/PowerPath ]; then
/etc/init.d/PowerPath start
fi
###ENDPP
Replace the lvm.conf file for PowerPath with the default
(lab1)# mv /etc/lvm/lvm.conf.default /etc/lvm/lvm.conf
Edit the fstab file, and comment out the line for swap
#/dev/emcpowera3 swap swap defaults 0 0
Reboot the server
(lab1)# init 6
When the server comes up, remove the PowerPath package
(lab1)# rpm –qa|grep EMC
(lab1)# rpm –erase EMCpower.LINUX-5.1.x.x.x.x
Boot from the rescue disk
Skip the load network devices and find installations.
At the prompt, run the following commands
(rhel.sh)# mkdir /mnt/sysimage
(rhel.sh)# mkdir /mnt/sysimage/boot
(rhel.sh)# multipath –F
(rhel.sh)# multipath –v0
(rhel.sh)# mulitipath –l
You should see multipath devices now
Run the kpartx command to create the device tree entries
(rhel.sh)# kpartx –a /dev/mapper/mapth0
Activate the volume groups
(rhel.sh)# lvm vgscan –config ‘devices{ filter = [ “a/mapper/”,”r/.*/” ] }’
(rhel.sh)# lvm vgchange –ay –config ‘devices{ filter = [ “a/mapper/”,”r/.*/” ] }’
Mount the devices
(rhel.sh)# mount –t ext3 /dev/mapper/rootvg-lv00 /mnt/sysimage
(rhel.sh)# mount –t ext3 /dev/mapper/mpath0p1 /mnt/sysimage/boot
(rhel.sh)# mount –t proc none /mnt/sysimage/proc
(rhel.sh)# mount /dev /mnt/sysimage/dev
(rhel.sh)# mount /sys /mnt/sysimage/sys
Switch to the root directory
(rhel.sh)# chroot /mnt/sysimage
Create dm table entries
(rhel.sh)# dmsetup mknodes mpath0
(rhel.sh)# dmsetup mknodes mpath0p1
(rhel.sh)# dmsetup mknodes mpath0p2
(rhel.sh)# dmsetup mknodes mpath0p3
Edit the file /etc/sysconfig/mkinitrd/multipath and change the line to “MULTIPATH=yes”
Remount the /boot directory
(rhel.sh)# umount /boot
(rhel.sh)# mount /dev/mapper/mpath0p1 /boot
Change the /boot/grub/device.map entry to point to the mpath boot device
# this device map was generated by anaconda
(hd0) /dev/mapper/mpath0
Edit the fstab file to point to the mpath devices
/dev/rootvg/lv00 / ext3 defaults 1 1
/dev/mapper/mpath0p1 /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/dev/mapper/mpath0p3 swap swap defaults 0 0
#
/dev/mapper/uservg-lv01 /export/home ext3 defaults 1 2
/dev/mapper/uservg-lv02 /export/appl/pkgs ext3 defaults 1 2
Create a new ramdisk
(rhel.sh)# mkinitrd –f /boot/HP-initrd-2.6.18-53.1.6.el5.img 2.6.18-53.1.6.el5
Create the grub entry
(rhel.sh)# grub-install /dev/mapper/mpath0
Disconnect the rescue disk
Reboot the server
I’ve been in the IT industry for over 15 years, and I am currently a System Administrator specializing in AIX, Solaris, and Redhat.
Anthony Cicone
www.agccomputerservices.com