Skip to contentSkip to conversation

lvm - problem replacing failed disk

linux-lvm Steven Mosimann 2 participants 2 messages Jun 15, 2006 – Jun 16, 2006

lore
Share & tools
lore
#0 lore raw

Greetings,

I've been running lvm2 on a redhat system for the past 6 months (happily). As happens, one of the three hard disks used in my volume group has failed. There is some data in the volume group I'd like to retrieve if possible.

I've been reading HOWTOs and various other posts and tried the following:

(1) Replaced the failed disk with one of the same size
(2) Used pvcreate to make the same physical volumes on the new disk that were present on the failed disk. Example of the actual command I used was:
pvcreate --uuid xxxxx /dev/sdb1
where xxxxx was the pv uuid from pvdisplay
(3) Used vgchange -a y -P to activate the volume group

At this point I get an error saying the metadata is inconsistent and a volume group uuid is not found.

Any advice on how to proceed would be appreciated.

Thanks, Steve
----------------

PS. Attempts to mount the Logical volume of interest fail with a bad superblock message. I think this is expected as the first segment of the logical volume was on the failed disk.

#1 lore raw
Quoted 6 lines · Steven Mosimann

(1) Replaced the failed disk with one of the same size
(2) Used pvcreate to make the same physical volumes on the new disk that were present on the failed disk. Example of the actual command I used was:
pvcreate --uuid xxxxx /dev/sdb1
where xxxxx was the pv uuid from pvdisplay

Missing the --restorefile arg there (for safety - if it was originally created by lvm2 with default options it'll make no difference).

Missing a 'vgcfgrestore' step.

Quoted 1 line

(3) Used vgchange -a y -P to activate the volume group

No need for -P here. That's what you use if you *don't* do steps 1 and 2 etc.

Alasdair

Signature · 1 line
[email protected]