25
Jan
2015

Use two flash drives in RAID-1 for important files!

Hard drives are well known for their limited lifespans, and even SSD’s and other flash-based USB storage can also have shorter lifespans if abused enough. In this article, I will describe the use of two 4GB flash drives configured in Linux mdadm RAID-1 to give more reliable long-term storage.

I used two 4GB USB flash drives (One from Sandisk and one from Integral) and configured them in RAID-1 using mdadm. You can read about how to do this here. I used two different brands since using two of the same brand may not prove to be as reliable (they might both die at the same time, using two different brands reduces the chance of both of them dying at once).

DSCF0212_small

RAID-1 attaches both drives together into one logical device. Data written to this logical device gets transferred to both drives at the same time, meaning the same data is on both drives. This means either drive can stop working and no data is lost as the other drive has all of the data on it. I have dedicated the drives for my Owncloud storage, since I keep a lot of important documents on it. This also means that these important documents get synced to my RAID-5 array, as well as my laptop and other computers, meaning the data is well backed up and redundant.

Here are basic speed benchmarks:

sudo hdparm -tT /dev/X

The RAID-1 performance:

/dev/md127: RAID-1 combined flash drives
Timing buffered disk reads: 32 MB in 3.17 seconds = 10.08 MB/sec

The individual drives:

/dev/sdb: Integral IT1172 flash drive
Timing buffered disk reads: 32 MB in 3.16 seconds = 10.13 MB/sec

/dev/sdc: SanDisk Cruzer flash drive
Timing buffered disk reads: 50 MB in 3.04 seconds = 16.46 MB/sec

So performance-wise, it can be seen that the read speed is hampered by the slower drive. Write speeds are in the order of 7-8 MB/s, again limited by the slower Integral drive. This is plenty fast enough for my uses though, since I’m working with small individual files mostly anyways, and if I need more space I just create a larger RAID device using larger flash drives and copy the data over. I hope this is helpful to people!

Splashtop Personal: stream games from your PC to a tablet/phone!
Raspberry Pi: Increase UART speed

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.