Solved

vgcreate overwrite recovery

Posted on 2006-11-12
6
435 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 21

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 21

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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
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…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
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.

717 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