Clonezilla not restoring lvms from full disk image

Help
2014-08-08
2014-09-19
  • Will McCown
    Will McCown
    2014-08-08

    I'm using clonezilla live 2.2.3-25-i486 to make an image of a Centos 6.5 installation.

    The disk has two partitions, a small boot partition and a second partition that his handled by lvm and has a single volume group with three logical volumes (which is the standard Centos layout).

    I boot clonezilla live and with the default options have it create an image on a Samba mounted partition. That seems to run fine, and clonezilla creates partclone archives for the boot partition as well as each of the lv's and also seems to save everything you need to know about the volume group.

    However when attempting to restore the entire disk from the image, what happens is that clonezilla creates and restores the boot partition, then creates the volume group, creates all three logical volumes, and then quits as though it is "done". (ie without restoring any of the data in the logical volumes)

    I have found that in this state if I escape to the command prompt, type the command

    vgchange -ay

    to make the volume group visible to the kernel, and then use this :

    cat <image>.gz.a* | gunzip -c | partclone.restore -d -s - -o /dev/<vg>/<lv>

    I can successfully restore the logical volumes one at a time.

    Much web searching turned up this discussion on this same forum:

    http://ehc.ac/p/clonezilla/discussion/Clonezilla_live/thread/9b101b47/

    which the poster appeared to have the same problem without any resolution. (And also were I got the solution posted above)

    So at this point I believe that this is a bug in clonezilla.

     
    Last edit: Will McCown 2014-08-08
  • Will McCown
    Will McCown
    2014-08-09

    Correction to the above... I discovered (by trying a restore to a brand new disk) that
    clonezilla does NOT create the lvms at all. The lvms on the disk I was trying to restore to were present from a previous install.

     
  • Steven Shiau
    Steven Shiau
    2014-08-17

    The LV must exist on partition(s), not on disk. Is this the case you have?
    If so, so far Clonezilla can not handle LVM without partition. You have to manually process that.

    Steven.

     
  • Will McCown
    Will McCown
    2014-09-07

    I'm not sure I understand the distinction your are making, but the disk has two partitions, a small boot partition and a second partition, the rest of the disk, under the control of the LVM. On that second partition there are three logical volumes, (the usual linux root, swap and home).

     
  • Steven Shiau
    Steven Shiau
    2014-09-19

    So when LVM was created during restoring, did you see any error messages?

    Steven.