This is just a quick note on some experiences using an external USB drive with OpenWRT 8.09 on an Asus WL-500gP.

Mount options not honoured

It seems that mount options set in /etc/fstab aren't honoured properly. I've filed a bug report here with a fix. If you have a running OpenWRT installation, you can grab the /sbin/usb-storage replacement from there and copy it onto your router.

A particular badness of this bug is if you're relying noatime/nodiratime to stop your disk spinning up, or your USB stick wearing out(!)

USB startup timing

This isn't a bug in OpenWRT, just an annoyance.

On the Asus WL-500gP (at least), USB devices don't come online until 10-20 seconds after startup. This means that USB disks don't mount until some time during the boot process.

This causes a problem if you have any init scripts that rely on an external disk (for example, if you've added Optware packages and symlinked in some Optware init scripts.)

The (half-assed) solution I have come up with is to put in an init script that waits for usb-storage to come online, and then sleeps while the disks are mounted. Make sure this script runs before any other init scripts that require the external disk.

  1. Download the script from here
  2. Copy the script to /etc/init.d on the router.
  3. Enable it with /etc/init.d/usb-storage enable
  4. You will now have /etc/rc.d/S50usb-storage. Make sure any other init scripts that rely on external disks come after '50'

There are a variety of other hacks to get all this stuff working, this is just my take on it. It looks like external storage has been dramatically overhauled in the upcoming OpenWRT release, so hopefully it will no longer be an issue.

Thoughts on “OpenWRT 8.09 & usb-storage