Raid 1

Owen Townend owen.townend at
Thu Apr 10 23:01:00 UTC 2008



> Since then, I became a paranoid with keeping my data safe from harm. I
> have several machines and there's a lot of files spawned among them.
> Call it "Distributed backuping". Unfortunately, it's not very useful so
> I decided I had to have a system that was yet easily usable.
> RAID 1 was the answer.

Raid1 is _an_ answer, it is not really a solution to a backup issue
though, it is more a solution to an availability issue. RAID will protect
against total harddisk failure. It leaves you vulnerable to accidental
filesystem corruption and harddisk deterioration.

As an example, I use RAID5 for my mythtv box because I'd rather not
lose my recordings. For my personal documents and photos I rsync them
to another location (my parents house) as well as a portable HDD (and
am looking into or similar). The difference is between one loss
might be annoying while the other would be devastating.


> $ mdadm --create --verbose /dev/md0 --level=1 --raid-devices=2 /dev/hda1
> /dev/hdc1
> Congratulations, your virtual RAID1 hard drive has been successfully
> created!
> Now we need to create a partition with a real file system instead of
> that virtual Linux RAID you set before.
> We're almost done. Restart the computer.
> $ shutdown -r now

  Why restart the computer here? IIRC the array begins syncing
immediately after creation, the only reasons it wouldn't are the
component devices being in use or not of the same size (+-1%).
  If it doesn't start automatically then run this:
# mdadm --assemble --run /dev/md0
  Or read `man mdadm` for more options.

The disks are now being synced. You can't use the virtual disk.. yet. Type
> $ watch cat /proc/mdstat and wait until the rsync finishes. In the
> meanwhile, get a nice cup of coffee of your favourite beverage.
> Did it finish? Great!


This gets you well on the way to Software Raid 1 and it should work. I
> got mdadm with no problems. When time permits I will try and get it set
> up with one HD an IDE and the other a SATA. Not sure how this will work
> but will find out by doing it :-)

  md can handle devices being on different busses without issue. It doesn't
seem to mind what device it is given so long as it is a rw block device.
It can
even handle loopback devices meaning you could use a few files as your
devices. It also has an option --write-mostly which can help mirroring
slow links such as over a network.


> --
>         Karl F. Larsen, AKA K5DI
>         Linux User
>         #450462
>    PGP 4208 4D6E 595F 22B9 FF1C  ECB6 4A3C 2C54 FE23 53A7
> --
> ubuntu-users mailing list
> ubuntu-users at
> Modify settings or unsubscribe at:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the ubuntu-users mailing list