I have a Slackware amd64 server running kvm-qemu with 5 Windows XP guests.
The disk layout is as follows:
4 brand new SATA disks: 2x500GB and 2x1TB
Partitioning:
/dev/sda1 + /dev/sdb1 = /dev/md0 = /boot
/dev/sda2 + /dev/sdb2 = /dev/md1
/dev/sda3 + /dev/sdb3 = /dev/md2
/dev/sdc1 + /dev/sdd1 = /dev/md3
/dev/sdc2 + /dev/sdd2 = /dev/md4
LVM:
system-volgroup on /dev/md1 is for root, tmp, swap, usr, var and home Logical Volumes.
vm-volgroup across /dev/md2 + /dev/md3 is for virtual machines (four underlying disks)
/dev/md4 is mounted as /data, for samba shares and public data generally.
So far I have tried to backup as follows, with all methods failing:
Licensed copy of Terabyte Image for Linux - imaging proceeds to about 98% and then reports corruption.
Clonezilla - same thing, although I later read that Clonezilla doesn't support software RAID.
dd - I shut one of the virtual machines down, and then make a LVM snapshot as follows:
Code:
# lvcreate -s -n xpmachine1-snapshot -L 5G /dev/vm-volgroup/xpmachine1
I then back it up to a file with dd and gzip:
Code:
# dd if=/dev/vm-volgroup/xpmachine1-snapshot | gzip -c > /data/backup/xpmachine1.dd.gz
I then try to restore:
Code:
# dd if=/data/backup/xpmachine1.dd.gz | gzip -d | dd of=/dev/vm-volgroup/xpmachine1
However, I keep getting an error, that the data stream is corrupt. I have tried it without gzip, and I tried it with bzip2, and I get the same result.
The disks appear to be in fine condition. I am wondering if I need to shut all virtual machines down while creating the snapshot and then backing it up, in case some underlying RAID or LVM activity is corrupting the backup.
Perhaps I should boot the entire system from SystemRescueCD and backup the Virtual Machines that way?
Would appreciate some guidance. Thank you.