view · edit · print · history

Can I use RAID?

Yes. With both the Unslung-able firmware How to enable RAID support in Unslung-able and Debian (summary below). OpenSlug is capable of RAID support but nobody has tried it yet.

Steinar adds: I've tried RAID1 in OpenSlug 2.70 and 3.10 (on flash cards). It works fine and a raid device can even be used as the root file system. It requires the md and the raid (like raid1) kernel modules, mdadm and some simple editing in the boot files.

Raid1 is also working with DebianSlug (see http://wiki.nslu2-info.de/pmwiki.php/HowTo/DebianSlugRaid1 (German only)). The instructions are pretty much based on the Unslung Raid1 HowTo.

In order to make it work, make sure you have md and raid0,1,5 loaded into kernel.

For Debian (at least Lenny) the instructions at http://www.howtoforge.com/software-raid1-grub-boot-debian-etch(approve sites) work fine. Simply ignore the sections on Grub as update-initramfs reflashes the kernel and initramfs automatically and leave disks connected throughout the process. In summary (without details of each command):

  • Install mdadm and initramfs-tools
  • Use sfdisk or fdisk to partition the 2nd disk.
  • Set type for new RAID partitions to fd (RAID autodetect)
  • Use mdadm to create new RAID drives with missing first disk
  • mkfs or mkswap as needed on new partitions
  • Save /etc/fstab and edit it to use /dev/md? (new RAID partitions)
  • Save existing flash (cat /dev/mtdblock* > backup) and put it somewhere safe
  • update-initramfs -u to rebuild kernel and initramfs
  • Use apex-env to add rootdelay=10 to cmdline to give extra time for RAID detection
  • Copy all data to new RAID partitions
  • Update /etc/mdadm/mdadm.conf on RAID array
  • Restore original /etc/fstab (just in case)
  • Reboot and you should be running from the degraded RAID arrays (if it fails, use the saved backup to reflash. You may need to use the hack at http://www.nslu2-linux.org/wiki/HowTo/MountDisksByLabel to overcome the Root Filesystem Bug)
  • Update partitions on 1st disk to type fd (make sure partition sizes are the same)
  • Use mdadm to add 1st disk partitions to RAID arrays
view · edit · print · history · Last edited by Starnamer.
Based on work by Starnamer, StarNamer, zack, fcarolo, halfer, PatrickSchneider, and Steinar Midtskogen.
Originally by tman.
Page last modified on April 05, 2010, at 01:31 AM