LVM Cloning using Partimage
I'm trying to clone an LVM partition using partimage.
The specs say this should work and even the partimage author, Franck, confirmed it here (edit: can't post the link cuz of 15 posts requirement...just google "bookweevil lvm" lol don't ask)
Here's what I've done:
1) Took an empty 1.5 TB HDD and 'dd' zerofilled ~30GB to ensure a good chunk of the HDD is cleared of any data
2) Used fdisk to create an LVM partition on the HDD
3) Created a logical volume (LV) on the partition via pvcreate, vgcreate, and lvcreate (in that order)
4) I mount the LV and copy some random files into it.
5) ...LOL I just figured out what I did wrong while typing this out!!!
6) ...OK back to what I originally did. I then ran partimage via the command line to save the LVM partition with the newly copied files as dictated in the link above.
7) The error was "Can't read bitmap block 0 from image".
8) SOLUTION: Turns out I had kept the LVM partition mounted. Partimage cannot save/restore mounted partitions! So once I unmounted the LVM partition and ran partimage from the command line, it worked like a charm.
Anyway, hope this helps someone in the future!