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
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
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
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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.