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 in Linux Administration by akhtar
• 17,870 points
47 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 by MD
    • 41,340 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,040 points
    310 views
    0 votes
    1 answer

    How to create a symlink in Linux?

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

    answered Jan 31, 2019 in Linux Administration by Omkar
    • 69,040 points
    144 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 19, 2019 in Linux Administration by Rishi
    1,139 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,590 points
    121 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 in Linux Administration by MD
    • 41,340 points
    750 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 in Linux Administration by MD
    • 41,340 points
    43 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 in Linux Administration by MD
    • 41,340 points
    65 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 in Linux Administration by MD
    • 41,340 points
    50 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 in Linux Administration by MD
    • 41,340 points
    38 views