access data from a new disk was assigned another rootvg

Hello,

I try to access to data after connect a new disk (hdisk1) to a AIX 7.1 system
This new disk was assigned to a rootvg from another AIX 6.1 system.

It seem not assigned to any vg

but if I tried to assigned hdisk1 to rootvg i get :

Data seem to be always here ... ouf :wink:

I don't want to loose data, but how can I access them in this new system ?

Thanks

Yes: it is not assigned to a VG in this system. The information about which disk belongs to which volume group is stored on the disk (the LVCB, etc.) but maintained in the ODM. Operations like importvg read the information stored on the disk to (re-)build the ODM information. synclvodm try to solve conflicts in the case of these two data sets becoming unsynchronized.

Do an importvg without the "-L" (learning) option. naming conflicts will be automatically resolved. You can tell from a PVID being shown in the output of lspv that the disk has to have been part of a VG already. This PVID is also stored on the disk and - by importing the VG - copied into the ODM.

Be glad that this won't work: by assigning a PV to a VG the volume is reformatted. This - if successful - would have erased all the data you wanted to import.

A further hint: after importing the VG check /etc/filesystems . Mount points are part of the FS properties and accordingly this file (which is also a representation of ODM information) is updated. Still, you probably might not want the mount points automatically assigned by the system to resolve the conflicts. Therefore, before the mount -a do override the mount points there.

I hope this helps.

bakunin

1 Like

Thanks Bakunin,

When tried importvg i get an error about VGDA, could you help me ?

importvg hdisk1
0516-1939 : PV identifier not found in VGDA.
0516-780 importvg: Unable to import volume group from hdisk1.

hmm, the VGDA (volume group descriptor area) is also part of the aforementioned information on the disk, which is copied to and maintained in the ODM. Something seems to have gone wrong. Without exactly knowing the details it is hard to advise specifically, though. The following is as generic as possible.

First, make sure you get your ODM clean: disconnect the disk, run cfgmgr and (out of pure paranoia) a synclvodm . You can also reboot the system instead, if this is possible.

Reconnect the disk, run cfgmgr again and then try a recreatevg . If this doesn't work probably some accounting information on the disk is damaged. To rebuild a a damaged VGDA is possible in principle (there are two copies of it on every PV in the VG, so the chance of finding one working copy and distributing this is intact), but is not an easy task. There are several how-tos about this circulating in the net. It is probably easier to restore the data in question from some backup, though.

I hope this helps.

bakunin

1 Like

Thanks a lot

It's a success :slight_smile:

After :

  • disconnect disk
  • cfgmr
  • importvg (same error with vgid)
  • recreatevg -y newvg hdisk1 (ok)

And data is accessible !

Thanks again

Voran