Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

URGENT! Recreating a volume group.

Status
Not open for further replies.

vickersdc

IS-IT--Management
May 15, 2001
119
GB
Does anyone have an idea on how to create a volume group. Following an exportvg, synclvodm was run so the definition of the volume group was lost, but the disks are still part of a volume group (as specified by the VGDA that resides on those disks). There are three disks in this (ex-)VG and I need to get them mounted.

I don't want to just create a VG, as I may loose the data??

The lspv command comes back with &quot;Physical volume <PV_ID> is not assigned to a volume group&quot;.

From using the lqueryvg and lquerypv commands I've got information on the VGID that exists in the VGDAs on the disks and LV info, etc.

Back in those halcyon days on AIX v3.2.5 I can remember playing around with the ODM to get round such a problem, but as I can barely remember last week, I've no chance of recalling something from 4-5 years ago X-)

How do I recreate a VG and assign it a known VGID (ie the one from the VGDAs) and tget it all working.

Here's hoping...
 
Aha, what a muppet I am ;-)

It just struck me that the importvg command does it all for me!!!!!!!!!

Yours stupidly.
 
Actually... how do you get info out of the ODM about volume group config..surely it's not all on the VGDA/VGSA is it..?
 
Once again I came to the conclusion that you can (sometimes). As long as the disks are still available you can get the information - but crucially, the ODM does not appear to maintain any mapping of LV to PV information (probably because that is in the VGDA on the disk).

All very well, but if the disks are not currently mounted the ODM cannot (seemingly) report on any mapping (held in CuAt) of PV's in VG.

Does this seem correct - I guess as long as the ODM knows that a VG exists, and some hdisks exist it can work the rest out from the VGDA area when cfgmgr runs?

X-)
 
On every disk in a volume group, there exists an area called the Volume Group
Descriptor Area (VGDA). This space is what allows the user to take a volume
group to another AIX system and importvg the volume group into another AIX
system. The VGDA contains the names of disks that make up the volume group,
their physical sizes, partition mapping, logical volumes that exist in the volume
group, and other pertinent LVM management information

During an importvg, the LVM command will scan the LVCBs of all defined logical
volumes in a volume group for information concerning the logical volumes.
If the LVCB is deleted, the imported volume group will still define the
logical volume to the new AIX system that is accessing this volume group.
The user can still access the raw logical volume.
Journaled file system information is lost and the logical volume and its
associated mount point will not be imported into the new AIX system.
The user must create new mount points. The availability of previous data stored
in the file system is NOT assured.

The exportvg command removes the definition of the volume group specified by the
VolumeGroup parameter from the system. Since all system knowledge of the volume
group and its contents are removed, an exported volume group can no longer be accessed. The exportvg command does not modify any user data in the volume
group.


The importvg command makes the previously exported volume group known to the
system. The PhysicalVolume parameter specifies only one physical volume to identify
the volume group; any remaining physical volumes (those belonging to the same
volume group) are found by the importvg command and included in the import. An
imported volume group is automatically varied unless the volume group is
Concurrent Capable. You must use the varyonvg command to activate Concurrent
Capable volume groups before you access them.

When a volume group with file systems is imported, the /etc/filesystems file is
updated with values for the new logical volumes and mount points. After importing
the volume group and activating it with the varyonvg command,
you must run the fsck command before the file systems can be mounted.
However, the mount point information would be missing from the LVCB (logical
volume control block) if it is longer than 128 characters. In this case, the
importvg command will not be able to update the /etc/filesystems file with
the stanza for the newly imported logical volume. You should manually edit
the /etc/filesystems file to add a new stanza for this logical volume.


Even when I get those errors....like you had....I do an exportvg again and then an importvg....sometimes more than once....and see if it clears......It usually does......
Not sure if the above helped you?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top