Diary of a geek

August 2006
Mon Tue Wed Thu Fri Sat Sun
 
14
     

My ugly mug

Where's Andrew?

Categories

Other people's blogs

Subscribe

RSS feed

Contact me

JavaScript required


Monday, 14 August 2006

How to mount ATA over Ethernet volumes with a minimum of grossness

Yesterday I discovered some inadequacies in the stock Debian Etch initscripts when it came to filesystems on ATA over Ethernet block devices.

Overnight I got a few emails, but it was a one Joshua J. Kugler who brought my attention to the _netdev mount option. The mount(8) manpage really is a treasure-trove of information that should be read often.

So, in a nutshell, here's what I'm doing:

  • added _netdev to the existing options for the filesystem that is on the ATA over Ethernet device in /etc/fstab
  • /etc/init.d/mountall.sh modified to call mount with an extra -O no_netdev argument. Also filed #383073 to get this fixed for real.
  • modified /etc/init.d/mountnfs.sh (I know this is a bit off-purpose, but the comments mention smbfs being mounted, even though there's no other traces in the file) to also mount devices with the _netdev option (essentially just mount -a -O _netdev). Also filed #383123 to get this fixed for real.
  • modified /etc/init.d/umountnfs to unconditionally call umount -a -O _netdev (so the filesystem is unmounted before the network gets hauled out from underneath it). Also filed #383124 to get this fixed for real.

Finally, I found I had to either load the aoe kernel module as a post-up operation for the Ethernet interface in /etc/network/interfaces or load it in /etc/modules and call /usr/sbin/aoe-discover as a post-up operation in /etc/network/interfaces, because just loading it from /etc/modules resulted in the driver being loaded a fair while before the network came up, and once the network had come up, it took the driver longer than the time for /etc/init.d/mountnfs.sh to be run to realise there were ATA over Ethernet devices on the LAN and arrange for the relevant entries to appear in /dev/etherd. I've currently opted for running aoe-discover from /etc/network/interfaces.

So I'm now very happy. I can reboot my MythTV server and everything comes back without any intervention whatsoever. Sweet.

It'd be nice if these fixes can make it into Etch, as all of the other components will be there for ATA over Ethernet support. The kernel is new enough to have the driver as standard, and vblade is in Etch. Just the support to mount it all properly isn't there. Oh, and nothing I've done (with the exception of the post-up stuff in /etc/network/interfaces) is ATAoE-specific. It'll work equally well for NBD for example, and presumably other SAN-like stuff.

I certainly find this approach far less gross than what Coraid suggests, and it'd also be cool if Debian were the first distro to do it the right way. I wonder if Red Hat/Fedora are already? I suppose I could fire up Xen or VMware and find out if I get curious enough.

[21:55] [tech] [permalink]