You are on page 1of 8

CH A P T E R

11

Configuring PowerPath Multipathing for Linux
This chapter contains the following sections:

Configuring Boot over Multipathing, page 11-1

Preparing the System and Performing PowerPath Installation, page 11-1

Setting Up Files and Directories, page 11-2

Copying Required Objects and Configuration Files, page 11-2

Modifying Files, page 11-4

Archiving the bootdisk Directory, page 11-6

Configuring Boot over Multipathing
The following steps configure Boot over IB using PowerPath, using Linux RHEL3 Update7 on a X86_64
(AMD) system as an example.

Preparing the System and Performing PowerPath Installation
To prepare the system and install PowerPath, follow these steps:
Step 1

Set up the system for boot over SRP. When the system can boot over SRP, proceed with the steps below
to get the system boot over PowerPath.

Step 2

Install PowerPath on the system. Follow the usual EMC PowerPath installation procedure to install
PowerPath. Refer to the PowerPath installation document for instructions.
pm -ivh EMCpower.LINUX-4.5.1-022.rhel.x86_64.rpm
/etc/init.d/PowerPath start
emcpreg -install (register powerpath)

Step 3

After PowerPath is installed properly and started, enter the fdisk -l command. You should see output
similar to the example below. In this case, only one LUN is assigned to this host, and the LUN is
partitioned accordingly.
[root@sw-n4300-1 ~]# fdisk -l
Disk /dev/sda: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System

Cisco VFrame Third Party Integration Guide
OL-12603-01

11-1

6. Some Linux objects also need to be copied. follow these steps: Step 1 Create a new directory called bootdisk. -cp -p /boot/initrd-2.img and initrd-2.9-34.img file in the same bootdisk directory.ELsmp Step 5 Verify that the bootdisk directory now contains the following files and directories.ELsmp. Step 8 Verify that the following files and directories are in the bootdisk directory: bin dev etc init lib lib64 loopfs proc sbin sys sysroot usr Copying Required Objects and Configuration Files To copy the requireed PowerPath objects and configuration files. follow these steps: Step 1 Copy the PowerPath objects and configuration files into the new bootdisk directory.9-34. Cisco VFrame Third Party Integration Guide 11-2 OL-12603-01 . Step 7 Create two more directories in the bootdisk directory and call them lib64 and usr.9-34.ELsmp Step 4 Copy the initrd directory structure and all the associated files into the same bootdisk directory.img and initrd-2.9-34. 63 sectors/track.ELsmp.6.img > initrd-2.6. The emcpowera* shows the PowerPath pseudo devices.ELsmp. Setting Up Files and Directories To set up files and directories.9-34.ELsmp files from the bootdisk directory. Step 2 Copy the initrd file from the /boot to the new bootdisk directory.6. bin dev etc init lib loopfs proc sbin sys sysroot Step 6 Delete the initrd-2.6.6.img bootdisk/ Step 3 Unzip the initrd-2. zcat initrd-2. as follows -cpio -i -I initrd-2.6.ELsmp files.9-34.ELsmp. in addition to initrd-2. 21474836480 bytes 255 heads.9-34.4 GB.Chapter 11 Configuring PowerPath Multipathing for Linux Setting Up Files and Directories /dev/sda1 * 1 38 305203+ 83 Linux /dev/sda2 39 293 2048287+ 82 Linux swap /dev/sda3 294 2610 18611302+ 83 Linux Disk /dev/emcpowera: 21.6. 2610 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/emcpowera1 * 1 38 305203+ 83 Linux /dev/emcpowera2 39 293 2048287+ 82 Linux swap /dev/emcpowera3 294 2610 18611302+ 83 Linux PowerPath is now up and running.6.9-34.9-34.ELsmp.

