LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to recover deleted LVM in linux ! (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-recover-deleted-lvm-in-linux-4175596618/)

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

how to recover deleted LVM in linux !
 
Team

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

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

Thanks +

Regards
Bala

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
Code:

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

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

Thanks
 
Restored LV !:)


All times are GMT -5. The time now is 04:20 PM.