Server Guide and Blog

Rock Your Linux

By

USB Hard Drive in RAID1

This concept works just as for an internal hard drive. Although, USB drives seem to not remain part of the array after a reboot, therefore to use a USB device in a RAID1 setup, you will have to leave the drive connected, and the computer running. Another tactic is to occasionally sync your USB drive to the array, and shut down the USB drive after synchronization. Either tactic is effective. You can create a quick script to add the USB partitions to the RAID1. The first thing to do when synchronizing is to add the partition: sudo mdadm --add /dev/md0 /dev/sdb1 I have 4 partitions therefore my script contains 4 add commands. Then grow the arrays to fit the number of devices: sudo mdadm --grow /dev/md0 --raid-devices=3 After growing the array your USB drive will magically sync :) USB is substantially slower than SATA or PATA. Anything over 100 Gigabytes will take some time. My 149 Gigabyte /home partition takes about an hour and a half to synchronize. Once its synced I do not experience any apparent difference in system performance.

Leave a Reply