1 (0x0000003977b00000) libc.dat ----> /etc/emcp_devicesDB. • Use the “ldd” command to obtain the required library.ko ----> /etc/lib /usr/lib/libemcp_core.so.so.6 => /lib/tls/libc.9-34. • Note that it is not required to copy the IB module since it should already be in the /lib directory in the original initrd file.so ----> /lib/libemcp_mp_rtl.1 => /lib64/libselinux.so.idx ----> /etc/emcp_devicesDB.so. You will copy all the required library files to either the /lib or /lib64 directory.so ----> /lib/libemcp_lam.so. as shown in this example: [root@host-1 bin]# ldd /bin/mkdir libselinux.so /usr/lib/libemcp_lam.6 => /lib64/tls/libc.1 => (0xffffe000) libc.6.so /usr/lib/libemcp_mp_rtl. These objects are used in the init file.2 (0x0000003976600000) [root@host-1 bin]# ldd /sbin/powermt linux-gate. • The /lib64 directory is required since it is a x86_64 system.idx /etc/emcp_registration ----> /etc/emcp_registration /etc/opt/emcpower ----> /etc/opt/emcpower /etc/fstab ----> /etc/fstab /lib/modules/2.dat /etc/emcp_devicesDB. Copy the whole PowerPath module.so.so /etc/opt/emcpower/powercf and /etc/opt/emcpower/emcpmgr object.so.2 (0x00ac6000) Table 11-1 Copy the PowerPath Objects and Configuration Files to the Directory Notes Copy the whole directory This directory contains Copy To Bootdisk Directory /bin/ash ----> /sbin/ash /bin/gawk ----> /sbin/gawk /bin/mkdir ----> /sbin/mkdir /sbin/powermt ----> /sbin/powermt /sbin/rmmod ----> /sbin/rmmod /bin/mount ----> /sbin/mount /bin/umount ----> /sbin/umount /bin/cat ----> /sbin/cat /bin/mknod ----> /sbin/mknod /sbin/pivot_root ----> /sbin/pivot_root /bin/sleep ----> /sbin/sleep /etc/emc ----> /etc/emc /etc/emcp_devicesDB.so.so ----> /lib/libemcp_lic_rtl.ELsmp/extr a/emc*.so /usr/lib/libemcp_lic_rtl.6 (0x00adf000) /lib/ld-linux.Chapter 11 Configuring PowerPath Multipathing for Linux Copying Required Objects and Configuration Files The entire list is displayed in the table below. Cisco VFrame Third Party Integration Guide OL-12603-01 11-3 .6 (0x0000003976800000) /lib64/ld-linux-x86-64.so.so ----> /lib/libemcp_core.

which you previously copied.2 ----> /lib/ld-linux.so ----> /lib/libemcp.so.2 /lib64/tls/libm.6 ----> /lib/libm.so.so.so.exec.2 /lib64/libselinux.mode=620 0 0 none /dev/shm tmpfs defaults 0 0 none /proc proc defaults 0 0 none /sys sysfs defaults 0 0 /dev/emcpowera2 swap swap defaults 0 0 /dev/hdc /media/cdrom auto pamconsole.6 /lib64/tls/libc.6 ----> /lib/libc.1 ----> /lib64/tls/librt.6 /lib64/libdl.see ‘man fstab-sync’ for details /dev/emcpowera3 / ext3 defaults 1 1 /dev/emcpowera1 /boot ext3 defaults 1 2 none /dev/pts devpts gid=5.6 /lib/tls/libc.so /usr/sbin/chroot ----> /usr/sbin/chroot Modifying Files To modify the /etc/fstab file.1 /lib64/tls/libpthread.so.so.so /lib/ld-linux.6 ----> /lib64/tls/libc.so.managed 0 0 /dev/fd0 /media/floppy auto pamconsole.1 /lib64/tls/librt.so.6 /lib64/ld-linux-x86-64.Chapter 11 Configuring PowerPath Multipathing for Linux Modifying Files Table 11-1 Copy the PowerPath Objects and Configuration Files to the Directory Notes Copy To Bootdisk Directory /usr/lib/libemcpmp.so.0 /lib/libpn.so.exec.so.2 /lib/tls/libm.so /usr/lib/libemcp.so ----> /lib/libpn. # This file is edited by fstab-sync . follow these steps: Step 1 Modify the /etc/fstab file to reflect the PowerPath devices: In this example.so ----> /lib/libemcpmp.so.so.2 ----> /lib64/libdl.so.0 ----> /lib64/tls/libpthread.6 ----> /lib64/tls/libm.noauto.managed 0 0 Step 2 Modify the default init file to the file below: #!/bin/ash mount -t proc /proc /proc echo Mounted /proc filesystem echo Mounting sysfs mount -t sysfs none /sys Cisco VFrame Third Party Integration Guide 11-4 OL-12603-01 .so.1 ----> /lib64/libselinux.so.so. /dev/emcpowera3 is the root partition and /dev/emcpowera1 is the boot partition.so.so.2 ----> /lib64/ld-linux-x86-64.noauto.so.

