Sharing physical volumes across logical partitions on IBM Power Systems servers

Comments

Sharing the same PVs across multiple LPARs

This article provides the process for sharing the same PVs across multiple LPARs.

These PVs can be:

1. Available on the IBM® Power Systems™ servers, which are assigned to Virtual I/O Server (VIOS).

2. From the storage area network (SAN) and assigned to VIOS.

In this example, we are sharing four PVs hdisk5, hdisk6, hdisk7, hdisk8 among three LPARs sys1, sys2, sys3.

Log in to the VIOS using padmin ID and password.

Login ID: padmin

Login password: padmin's password

Last unsuccessful login: Thu Apr 1 00:12:40 CDT 2010 on /dev/vty0

Last login: Sat Jul 21 00:03:49 CDT 2012 on /dev/vty0

To perform the administrative tasks, run the oem_setup_env command.

$ oem_setup_env

#

Checking the physical volume IDs and generating new ones

Check the physical volume identifier (PVID) of the disks by using the lspv command.

#lspv

If you notice that a disk does not have the PVID or there are duplicate PVIDs, then clear the PVIDs and set the PVID again.

Clearing the PVIDs:

#chdev -l hdisk5 -a pv=clear
#chdev -l hdisk6 -a pv=clear
#chdev -l hdisk7 -a pv=clear
#chdev -l hdisk8 -a pv=clear

Getting the PVIDs again for the PVs:

#chdev -l hdisk5 -a pv=yes
#chdev -l hdisk6 -a pv=yes
#chdev -l hdisk7 -a pv=yes
#chdev -l hdisk8 -a pv=yes

Changing the reserve policy

As we need to assign the same disk to multiple LPARs, change the reserve policy to no. Otherwise, we cannot assign them.

Changing the reserve policy:

#chdev -l hdisk5 -a reserve_policy=no_reserve
#chdev -l hdisk6 -a reserve_policy=no_reserve
#chdev -l hdisk7 -a reserve_policy=no_reserve
#chdev -l hdisk8 -a reserve_policy=no_reserve

Now exit from oem_setup_env.

Assigning the disks to LPARs

Map (assign) the disks to each LPAR.

The vhost4 adapter is assigned to the sys1 LPAR and all the disks are assigned to the same virtual Small Computer System Interface (VSCSI) adapter, vhost4.

mkvdev -f -vdev hdisk5 -vadapter vhost4 -dev sys1_hdisk5
mkvdev -f -vdev hdisk6 -vadapter vhost4 -dev sys1_hdisk6
mkvdev -f -vdev hdisk7 -vadapter vhost4 -dev sys1_hdisk7
mkvdev -f -vdev hdisk8 -vadapter vhost4 -dev sys1_hdisk8

The vhost5 adapter is assigned to the sys2 LPAR and all the disks are assigned to the same virtual SCSI adapter, vhost5.

mkvdev -f -vdev hdisk5 -vadapter vhost5 -dev sys2_hdisk5
mkvdev -f -vdev hdisk6 -vadapter vhost5 -dev sys2_hdisk6
mkvdev -f -vdev hdisk7 -vadapter vhost5 -dev sys2_hdisk7
mkvdev -f -vdev hdisk8 -vadapter vhost5 -dev sys2_hdisk8

The vhost6 adapter is assigned to the sys3 LPAR and all the disks are assigned to the same virtual SCSI adapter, vhost6.

mkvdev -f -vdev hdisk5 -vadapter vhost6 -dev sys3_hdisk5
mkvdev -f -vdev hdisk6 -vadapter vhost6 -dev sys3_hdisk6
mkvdev -f -vdev hdisk7 -vadapter vhost6 -dev sys3_hdisk7
mkvdev -f -vdev hdisk8 -vadapter vhost6 -dev sys3_hdisk8

Now, log in to the respective LPARs and run the cfgmgr command

Check the PVIDs of the disks using the lspv command.

The PVID should be same among all the LPARs.

General usage of this setup

This kind of setup is mainly used in cluster environments.

As I belong to an IT team, I have configured this for the following scenarios:

1. For a cluster environment of IBM AIX® servers

2. When there is a need to share the same storage for IBM DB2® cluster services

3. For cluster or IBM PowerHA® environments, when we use the same PVs for failover in an active-standby scenario

Resources

Here are a few useful examples that are relative to this document:


Downloadable resources


Comments

Sign in or register to add and subscribe to comments.

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=AIX and UNIX
ArticleID=852147
ArticleTitle=Sharing physical volumes across logical partitions on IBM Power Systems servers
publish-date=12242012