Image

Imageamaena wrote in Imagelinux

LVM2

Sigh :P well my lvm-fu is weak with v2.

I have the following layout:

vg00 mounted on / using pv /dev/hda2
vg00-home mounted on /home used to be using /dev/hdd2 since the hardware change its now hdb2

I moved around my hardware in my box, and now instead of being hdd2, its hdb2, and lvm is complaining whenever I try and mount it that its not a valid block device.

Basically what I need to know is how to make lvm realize that hdb2 is hdd2. Typically what I would do is vgcfgrestore -n vgname -o /dev/hdd2 /dev/hdb2 and it would throw the metadata from hdd2 onto hdb2. But lvm2 is eluding me and I am not sure how to go about doing this.

I imagine I could recreate a metaheader file with the uuid for the pv and the lv id and vgid and then possibly restore it that way? But I am a bit gun shy about losing data as well.

Any one ever done anything like this? Any ideas? The kicker is that in pvdisplay and vgscan no errors come up, its only when I mount :)