*This document is for IBM Internal Use Only*
How to Renumber datavg hdisk#s After a mksysb Restore
Contents
About this document
Renumbering datavg hdisk#s after a mksysb restore
When rootvg is restored from a mksysb image, the hard disk names (numbers) may not coincide                 
with those that existed prior to the restore. This condition occurs
because mksysb always renumbers
the disks according to the order that it "walks through" the bus.
This document provides a procedure to remap the hdisk numbers to the way they were
prior to the mksysb.
The document applies to AIX Version 4.
WARNING: 
This procedure, if not used carefully, 
can cause ODM corruption. Use it only if
you are fully knowledgeable about the ODM.
- Log in as root.
 
-  Before the mksysb backup and restore, to get a mapping of hdisk numbers, 
pvid, and vgs,
 execute lspv. Sample output is as follows:
disk_name      pvid(disk label)    vg_names
hdisk0         00004466c66c3498    rootvg
hdisk1         00004466c7094f58    datavg01
hdisk2         00000654fb425f0e    datavg01
hdisk3         0001383388903964    datavg02
hdisk4         00000654ab1bc125    datavg02
hdisk5         00000654ab1de39e    datavg02
 pvid is the Physical Volume Identifier, which is similar to a disk label in a 
PC environment.                                    
 
-  Perform the mksysb backup and restore.
 
-  Issue lspv again. Then, to obtain parent, connwhere, and PdDvLn,
   execute the following:
 odmget -q name=hdiskX CuDv
 The type of the disk is the rightmost part of PdDvLn
   (disk/scsi/???type???).
 
-  If the datavgs are varied on and their filesystems are mounted, unmount the
filesystems with the umount command.
Then execute varyoffvg datavg_name and exportvg 
datavg_name to
dissociate
   the relationship between the pvs (hdisks) and the datavgs.
 
- Issue lspv again to confirm that datavg names have changed to "none".
Sample output is as follows:
hdisk0         00004466c66c3498    rootvg
hdisk1         00000654fb425f0e    none
hdisk2         00004466c7094f58    none
hdisk3         00000654ab1bc125    none
hdisk4         0001383388903964    none
hdisk5         00000654ab1de39e    none
 
- For every pvid that has a different hdisk number, execute the following:
 rmdev -dl hdiskX
 
-  To associate the original hdisk numbers with the disks based on their pvid,
execute:
 mkdev -c disk -l hdiskX -t ???type??? -s scsi -p scsiX -w X,0
 
-  Reimport all the datavgs by executing commands of the following form:
 importvg -y datavg_name one_hdisk_in_the_group
 
 
-  Execute mount -a to mount all datavg filesystems. Please ignore
error messages related to filesystems that are already mounted. Use df
to verify the presence of the filesystems. 
How to Renumber datavg hdisk#s After a mksysb Restore:   ITEM: FAX
Dated: 2001/01/22~00:00 Category: anz
This HTML file was generated 2001/03/08~16:06:01
Comments or suggestions?
Contact us