1755704 Members
4118 Online
108837 Solutions
New Discussion юеВ

lv group missing

 
SOLVED
Go to solution
Robert S. Jackson
Occasional Advisor

lv group missing

Due to a power outage, one of the disks on my system is now shown as unused. This disk contained a LV volume (vg01) which is now inaccessable. I'd like to try to reconfigure this drive/lv, hopefully restoring to the original configuration (and data). I did save the lv config previously so I have that to reference. Can someone point me in the right direction so I don't screw this up. It's been a few years since I messed with LV configuration. Thanks!
21 REPLIES 21
A. Clay Stephenson
Acclaimed Contributor

Re: lv group missing

First do an ioscan -C disk -fn to make sure that you have a CLAIMED device and the the device nodes (e.g. /dev/dsk/c2t5d0) exist for it. If the device nodes do not exist then do an insf to create them.

Next do a strings /etc/lvmtab to see if the disk is still in /etc/lvmtab.

If so then you should vgexport the VG.

Next,
cd to /dev
mkdir vg01
cd vg01
mknod group c 64 0x010000

But make certain that the minor device number 0x010000 is not is use by any other VG. If it is in use then choose another number.

vgimport -v /dev/vg01 /dev/dsk/c2t5d0

vgchange -y y /dev/vg01

Now you should be able to mount your filesystem on /dev/vg01/lvol1 although an fsck will probably be required first.

Man vgexport, vgimport, vgchange for details.
If it ain't broke, I can fix that.
Helen French
Honored Contributor
Solution

Re: lv group missing

Couple of points:

1) Check the disk for hardware errors (dd, stm)

2) If the disk is okay, check if the LVM headers exists on the disk (vgscan, pvdisplay, vgdisplay)and in system (/etc/lvmtab). If yes, then you can vgimport the disk and see if you got the data in it.

3) If not, do a 'vgcfgrestore' to this disk using vg01 lvmconf file from /etc (if that's the right copy). Then mount the file systems and restore the data.
Life is a promise, fulfill it!
Sundar_7
Honored Contributor

Re: lv group missing


SAM says the disk is unused ?. Then probably your LVM headers are corrupted. How about a vgcfgrestore ?

# echo "0x2008?4D" | adb /dev/dsk/

Execute the above command post the output
The output is of format

2008:

hostID - uname -i

If the output doesnt make sense to you then you can try vgcfgrestore and hope the data is still intact

# vgcfgrestore -n vg01 /dev/rdsk/

Good luck :)
Learn What to do ,How to do and more importantly When to do ?
Robert S. Jackson
Occasional Advisor

Re: lv group missing

I've reviewed the suggestions along with the manuals and I think I getting close to understanding what needs done. I've attached some diagnosis information and notes. Thanks in Advance for the assistance!
Todd McDaniel_1
Honored Contributor

Re: lv group missing

if you did a vgcfgrestore vgXX shouldnt that work? to restore the headers?

Unix, the other white meat.
RAC_1
Honored Contributor

Re: lv group missing

vgcfgrestore -n /dev/vg01 -l

To check what is there in /etc/lvmconf/vg01.conf

Then

vgcfgrestore -n /dev/vg01 /dev/rdsk/c0t5d0


Anil
There is no substitute to HARDWORK
Robert S. Jackson
Occasional Advisor

Re: lv group missing

ran this...
# vgcfgrestore -n /dev/vg01 /dev/rdsk/c0t5d0
vgcfgrestore: IO error on Physical Volume device /dev/rdsk/c0t5d0

Any suggestions?
Todd McDaniel_1
Honored Contributor

Re: lv group missing

Restore from another disk hopefully from a mirror device...


Restore LVM configuration information stored for /dev/rdsk/c0t7d0 in
default configuration file /etc/lvmconf/vg01.conf to physical volume
/dev/rdsk/c0t6d0:

vgcfgrestore -n /dev/vg01 -o /dev/rdsk/c0t7d0 /dev/rdsk/c0t6d0
Unix, the other white meat.
RAC_1
Honored Contributor

Re: lv group missing

What following command gives??

diskinfo -v /dev/rdsk/c0t5d0
dd if=/dev/rdsk/c0t5d0 of=/dev/null

Anil
There is no substitute to HARDWORK