ko” rmmod emcpioc echo “Loading mptbase.ko echo “Loading emcphr.ko echo “Loading emcpmpaa.ko module” insmod /lib/scsi_mod.ko Cisco VFrame Third Party Integration Guide OL-12603-01 11-5 .ko echo “Loading emcpmpc.ko module” insmod /lib/ts_ib_sa_client.ko module” insmod /lib/mod_rhh.ko echo “Loading emcp.ko module” insmod /lib/ts_ib_dm_client.ko module” insmod /lib/ts_ib_client_query.ko module” insmod /lib/ts_ib_tavor.ko echo “Loading emcpmp.ko module” insmod /lib/emcpioc.ko echo “Loading mod_thh.ko echo “Loading ts_ib_dm_client.ko echo “Loading ts_kernel_poll.ko echo “Loading mod_rhh.ko module” insmod /lib/sd_mod.ko echo “Loading mod_vip.ko module” insmod /lib/ts_ib_cm.ko echo “Loading emcpmpap.ko module” insmod /lib/ts_ib_core.ko module” insmod /lib/emcpmpc.ko echo “Loading sd_mod.ko echo “Loading emcpioc.ko module” insmod /lib/emcp.ko echo “Loading ts_ib_tavor.ko module” insmod /lib/emcpmpap.ko module” insmod /lib/emcpmpaa.ko echo “Loading ts_ib_cm.ko echo “Removing module emcpioc.ko module” insmod /lib/ts_kernel_services.ko echo “Loading emcplib.ko module” insmod /lib/emcpmp.ko module” insmod /lib/ts_srp_host.ko module” insmod /lib/ts_kernel_poll.ko module” insmod /lib/mlxsys.ko module” insmod /lib/mod_vip.ko echo “Loading ts_ib_mad.ko echo “Loading ts_ib_sa_client.ko module” insmod /lib/emcplib.ko module” insmod /lib/ts_ib_packet_lib.ko echo “Loading scsi_mod.ko echo “Loading ts_ib_packet_lib.ko echo “Loading ts_ib_core.ko module” insmod /lib/mod_thh.ko echo “Loading ts_ib_client_query.ko echo “Loading ts_srp_host.ko module” insmod /lib/ts_ib_mad.ko module” insmod /lib/emcphr.Chapter 11 Configuring PowerPath Multipathing for Linux Modifying Files echo Creating /dev mount -o mode=0755 -t tmpfs none /dev mknod /dev/console c 5 1 mknod /dev/null c 1 3 mknod /dev/zero c 1 5 mkdir /dev/pts mkdir /dev/shm echo Starting udev udevstart echo -n “/sbin/hotplug” > /proc/sys/kernel/hotplug echo “Loading mlxsys.ko echo “Loading ts_kernel_services.ko module” insmod /lib/mptbase.

ko module” insmod /lib/jbd.9-34. /sbin/init <dev/console >dev/console 2>&1 echo “Unmount the old dev now” umount /initrd/dev Archiving the bootdisk Directory To archive the bootdisk directory. initrd exec chroot . b. In this example the archive file is put at /root/ a.Chapter 11 Configuring PowerPath Multipathing for Linux Archiving the bootdisk Directory echo “Loading mptscsih.6.ko echo “Loading jbd. Compress the file. follow these steps: Step 1 Archive the bootdisk directory now that all the required files are copied into it. Locate and copy the file.ko module” insmod /lib/mptscsih. | cpio -v -c -o > /root/initrd-2.ko echo “Loading ext3. cd to the bootdisk directory. find . Cisco VFrame Third Party Integration Guide 11-6 OL-12603-01 .ko module” insmod /lib/ext3.ELsmp c.ko udevstart rm -f /dev/emcpower mmaj=`cat /sys/class/misc/emcpower/dev | gawk -F : '{print $1}'` mmin=`cat /sys/class/misc/emcpower/dev | gawk -F : '{print $2}'` mknod /dev/emcpower c $mmaj $mmin sleep 2 echo “Start the configuration of powerpath” powermt config powermt load /etc/opt/emcpower/emcpmgr map sleep 7 /etc/opt/emcpower/powercf -C powermt save powermt register sleep 2 echo “Creating root device” echo “mkrootdev /dev/root” | /sbin/nash umount /sys echo “Mounting root filesystem” mount -o defaults --ro -t ext3 /dev/root /sysroot mount -t tmpfs --bind /dev /sysroot/dev umount /proc cd /sysroot echo “Switching to the new root” pivot_root .

ELsmp d.9-34.ELsmp. mv initrd-2.6.gz initrd-2. Cisco VFrame Third Party Integration Guide OL-12603-01 11-7 .img Completing the PowerPath Configuration To complete the PowerPath configuration.9-34.Chapter 11 Configuring PowerPath Multipathing for Linux Archiving the bootdisk Directory gzip -9 initrd-2. follow these steps: Step 1 Move the initrd-2.ELsmp.img file to the /boot directory.6.6.9-34. Move the directory.9-34. In this example the PowerPath pseaudo device was root=/dev/emcpowera3 Step 3 Reboot the server.6.ELsmp. Step 2 Change the bootloader append for the root parameter of the kernel to the appropriate PowerPath pseudo device. It will boot the root filesystem on a PowerPath device instead of a sd device.

Chapter 11 Configuring PowerPath Multipathing for Linux Archiving the bootdisk Directory Cisco VFrame Third Party Integration Guide 11-8 OL-12603-01 .