I have a USB stick that's showing some weird problems. I'd like to create a number of partitions (3?) and use RAID over those partitions to ensure resilience to failure. Is this a good idea? How do I do this in Linux?

  • 1
    That will only increase the number of writes to the stick.
    – jordanm
    Jul 1, 2013 at 14:37
  • Well, if I keep two copies of every file, that will also increase the number of writes -- but there will only be one FAT table
    – dan3
    Jul 1, 2013 at 14:41
  • 1
    The best idea: Throw away the stick if it already makes problems. However... Can you erase the stick for making it a RAID collection or must the data on it be preserved (on the stick)? Jul 1, 2013 at 15:29
  • I can re-partition and don't care about old data. You must realize that throwing away the stick would have occurred to me without having to ask on SE first :)
    – dan3
    Jul 1, 2013 at 15:41
  • @Dan3 You will need more then one Disk to setup RAID. You can check this link for the list of options avaliable fault-tolerant on file system
    – Raza
    Jul 1, 2013 at 15:55

2 Answers 2


This should not be difficult. You create three partitions (make sure they have a 1 MiB alignment or what your erase block size is) and combine them afterwards:

mdadm --create /dev/md5 --metadata=1.1 --raid-devices=3 --level=mirror \
  --bitmap=internal --assume-clean /dev/sdx1 /dev/sdx2 /dev/sdx3

And to use it:

mdadm --assemble /dev/md5 /dev/sdx1 /dev/sdx2 /dev/sdx3

In order to reduce the write accesses you may put the write intent bitmap on a different device. If you are sure that the MD device will always be stopped cleanly then you may omit the bitmap.

  • This is probably what I'm looking for. How do I find the "erase block size"? cat /proc/mtd doesn't give me anything (but the header)
    – dan3
    Jul 1, 2013 at 16:49
  • @dan3 I just learnt that not the erase block size (about 2 MiB) is important for performance but the page size (4K/8K). It seems that neither can be read with standard software. Jul 1, 2013 at 17:34
  • Well, I suppose 4Mb would cover all bases
    – dan3
    Jul 2, 2013 at 9:33

In RAID you must use different disks to improve performance, for example Raid 5. this example that you want to partition your USB, in the end there is again just one partition, no speed no performance. but if you like:

You can do this by fdisk /dev/[usb device] command and then format those partitions by mkfs utility

  • As I mentioned in the question I do not want PERFORMANCE but FAULT TOLERANCE. I could keep n copies of every file, but the single FAT table would still be a single point of failure.
    – dan3
    Jul 1, 2013 at 15:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .