home | list info | list archive | date index | thread index

Re: [OCLUG-Tech] Recovering LVM information - no /etc/lvm folder available

In case you still have a problem I can at least give you some hints.

I haven't been in this situation that I lost a partition but I have done
something similar what I think you need several times.

If I understand your setup correct you have 1 volume group spanning 3
disks. After replacing Disk1 you now have LVM1 & LVM2 left while LVM3 is
gone.
I also hope that the fresh install created a volume group with a name
different then what you had before. For the sake of instructions I call
your old vg vg-old.
If so, then a "vgscan" should complain about incomplete volume group
vg-old. If so you should be able to do something like
 vgreduce --removemissing vg-old
And then be back in business.
Without testing I can't say if it works or exactly what happens with the
lvs that had parts on LVM3, my guess is that they are lost.

Normally you don't need /etc/lvm, {pv,vg,lv}scan does a good job of
recreating it.

If you ended up with the same volume group name on the reinstall you
need to 
 remove the extra disks
 boot single user mode/rescue cd
 vgrename /dev/vg-old /dev/vg2
 sed -i 's~/dev/vg-old/~/dev/vg2~g' /etc/fstab
 shutdown
 add back the disk
 reboot to normal mode

/ps


On Mon, 2008-02-04 at 12:52 +0900, Maximo Ramos wrote:
> Hello there!!
> 
> One of my hard disks just died, and it messed up my LVM setup.
> 
> My LVM Setup (LVM partitions: 1, 2 and 3):
> 
> Disk 1 = root particion and LVM 3
> Disk 2 = LVM 1
> Disk 3 = LVM 2
> 
> Disk 1 is dead, and with it, the /etc/lvm folder with all the
> information regarding my LVM setup. My research about recovering LVM
> setups involves having access to the /etc/lvm folder and hacking it,
> which is not my case.
> 
> I just installed a new hard disk (new Disk 1) with a fresh install of
> Fedora. Is there any way to -at least- recover the information in my
> LVM setup (Disk 2 and 3), always taking into account that I don't have
> the original /etc/lvm folder, not even in backups.
> 
> Thanks for your attention.
> 
> Maximo
> _______________________________________________
> Linux mailing list
> Linux [ at ] lists [ dot ] oclug [ dot ] on [ dot ] ca
> http://oclug.on.ca/mailman/listinfo/linux