Page 1 of 1

Partimage and Raid1 linux system

Posted: Fri Jul 31, 2009 7:04 am
by patrick
Can someone provide a small tutorial (or reference to) for backing up a linux system installed over a software RAID1 config ?

I'm trying to backup such a config for several days without success. The idea is to clone several PC with the image of the first one stored on a NFS remote partition. My Linux is Opensuse 11.1 x86_64. Actualy grub is working but boot stops with "cannot find /dev/md0".
On the "cloned" box, /dev/md0 exists, in the same partition /dev/sda2 than the kernel, restored by partimage...

My backup session is:
boot with a live cdrom
start NFS and mount a remote partition for backup
dd if=/dev/sda of=/mnt/SYSTEME/OpenSuse11.1/mbr-sda count=1 bs=512
dd if=/dev/sdb of=/mnt/SYSTEME/OpenSuse11.1/mbr-sdb count=1 bs=512
sfdisk -d /dev/sda >/mnt/SYSTEME/OpenSuse11.1/sda-partitions.txt
sfdisk -d /dev/sdb >/mnt/SYSTEME/OpenSuse11.1/sdb-partitions.txt
partimage -o -z 1 -f 3 -d -b -V 1000 save /dev/sda2 \

My restore session is:
boot with a live cdrom
start NFS and mount the remote partition with the backup
dd if=/mnt/SYSTEME/OpenSuse11.1/mbr-sda of=/dev/sda
dd if=/mnt/SYSTEME/OpenSuse11.1/mbr-sdb of=/dev/sdb
sfdisk /dev/sda </mnt/SYSTEME/OpenSuse11.1/sda-partitions.txt
sfdisk /dev/sdb </mnt/SYSTEME/OpenSuse11.1/sdb-partitions.txt
partimage -f 3 -e -b restore /dev/sda2 \
mkswap /dev/sda5

And try to boot...
I was thinking that I could synchronise /dev/sdb2 with mdam after the boot.

Thanks for your help