Centos – How to get Mondorescue to work with LVM2 (CentOS 6.4)

centosdisaster-recoverylvm

I'm trying to make an emergency recovery disk with Mondorescue to:

  1. Restore my server in case of hardware (or severe software) failure.
  2. Make an "identical" server setup for debugging and staging. My original image was lost when my laptop died, during setting up this server. Then I had to do it again from scratch in a hurry..

I'm running CentOS 6.4 and installed the system and data storage on top of a volume group to be able to make snapshots. The VG was made with LVM2 and I'm not exactly familiar with the details but from what I've gathered LVM2 uses /dev/mapper as a layer between the block devices and the OS that can be used for disk encryption etc. (or something like that..).

Mondorescue does not like LVM2. After successfully making a restore image I can't recover my system because it can't restore the VG's. The Mondorescue FAQ tells me:

Now if you encounter a problem with it, it might be due to the fact that older versions of mondorescue didn't support correctly the usage of /dev/mapper/vg*. So you needed to adapt your /etc/fstab in order to make mondorescue happy, as here:
Original /etc/fstab:

/dev/mapper/vg_system-lv_var /usr ext3 defaults 0 2
/dev/mapper/vg_system-lv_usr /var ext3 defaults 0 2

Modified /etc/fstab:

/dev/vg_system/lv_usr /usr ext3 defaults 0 2
/dev/vg_system/lv_var /var ext3 defaults 0 2

Source: http://trac.mondorescue.org/wiki/FAQ#Q6DoesmondorescuehandleLVM2

My questions are..

  • Is this safe to do on my production server or might it not reboot after this modification?
  • Does it matter if you reference to /dev/vg_xxx or to /dev/mapper/vg_xxx, will it work?
  • Or.. If I shouldn't / it doesn't work, does anyone know a working solution?

Thanks a lot!

Best Answer

The two device paths you give are equivalent, as far as Linux is concerned; they always point to the correct LV.

Related Topic