1821470 Members
2892 Online
109633 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
Mel Burslan
Honored Contributor

Re: lv group missing

Looks like the power outage took your disk drive with it. Have the hardware checked by an HP CE. Sometimes, even a disk shows up fine on ioscan output, it may have some problems.

for a quick (maybe not so quick but quicker than waiting for the HP CE probably) and dirty check, you can run :

dd if=/dev/dsk/c0t5d0 of=/dev/null

and see if this bums out somewhere before completing. If it succesfully completes, you should see something like that :

4864+0 records in
4864+0 records out

4864 number is replaced with a much higher one depending on the sizo of your disk drive. Large drives are known to take hours to complete this operation. Be forewarned. Ctrl-c breaks you out of it without any harm, if you want to.

________________________________
UNIX because I majored in cryptology...
A. Clay Stephenson
Acclaimed Contributor

Re: lv group missing

Almost certainly you have a dead drive.
If it ain't broke, I can fix that.
generic_1
Respected Contributor

Re: lv group missing

It may be possible the disk is bad. Does cstm show any errors on the disk. Does any of the indicator lights on the disk show signs of a bad disk? If do eventually get it back you might want to test it with a dd if=your disk device and of=/dev/null. A power failure can definitely be hard on hardware.
Helen French
Honored Contributor

Re: lv group missing

As I pointed out originally, you need to make sure that you have a working drive by checking it's hardware status first. Use 'dd' or 'stm' commands to check disk.

If disk is bad, you need to replace it with a new one and continue with 'vgcfgrestore' command. Once VG information is restored, you can mount the file systems (after formatting with newfs) and then restore data.
Life is a promise, fulfill it!
Robert S. Jackson
Occasional Advisor

Re: lv group missing

looks like a dead drive...
# dd if=/dev/rdsk/c0t5d0 of=/dev/null
dd read error: Invalid argument
0+0 records in
0+0 records out

# diskinfo -v /dev/rdsk/c0t5d0
SCSI describe of /dev/rdsk/c0t5d0:
vendor: SEAGATE
product id: ST39173N
type: direct access
size: 0 Kbytes
bytes per sector: 0
rev level: HP05
blocks per disk: 0
ISO version: 0
ECMA version: 0
ANSI version: 2
removable media: no
response format: 2
(Additional inquiry bytes: (32)20 (33)20 ...
Sundar_7
Honored Contributor

Re: lv group missing


I believe the drive has gone bad. What is the ioscan status for the drive ?
Learn What to do ,How to do and more importantly When to do ?
Robert S. Jackson
Occasional Advisor

Re: lv group missing

Here are the ioscan results...

# ioscan -C disk -fn
Class I H/W Path Driver S/W State H/W Type Description
=====================================================================
disk 3 8/16/5.1.0 sdisk CLAIMED DEVICE SEAGATE ST34573W
/dev/dsk/c0t1d0 /dev/rdsk/c0t1d0
disk 0 8/16/5.2.0 sdisk CLAIMED DEVICE TOSHIBA CD-ROM XM-5701TA
/dev/dsk/c0t2d0 /dev/rdsk/c0t2d0
disk 1 8/16/5.5.0 sdisk CLAIMED DEVICE SEAGATE ST39173N
/dev/dsk/c0t5d0 /dev/rdsk/c0t5d0
disk 2 8/16/5.6.0 sdisk CLAIMED DEVICE SEAGATE ST39173N
/dev/dsk/c0t6d0 /dev/rdsk/c0t6d0
#
A. Clay Stephenson
Acclaimed Contributor

Re: lv group missing

Repeat your dd command:
dd if=/dev/rdsk/c0t5d0 bs=64k of=/dev/null

If it fails again that is a very strong indication that the disk is bad.
If it ain't broke, I can fix that.
Mel Burslan
Honored Contributor

Re: lv group missing

Robert,

dd takes the block device as if not the raw device. repeat your command with /dsk/ instead of /rdsk/.

if that one also returns 0+0 bytes, then you can be sure that there is something wrong with the drive.
________________________________
UNIX because I majored in cryptology...
Mel Burslan
Honored Contributor

Re: lv group missing

sorry I stand corrected, rdsk also works fine if the drive is good. this is sounding more and more like a bad hardware.
________________________________
UNIX because I majored in cryptology...
Robert S. Jackson
Occasional Advisor

Re: lv group missing

same result...

# dd if=/dev/rdsk/c0t5d0 bs=64k of=/dev/null
dd read error: Invalid argument
0+0 records in
0+0 records out
Bharat Katkar
Honored Contributor

Re: lv group missing

Robert,
It is definitely a Bad Drive. I don't see any option other than replacing the one with new HDD
You need to know a lot to actually know how little you know