Link to home
Start Free TrialLog in
Avatar of shreeram44
shreeram44

asked on

vgcreate overwrite recovery

Hi,

By mistake we created new volume group using one production disk. What is the best way to recover the production volume group? HPUX version is 11.23 U i64

Here is what we did using already in use disk:

pvcreate useddisk
vgcreate useddisk
lvcreate newvg

reboot system.

Thanks,

Sreeram
Avatar of tfewster
tfewster
Flag of United Kingdom of Great Britain and Northern Ireland image

The description of your setup is not very clear - Is this a single system using raw devices for data (e.g. for a database) or a disk visible to more that one server (e.g. SAN attached)?

The general answer is:
- Remove the LVM configuration from the disk on the "test" system, e.g. lvremove /dev/newvg/<lvmnames>, then destroy the volume group with vgremove to free up the disk.  If the disk has been overwritten by another system/process, the LVM info may be corrupt and you will need to "force" it (mv /etc/lvmtab /etc/lvmtab.bak; vgscan -v)

- Recover the original data on the disk; This depends on how it was used - Please post more information.

I'm afraid you explaination is a little unclear.

pvcreate will not overwrite a disk that already belongs to a volume group ( at least not unless it is puposely forced ).

more information on your setup is required.

For all volume groups try:

vgdisplay <volumgroupname>

ls -ld /dev/<volumegroupname>/*

and then post the results

Cheers
JJ

Avatar of shreeram44
shreeram44

ASKER

pvcreate with -f option overwrites forcefully any previously created volume groups. We used vgcfgrestore command to restore back previous volume group information.
As an additional safety measure, even `pvcreate -f` will not overwrite the LVM headers on a disk that is already in a volume group on the "local" system.

So it sounds like this disk was visible to both your Production and Test servers (I assume it was published from an EMC CX700, from your other question).

I suggest you ask Community Support to PAQ this question and restore your points - Post a 0-point question in https://www.experts-exchange.com/Community_Support/ with the link to this question
ASKER CERTIFIED SOLUTION
Avatar of AnnieMod
AnnieMod
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial