0

I have a volumegroup which consists of three harddisks and several LVs (var,tmp,root,swap). One of the harddisks crashed recently, but i urgently need some data from LV var. So, after rebooting the machine without the crashed disk, i run

vgchange -D -a y volGroup0 

in order to activate the volumegroup and mount the logical volumes. However, the command returns

Cannot activate XXX. All segments are missing
...
0 logical volume(s) in volume group "volGroup0" now active.

What does that mean? Is all data lost? What could be the next step in order to rescue some data?

1
  • Were you using dm-RAID at all, or just spanning multiple PVs with volGroup0?
    – John
    Jun 18, 2013 at 13:35

1 Answer 1

0

In order to recover the data (note that any data on the failed disk is lost), you'll need to replace the failed disk with a new one and rebuild the LVM. You won't be able to mount the group otherwise.

To do this, you'll need to know the failed disk's UUID by using pvscan. It'll say that a UUID is missing and this is what you need.

Then, when you have the new disk in the server, type: pvcreate --uuid uidhere /dev/sdc where "uidhere" is the UUID you got from pvscan and /dev/sdc is the new disk device.

Then, type vgcfgrestore volgroupname where volgroupname is the name given to the volume group (so vgcfgrestore volGroup0).

Then, type vgscan to recover the volume group. And finally, vgchange -ay volGroup0 to activate the group. You'll likely need to e2fsck the affected partition if it's unreadable.

Reference: http://www.novell.com/coolsolutions/appnote/19386.html#DiskPermanentlyRemoved

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .