How to recover deleted LVM in linux

0 votes

Hi Guys,

I have deleted my LVM. But I need to recover my LVM because I have some important data on it. How can I do that?

Jul 9, 2020 in Linux Administration by akhtar
• 38,260 points
1,861 views

1 answer to this question.

0 votes

Hi@akhtar,

Using the command vgcfgrestore we can recover deleted LVM partitions. Linux keeps the backup copies of lvm configuration in the /etc/lvm/archive directory. You need to follow the below steps.

  •  First, find the backed-up configurations of Volume Group using the below commands.
$ vgcfgrestore --list < Volume-Group-Name >
$ vgcfgrestore --list vg1
  • Now recover the LVM partition using vgcfgrestore and an archive file.
$ vgcfgrestore -f /etc/lvm/archive/<file-name> <Volume-Group-Name>
$ vgcfgrestore -f /etc/lvm/archive/vg1_00002-692643489.vg vg1

    You will see the output like 'Restored volume group vg1'. Now we can mount lvm partition and check whether data is there or not.

    answered Jul 9, 2020 by MD
    • 95,460 points

    Related Questions In Linux Administration

    –1 vote
    1 answer

    How to get octal file permission in linux?

    You can use this: stat -c "%a %n" ...READ MORE

    answered Jan 3, 2019 in Linux Administration by Omkar
    • 69,220 points
    2,622 views
    0 votes
    1 answer

    How to create a symlink in Linux?

    To create a symbolic link, you can ...READ MORE

    answered Feb 1, 2019 in Linux Administration by Omkar
    • 69,220 points
    1,219 views
    0 votes
    1 answer

    How to find path of software installed in Linux?

    There are multiple ways to find the ...READ MORE

    answered May 20, 2019 in Linux Administration by Rishi
    8,418 views
    0 votes
    1 answer

    How to convert DOS line endings to Linux line endings in vim?

    try this; :%s/\r/\r/g READ MORE

    answered May 24, 2019 in Linux Administration by Upasana
    • 8,620 points
    1,026 views
    0 votes
    1 answer
    0 votes
    1 answer

    What is the difference between ctrl z and ctrl c in command line?

    Hi@akhtar, Generally, these two commands are used to ...READ MORE

    answered Feb 24, 2020 in Linux Administration by MD
    • 95,460 points
    47,606 views
    0 votes
    1 answer

    not able to run netstat-tnlp in Linux.

    Hi@akhtar, In Linux system netstat-tnlp command comes from ...READ MORE

    answered Apr 16, 2020 in Linux Administration by MD
    • 95,460 points
    1,123 views
    0 votes
    1 answer

    How to break root password in CentOS/RHEL 8?

    Hi@akhtar, Reboot the system and interrupt the boot ...READ MORE

    answered May 11, 2020 in Linux Administration by MD
    • 95,460 points
    1,945 views
    0 votes
    1 answer

    How to create one new partition in my hard disk in Linux?

    Hi@akhtar, To create new partition you can follow ...READ MORE

    answered Apr 7, 2020 in Linux Administration by MD
    • 95,460 points
    1,197 views
    0 votes
    1 answer

    How to install httpd web server in Linux?

    Hi@akhtar, To install httpd web server in CentOS/RHEL ...READ MORE

    answered Apr 21, 2020 in Linux Administration by MD
    • 95,460 points
    834 views
    webinar REGISTER FOR FREE WEBINAR X
    REGISTER NOW
    webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP