Solved

vgcreate overwrite recovery

Posted on 2006-11-12
6
420 Views
Last Modified: 2011-10-03
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
0
Comment
Question by:shreeram44
6 Comments
 
LVL 20

Expert Comment

by:tfewster
ID: 17928488
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.
0
 
LVL 6

Expert Comment

by:JJSmith
ID: 17942400

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

0
 

Author Comment

by:shreeram44
ID: 18021241
pvcreate with -f option overwrites forcefully any previously created volume groups. We used vgcfgrestore command to restore back previous volume group information.
0
 
LVL 20

Expert Comment

by:tfewster
ID: 18022220
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 http://www.experts-exchange.com/Community_Support/ with the link to this question
0
 

Accepted Solution

by:
AnnieMod earned 0 total points
ID: 19389671
PAQed with points refunded (500)

AnnieMod
Cleanup Admin
0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question