IBM Support

Moving a Rootvg Workload Partition (WPAR) to Another Disk

Question & Answer


Question

I have a rootvg WPAR that is on one disk.  Is there a method to move it to a new disk?

Answer

There may be an occasion where you have created a rootvg WPAR on a specific disk, and you want to move the entire WPAR to another disk. One example might be that the original disk is from an older storage enclosure, and you wish to move the WPAR to newly purchased storage, connected to the system.

You can do this by means of an alternate bootset. Similar to how using the alt_disk_copy command in a global LPAR will create a copy of rootvg on another disk, an alternate bootset is a copy of a WPAR's rootvg on another disk.

The example in this document will use a rootvg WPAR that is on a single disk (hdisk11), and has private /opt and /usr filesystems (AKA a "detached" WPAR). This WPAR was initially created using these options:


# mkwpar -D devname=hdisk11 rootvg=yes -l -n rootvgwpar
# startwpar rootvgwpar
 


1. List the bootsets for the rootvg WPAR (-Br) we are interested in:

# lswpar -Br rootvgwpar
Name        Device Name      Virtual Device  RootVG  Bootset
-------------------------------------------------------------
rootvgwpar  hdisk11          hdisk0          yes     0
 

So we can see that hdisk11 is being used for the rootvg in the WPAR, as internal hdisk0.


2a. Now we allocate a new, unused disk to the WPAR, and set a bootset on it in the same action:

# chwpar -B devname=hdisk9 rootvgwpar
Creating a bootset for WPAR rootvgwpar. Please wait...
 

After the command completes, we can see that a new bootset has been created on hdisk9:

# lswpar -Br rootvgwpar
Name        Device Name      Virtual Device  RootVG  Bootset
-------------------------------------------------------------
rootvgwpar  hdisk9           hdisk1          no      1
rootvgwpar  hdisk11          hdisk0          yes     0
 

2b. If we log in to the WPAR, we'll see a rootvg and an alternate rootvg:

# clogin rootvgwpar

# lspv
hdisk0          00c7a96733e1ebfc          rootvg          active
hdisk1          00c7a9673433f0a7          altvg.1
 


3. From the global environment, we can set the bootlist for the WPAR to boot from the bootset on the new disk:

# chwpar -b bootlist=1 rootvgwpar 
check that it was set properly:

# lswpar -b rootvgwpar
Name        Bootlist
---------------------
rootvgwpar  1
 


4. Reboot the WPAR on the new bootset.

# rebootwpar rootvgwpar

Stopping workload partition rootvgwpar.
Stopping workload partition subsystem cor_rootvgwpar.
0513-044 The cor_rootvgwpar Subsystem was requested to stop.
stopwpar: 0960-261 Waiting up to 600 seconds for workload partition to halt.
Shutting down all workload partition processes.
Unmounting all workload partition file systems.

Starting workload partition rootvgwpar.
Mounting all workload partition file systems.
Loading workload partition.
Exporting workload partition devices.
Exporting workload partition kernel extensions.
Starting workload partition subsystem cor_rootvgwpar.
0513-059 The cor_rootvgwpar Subsystem has been started. Subsystem PID is 8323226.
Verifying workload partition startup.


If we look at the bootsets, we'll see that the 2nd disk now has rootvg officially on it:

# lswpar -Br rootvgwpar
Name        Device Name      Virtual Device  RootVG  Bootset
-------------------------------------------------------------
rootvgwpar  hdisk9           hdisk0          yes     1
rootvgwpar  hdisk11          hdisk1          no      0
 

That bootset also sees hdisk9 as "hdisk0" for it, and the other disk is hdisk1. Notice the bootset ID has not changed, bootset 0 is still on (global) disk hdisk11 and bootset 1 on (global) disk hdisk9.

If we log into the WPAR we can see this:

# lspv
hdisk0          00c7a9673433f0a7          rootvg          active
hdisk1          00c7a96733e1ebfc          altvg.0
 

The volume group "altvg.0" is our original rootvg.


5. At this point, if everything is looking good, we can remove the original bootset from the global environment:

# chwpar -K -B bootset=0 rootvgwpar

# lswpar -Br rootvgwpar
Name        Device Name      Virtual Device  RootVG  Bootset
-------------------------------------------------------------
rootvgwpar  hdisk9           hdisk0          yes     1

# lswpar -D rootvgwpar | grep disk
rootvgwpar  disk    hdisk9           yes     EXPORTED
rootvgwpar  disk    hdisk11          no      EXPORTED



6. Now we can remove the original rootvg disk:
# chwpar -K -D devname=hdisk11 rootvgwpar 


7. Remember to run cfgmgr to put the disk in an Available state again, so it can be used by another WPAR or volume group:

 # lsdev -xc disk -l hdisk11
hdisk11 Defined 00-01-02 MPIO IBM 2076 FC Disk

# cfgmgr

# lsdev -xc disk -l hdisk11
hdisk11 Available 00-01-02 MPIO IBM 2076 FC Disk

[{"Product":{"code":"SWG10","label":"AIX"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Not Applicable","Platform":[{"code":"PF002","label":"AIX"}],"Version":"7.1","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Document Information

Modified date:
06 December 2019

UID

isg3T1024257