Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have two 3TB drives that I want to RAID0. I have important files that I want backed up, and I believe that I'm after RAID0. If that's not correct please don't hesitate to advise me otherwise.

I have absolutely no idea how to do this, I'm very new to Linux in general, the version I'm running is 13.10, the drive names are as follows:

Drive1 = /dev/sdd
Drive2 = /dev/sde

Can I do this from command line?

I also believe that I should be using the ext4 type for the drive.

share|improve this question
Raid0 offers zero (0, none at all) data protection. – Mat Sep 9 '13 at 7:23
You should choose RAID1 or RAID5 if you have 3 and more disks. – Danatela Sep 9 '13 at 7:38

I have important files that I want backed up, and I believe that I'm after RAID0. If that's not correct please don't hesitate to advise me otherwise.

That is not correct.

Please read this canonical post on RAID levels on our sister site.

The brief answer is:

  1. You are after RAID 1 (mirror).
  2. RAID 0 is the unsafest thing there is.
  3. RAID does not replace a backup.

Lets expand on the last. RAID 1 (mirror) (or any RAID level other than 0) will help you recover from a failed disk. It will not help you in case of a fire, theft, or similar disasters. Therefor the mantra is The only good backup is an off-site backup.

RAID can (and will) help to keep your files safe during backups.

In professional IT settings RAID is often used to keep the server running until 5 PM after a disk has failed. After that (and outside office hours) emergency maintenance can be performed. It does not replace backups.

I have absolutely no idea how to do this,

In Linux you probably want to use mdadm.

Can I do this from command line?

Yes, you can do this from the command line, in several ways.

Assuming your drives are empty (with no data on it which you want to keep):

  • Partition the drives with filesystem FD (RAID autodetect)
  • `mdadm --create /dev/md1 --level=1 --raid-devices=2 /dev/sdd1 /dev/sde1

You now have a new virtual disk called /dev/md1. Anything you write to it will be written to both disks, thus keeping your data safer. Partition that as you would normally partition a disk.

If you do not have enough space to start with two clean drives, but enough space to start with a single empty drive then you can create the array using the missing parameter, copy the data to it and then add the second drive. If this is the case then please add that to the OP.

share|improve this answer

RAID in general is not a way to do do backups. RAID is about performance, reliability and cost. In particular, if your goal is to recover a file that has been erroneously deleted, RAID, whatever the level, is not going to help.

Moreover, if you have important files, RAID0 is definitely not the way to go. RAID0 doubles the risk of data loss.

You might configure your second disk as a backup storage but that is probably not the optimal way. Usually, you want to backup your files through the network to a different machine.

If you just want to protect your data from a single disk failure, use software mirroring (RAID1).

share|improve this answer
I do remember reading that you can make a 'link' between Harddrives, so that whatever you copy to one drive, if you save over an existing file, if you make any changes to that drive, it would also match that on the second, but the main reason I want this is for data recovery, if the hdd fails, I want the other hdd to have the same files, how can I achieve this> – Shannon Sep 9 '13 at 7:29
This is called RAID1 or mirroring but is not a way to backup files, just a way to reduce the risk of data loss due to a disk failure. – jlliagre Sep 9 '13 at 8:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.