IBM Support

IBM PowerVM (VIOS) HowTo: Step by step instructions to migrate a Virtual Media Library from a failing disk to another disk

How To


Summary

This document provides step by step instructions on how to migrate a Virtual Media Library from a failing disk to another disk

Objective

While trying to replace a failing disk which contains a Virtual Media Library (VML), the standard approach to migrate the VML is to run the command
 
$ migratepv -lv VMLibrary hdisk0 hdisk1
Where:
hdisk0 represents the failing disk
hdisk1 represents the destination disk
VMLibrary represents the VML Logical Volume (LV)
In this scenario, since 'VMLibrary' is not an ordinary LV, the following output will be displayed
"VMLibrary" is a reserved name for the virtual media repository.
 
Note:
In this example, the root volume group (rootvg) must contain the 2 drives (e.g., hdisk0 and hdisk1)

Environment

PoweVM VIOS 3.1 and 4.1

Steps

IMPORTANT
  1. The current "PV STATE" of the failing disk must be "Active".  To check, run "lsvg -pv rootvg"
  2. migratepv command uses LVM mirroring.  This means all physical partitions on the failing disk (the source physical volume) must be accessible in order to synchronize the physical partitions on the destination physical volume.  Depending on the status of the failing disk, the synchronization of the physical partitions may complete successfully, or it may fail.  If it fails, the Virtual Media Library may need to be removed and recreated or restored from backup.
Migrate a VMLibrary lv to another disk is using these commands
To view on which hdisk the VMLibrary resides on:

$ lslv -map VMLibrary
The results of the command should look similar to:
VMLibrary:/var/vio/VMLibrary
LP PP1 PV1 PP2 PV2 PP3 PV3
0001 0145 hdisk0
0002 0146 hdisk0
0003 0002 hdisk0
0004 0003 hdisk0
----------snip--------
To migrate the LV VMLibrary from hdisk0 to hdisk1
$ migratepv -lv VMLibrary hdisk0 hdisk1
Note: hdisk0 & hdisk1 has to be in the same volume group

To confirm that the migration was successful, run the command:

$ lslv -map VMLibrary
The results of the command should look similar to:
VMLibrary:/var/vio/VMLibrary
LP PP1 PV1 PP2 PV2 PP3 PV3
0001 0113 hdisk1
0002 0114 hdisk1
0003 0115 hdisk1
0004 0116 hdisk1
----------snip--------
Note that hdisk0 is a failing disk and needs to be replaced. Errors may be displayed while executing the migratepv command due to the disk errors.
In the case an error does occur, the VML will need to be deleted using the following commands.
After deleting the VML, it can be recreated after replacing the failed disk.

Unload the virtual media disk:

$ unloadopt -vtd vtopt0

Removing the VM Library:

Unmap the vtopt# VTDs from the vhosts

$ rmvdev -vtd <VTDname>

Remove the virtual media disks from the Virtual Media Repository:
$ rmvopt -name <name of virtual optical disk>

Remove the repository:

$ rmrep -f
After replacing the failing disk, use the following steps to recreate the virtual media repository on the newly replaced disk

Document Location

Worldwide

[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSPHKW","label":"PowerVM Virtual I\/O Server"},"ARM Category":[{"code":"a8m50000000L0FdAAK","label":"VSCSI-\u003EVirtual Media Repository (VML)"}],"ARM Case Number":"TS016216403","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"3.1.3;3.1.4;4.1.0"}]

Document Information

Modified date:
16 May 2024

UID

ibm17145320