-   Linux - Newbie (
-   -   how to recover deleted LVM in linux ! (

bala.linuxtech 01-02-2017 09:18 AM

how to recover deleted LVM in linux !

Deleted lvm using #lvremove /dev/mapper/vg00-lv01

Could you please help me to restore this deleted lvm.:mad:

Thanks +


rknichols 01-02-2017 11:33 AM

It's actually pretty straightforward. You just need to run vgcfgrestore with the archived configuration file. The previous configuration should be the most recent file of /etc/lvm/archive/vg00_*.vg . Those are ASCII text files, and the one you want will have a line
description = "Created *before* executing '/sbin/lvremove /dev/mapper/vg00-lv01'"
You can run

vgcfgrestore -f /etc/lvm/archive/{file_name} vg00
to restore that configuration.

bala.linuxtech 01-02-2017 01:35 PM

Restored LV !:)

All times are GMT -5. The time now is 11:23 PM.