FS#32955 - Systemd is incompatible with ATA over Ethernet FS

Attached to Project: Arch Linux
Opened by Curtis (foxcm2000) - Tuesday, 04 December 2012, 01:24 GMT
Last edited by Dave Reisner (falconindy) - Tuesday, 04 December 2012, 03:40 GMT
Task Type Bug Report
Category System
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

AOE (ata over ethernet) mounts what appears to be a local share over the network using raw ethernet frames to communicate with a remote server. Under the new systemd regime, there is no provision for properly mounting & unmounting these shares. Note: I'm not 100% sure, but some of these issues could affect iSCSI as well.

Bugs in particular:
1. At startup, the aoe-discover and aoe-state utilities are run after the network interfaces come up and before mounting the filesystem. This could be accomplished with a systemd service file, so my request here is to write a sample file that can be used for running these commands (I may attempt this and will post the results here).

2. At shutdown, systemd stops the network before there is a chance to unmount the shares. I know that systemd is supposed to be intelligent enough to unmount networked filesystems (NFS/samba/etc) before shutting down the network, but AOE is a different beast because it does not show up as a networked filesystem. In fstab, it is a normal EXT4 (in my case) filesystem that is mounted as a normal local disk. In the old sysvinit setup, the simple NETWORK_PERSIST="yes" directive meant that this was never a problem. Unfortunately, that directive has been abandoned and netcfg does not have anything similar to keep the interfaces up to unmount the directory.

I might try to hack together a "PRE_DOWN" directive in netcfg, but that has at least one problem: What if the filesystem (/home in my case) isn't able to be brought down when the PRE_DOWN directive is called?


Request:
1. Simple version: Make it so NET_PERSIST or an equivalent exists in netcfg. This feature existed in earlier releases for a reason, and while it may not be the most theoretically elegant feature it worked fine and probably sped up the shutdown process by a few milliseconds as a bonus feature.
2. Complex version: Systemd already has wacky directives for "automount" of directories on first use in fstab. Add another directive indicating that the filesystem requires network interfaces to be up in order to unmount the filesystem safely (regardless of FS type). Note: you should be able to list the interfaces by name. I have 3 active ethernet adapters on this box, but only two are used for AOE.
This task depends upon

Closed by  Dave Reisner (falconindy)
Tuesday, 04 December 2012, 03:40 GMT
Reason for closing:  Not a bug
Additional comments about closing:  User configuration error. _netdev is needed to explicitly mark non-netfs filesystems as networked devices.
Comment by Dave Reisner (falconindy) - Tuesday, 04 December 2012, 01:33 GMT
systemd honors the _netdev mount option for cases where the device's FS doesn't appear to be a networked FS. Given knowledge of it being a networked share, it'll be ordered on network.target, so it should be started/stopped properly, assuming network.target is activated in a reasonable manner.
Comment by Curtis (foxcm2000) - Tuesday, 04 December 2012, 03:38 GMT
Thanks! That made it work OK. The bootup process is much much slower on this machine (my desktop) compared to my notebook, but I don't reboot very often and at least it mounts and unmounts the drive cleanly (you can end up with a kernel panic if you don't unmount cleanly and then attempt remount on a subsequent boot without resetting the server machine).

About the only request I have now would be to add a note about _netdev to the systemd migration guide (I might do that myself if I have time).
Please go ahead & close this bug.
Comment by Dave Reisner (falconindy) - Tuesday, 04 December 2012, 03:39 GMT
_netdev is documented by mount(8). It's not something that systemd introduced, it just continues to honor it because it's somewhat of a standard. If you feel the need to document it in relation to dealing with network mounts somewhere, go ahead.

Loading...