Solved

vgcreate overwrite recovery

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
netstat -a in AIX unix 8 59
Access Required to Read Linux Security Settings and User Permissions 13 156
Unix Question 19 55
How to check the PVU´s on AIX TSM servers? 3 131
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…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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.

738 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