Yesterday I bought 3x 2GB (~17EUR each).
The following howto describes the few steps necessary to create a single drive, using linux' awesome software-raid features:
The operating system I did this on was Ubuntu Dapper Drake 6.06 (based on infos from Derek Vadala's article about mdadm) - and since mdadm is *the* tool for this, it should be almost the same on other distros, too.
1) Load the necessary RAID modules:
Code: Select all
modprobe md-mod
modprobe raid0
They should be something like /dev/sd?, - I usually use the output of "dmesg | tail" to find this out.
3) Remove the existing FAT32 (vfat) partitions on the sticks and create a new one of type "0xFD" (Linux Auto Raid). Perform these steps for each USB thumbdrive:
Code: Select all
fdisk /dev/sda
Code: Select all
d n p 1
Change the type of this partition to "Linux Auto RAID", which has the number "0xFD", by entering:
Code: Select all
t fd
mdadm can take long (readable) arguments, or their short equivalents. I'll present both - so please do either (a) or (b):
a) readable:
Code: Select all
mdadm --create --verbose --auto /dev/md0 --level 0 --raid-devices=3 /dev/sda1 /dev/sdb1 /dev/sdc1
--auto: create the node "/dev/md0" if necessary
--verbose: outputs information during the process
--level: defines the raid level to be used. 0 means striping, whereas 1 would be mirroring. (See the article about RAID on Wikipedia for more information about the different levels of raiding)
--raid-devices: The number of devices to be used in this array
b) less typing:
Code: Select all
sudo mdadm -Cv --auto /dev/md0 -l0 -n3 /dev/sd{a,b,c}1
C..create, v..verbose, l..level, n..raid-devices
and as you can see, the devicenames support shell-magic.
5) After the raid array has been initialized correctly, you must format it to the desired filesystem. I chose ext2:
Code: Select all
mkfs.ext2 /dev/md0
First, create the mountpoint. e.g. "/mnt/raid":
Code: Select all
mkdir /mnt/raid
Code: Select all
/dev/md0 /mnt/raid ext2 user 0 0
Code: Select all
sudo mount /mnt/raid
Code: Select all
hdparm -tT /dev/md0
These results can be compared to an UDMA 100 disk - I know that it ain't too fast, but it's super-silent, requires less power and ... I like it./dev/md0:
Timing cached reads: 880 MB in 2.00 seconds = 439.97 MB/sec
Timing buffered disk reads: 74 MB in 3.05 seconds = 24.24 MB/sec
Mounting it again after a reboot:
Either let enter this new raid array in /etc/mdadm/mdadm.conf or re-assemble the array like this:
Code: Select all
sudo mdadm --assemble --auto /dev/md0 /dev/sd{a,b,c}1
( APPENDIX )
a) One thing I want to try is, buying a USB-hub for connecting all the USB sticks and then plug it into another linux system that has software RAID support. If I understood the docs correctly, it should be functional there, too (because the array information is stored on the thumbdrives and not on the host system).
b) You can find out which devices belong together by running:
Code: Select all
mdadm --query /dev/sd[a-z][0-9]