Recover deleted LVM partitions in CentOS/RHEL/Fedora

Share this article with your friends

Overview :

While working on linux production boxes,some times system admin mistakenly delete LVM partitions. Using the command ‘vgcfgrestore‘ we can recover deleted LVM partitions. Linux keeps the backup copies of lvm configuration  in the/etc/lvm/archive directory. In my scenario I have deleted 10GB lvm partition, follow the below steps to recover the LVM partition :

Step:1 First find the backed up configurations of Volume Group (my-vg)

Synatx :

 # vgcfgrestore --list   < Volume-Group-Name >

 # vgcfgrestore --list my-vg


As you can see in the above example correct configuration are backed up , in my case “” is correct file through which I will recover my lvm partitions.

Step:2 Now recover the LVM partition using vgcfgrestore and archive file


# vgcfgrestore -f /etc/lvm/archive/<file-name> <Voulme-Group-Name>
# vgcfgrestore -f /etc/lvm/archive/  my-vg

Output would be : ‘Restored volume group my-vg’

Now we can mount lvm partition and check whether data is there or not.

Free Download Linux e-Books

You may also like...

1 Response

  1. Salil Kothadia says:

    Try “testdisk”.
    sudo dnf install testdisk

Leave a Reply

Your email address will not be published. Required fields are marked *