Partimage and Raid1 linux system

If you have a question about a file system (for example xfs, reiserfs, ...)

Moderator: feffer

Post Reply
patrick
Posts: 1
Joined: Fri Jul 31, 2009 6:48 am
Location: Grenoble, France

Partimage and Raid1 linux system

Post by patrick » Fri Jul 31, 2009 7:04 am

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 \
/mnt/SYSTEME/OpenSuse11.1/sda2-root

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 \
/mnt/SYSTEME/OpenSuse11.1/sda2-root.000
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

Patrick

Post Reply