Context

Few days ago I had a problem with an alt_disk_copy action on one of my systems (running with HDLM), which was freshly restored via mksysb (from another host), causing this error :

root@lpar # alt_disk_copy -d hdisk2
Calling mkszfile to create new /image.data file.
Checking disk sizes.
Creating cloned rootvg volume group and associated logical volumes.
0505-102 alt_disk_install: mkvg has returned an error.
0516-1254 /usr/sbin/mkvg: Changing the PVID in the ODM.
0516-021 /usr/sbin/varyonvg: The varyonvg failed because the volume group's
major number was already used by another device.
0516-862 /usr/sbin/mkvg: Unable to create volume group.


Just to be sure, I tried creating a mkvg on the same disk, and I got the same error :

root@lpar# mkvg -y aaa hdisk2
0516-021 /usr/sbin/varyonvg: The varyonvg failed because the volume group's major number was already used by another device.
0516-862 mkvg: Unable to create volume group.

After a few digging on the net, I found this from the following blog on Developerworks, in the comments section, Val Ryzhkov talks about a really useful command to get this to work :

 If you deploy AIX from mksysb with HDLM « build-in », then you need to run /usr/DynamicLinkManager/bin/dlmpostrestore before trying to create or varyon volume groups. Otherwise you will get that message « …major number was already used…« .
The utility is packaged with HDLM itself.

I gave it a try and it actually worked for me too!

root@lpar# /usr/DynamicLinkManager/bin/dlmpostrestore
KAPL10555-I Executing the dlmpostrestore utility will reboot the host. Is this OK? [y/n]:y

Keep in mind that it will reboot your LPAR, though…

Definitions

I found some infos in the HDLM User’s Guide, about replicating an AIX system managed with HDLM, maybe it will enlighten you as it did for me 🙂

Notes on Replicating a System

You can use the OS’s mksysb command to back up hosts that include HDLMmanaged
devices. If you then replicate (clone) a system from a mksysb
image created in this manner onto another LPAR or host, you must update
the HDLM information to match that of the destination system’s environment.
To update the HDLM information to match that of the destination system’s
environment, use the following procedure to execute the HDLM restoration
support utility (dlmpostrestore) after you have restored the mksysb image.
To update HDLM information:
1. After restoring the image, log in to the activated host as a user with root
permissions.
2. Execute the dlmpostrestore utility.

 # /usr/DynamicLinkManager/bin/dlmpostrestore
A message for confirming whether to continue processing is displayed
(KAPL10552-I is displayed in a local boot disk environment, and
 KAPL10555-I is displayed in a boot disk environment). To continue
 processing, enter y in response to this message.
 If you executed the utility in a boot disk environment, you must then
 restart the host.

To be completely thorough, here is the « man page » of dlmpostrestore :

dlmpostrestore Utility for HDLM Restoration Support

This utility updates HDLM information to match that of the target system
environment when a system replication (clone) is created from a mksysb
image that includes HDLM-managed devices.
Format
/usr/DynamicLinkManager/bin/dlmpostrestore [-s | -h]
Parameters
-s
Suppresses display of a confirmation message when the utility executes.
-h
Displays the format of the dlmpostrestore utility.
Notes
• When the dlmpostrestore utility is executed in a local boot disk
environment, the devices are reconfigured; when the utility is executed in
a boot disk environment, the host is restarted.
• Before you execute the dlmpostrestore utility, stop all application
processes that access HDLM-managed devices.
• Before you execute the dlmpostrestore utility, make sure that no path
errors are occurring. If a path error occurs, release of a reservation may
fail.

Hope it will help you like it did for me !

Links

HDLM User’s Guide

AIX volume group creation failing on HDS disk 

Share Button
AIX + HDLM restored from cloned mksysb : VG creation or alt_disk_copy problem
Taggé sur :                    

Laisser un commentaire