[systemd-devel] How to automount

Paul D. DeRocco pderocco at ix.netcom.com
Mon Sep 21 21:38:59 PDT 2015


> From: Mantas Mikulenas [mailto:grawity at gmail.com] 
> 
> > I don't think there's any way to have something auto-unmount
> 
> There certainly is - udev has been unmounting unplugged 
> drives for many years. It's done by default.

Sure, you can get it to unmount after you've removed it, but that's too
late if you haven't synced it. You have to do an explicit sync in advance
to avoid data loss. The only alternative is to disable write buffering,
which makes things slow, and stresses the drive.

In my case, it's better to mount and unmount explicitly around each
user-requested operation.

-- 

Ciao,               Paul D. DeRocco
Paul                mailto:pderocco at ix.netcom.com



More information about the systemd-devel mailing list