PDA

View Full Version : [ubuntu] Restore to Raid 1


MarioFromBelgium
July 1st, 2009, 06:40 AM
Hi,

I have successfully setup Ubuntu 8.01 Desktop with RAID1.(software raid from UBUNTUs alternative install)

I'm planning backup to tape with TAR.
Will I be able to restore my system in case both HDD refuse duty.
In other words if I backup from / will my backup-file contain all necessary data to rebuild the RAID.
Or even more will a restore refuse duty just because it has the RAID config?

Somewhere I have read that building a RAID config from within an installed UBUNTU is a hassle. This would mean that I would have to re-install Ubuntu with RAID 1 and than restore the necessary apps/configs/data... nice theory but...is this feasible?

Thx,
Mario

ian dobson
July 1st, 2009, 01:50 PM
Hi,

You could use dd to read directly from your md array to a tar archive then dd it back.

dd if=/dev/md0 of=/dev/tar_device
dd of=/dev/md0 if=/dev/tar_device

The md0 raid device must exist before you can restore to it.

Regards
Ian Dobson

MarioFromBelgium
July 2nd, 2009, 05:18 PM
so what you say is

1° put two new HDD in
2° put life cd in and make partitions with RAID device(s)
3° don't install ubuntu but restore data from tar

is that the way to do it?

ian dobson
July 3rd, 2009, 12:13 AM
Hi,

Yes, that about it.

Note: I've only used dd to copy entire drives and it's always worked for me. As a raid array is just another block device under linux I can't see why it shouldn't work.

I reccomend you test it before you really need it :lolflag:

Regards
Ian Dobson

MarioFromBelgium
July 3rd, 2009, 10:43 AM
If I find time I'll test it.