2

What is the proper way to do a boot/hot-plug automount for ATA and USB storage devices on Linux systems using systemd without requiring a GUI or a user having to be logged in?

It seems that calling mount from a udev rule is no longer acceptable with systemd (so older rules are no longer guaranteed to work), and udisks does not automount if the user is not logged in locally.

The method should have a way to include mount options, so writability and filesystem masks can be set, as well as clean up after an "ungraceful" unmount (i.e., yanking the device out while still in use).


NOTE: This is a similar question one I posted earlier, but that question concerns a specific use case on Debian systems. This question is for all Linux systems using systemd.

  • Hmm... It seems that I've found the answer here: https://serverfault.com/questions/766506/automount-usb-drives-with-systemd, but the shell script mentioned therein might do well with some improvements for ATA devices. I'll leave this question up for now to provide an opportunity for more answers. – user339676 Dec 28 '16 at 07:34
  • The distribution doesn't make a difference. No need to write a new question. – Gilles 'SO- stop being evil' Dec 28 '16 at 23:37
  • Got it. Modified the question slightly and posted it on Server Fault instead. If answered there, will delete my questions here since both are yet to be answered. – user339676 Dec 29 '16 at 06:54

0 Answers0