Restore_Deleted_Logical_Volume

Restore_Deleted_Logical_Volume

Restore deleted Logical Volume.

In this example, I have below configuration on the Linux box.

OS:- Linux rhel7 3.10.0-229.el7.x86_64

LVM details:-

  •  lv0 on vg0
  •  lv1 on vg1
For more details, you can use “lvs –ao +devices”.
For testing purpose I mounted “/dev/vg0/lv0” under “/data” directory and create on file with some content.

Now I am going to create a scenario for practical means deleting one Logical Volume “lv0” and after that try to access or mount.

For each and every action on LVM, create a backup of the configuration file. Using these backups we can restore the configuration of the volume group. Is data also… depend on the situation.

Now going to restore from backup.

For that, we need to identify which backup file is used to restore Volume Group. For that, we use below process.

Now restore vg configuration with the backup file.

After restoring the lv in “inactive” state. We can see using “lvscan” command. To activate use “lvchange –ay /dev/vg0/lv0”.

Now you can see everything is OK.

Leave a Reply

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