Sharing physical volumes across logical partitions on IBM Power Systems servers

This article explains the process of sharing physical volumes (PVs) across multiple logical partitions (LPARs). This kind of environment is required for a cluster setup.

Anuradha Podila (anpodila@in.ibm.com), IT Specialist, IBM

Anuradha Podila has around 15 years of experience in system administration on heterogeneous platforms, such as IBM AIX, Solaris, HP-UX, and Linux®. She has been working as an IT Specialist in the IBM India Software Labs since 2004. Anuradha has good expertise on IBM Power Systems servers, VIOS, and AIX.



24 December 2012

Also available in Chinese

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:

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into AIX and Unix on developerWorks


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