Solved

vgcreate overwrite recovery

Posted on 2006-11-12
6
393 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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…

708 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now