1832818 Members
2981 Online
110045 Solutions
New Discussion

LVM

 
Kurt Wagner
Occasional Contributor

LVM

I have one volume group/logical volume that spans three individual, external drives. One of the disks has failed and I have removed it
from the system. I cannot seem to remove the drive using vgreduce. The partitions in the lv state that they are current however the device path (/dev/dsk/c1t3d0) shows up as "??"
using lv display. How can I remove the disk from the vg so I can add a new one and restore some of the data back? It looks like I may have to rebuild the entire volume group/logical volume.

Thanks in advance,

Kurt
5 REPLIES 5
Alan Riggs
Honored Contributor

Re: LVM

A couple of options:

vgreduce -f

Put in the new disk. vgcfgrestore the LVM header. Reduce or resync as desired.
Patrick Wallek
Honored Contributor

Re: LVM

The first thing I would try is a vgcfgrestore.

# vgcfgrestore -n vg?? /dev/rdsk/c?t?d?

From there the disk should be part of the VG again and you should be able to restore your data as needed.
Kurt Wagner
Occasional Contributor

Re: LVM

So all I need to do is add a new disk to the system and do a vgcfgrestore??? When trying to do a "vgreduce -f" I get the following error message:
sroot@smhp1:/->vgreduce -f data1vg
vgreduce: Couldn't query physical volume "/dev/dsk/c1t3d0":
The specified path does not correspond to physical volume attached to
this volume group

The bad disk is already physically disconnected from the system.

Thanks,
Kurt
Patrick Wallek
Honored Contributor

Re: LVM

Yes, go ahead and put the replacement disk in, then do the vgcfgrestore. That will probably be the easiest and should work without a problem.
Sridhar Bhaskarla
Honored Contributor

Re: LVM

And after doing a vgcfgrestore, do a vgchange -a y on the volume group to get rid of the error messages.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try