akirak / helm-linux-disks

Emacs Helm interface for mounting removable disks in Linux
11 stars 0 forks source link

Add support for systemd-mount/systemd-umount #5

Open zabbal opened 5 years ago

zabbal commented 5 years ago

It would be great to use it instead of udiskie because we can automatically fsck before the mount to ensure that we always get a clean fs and we can use automount option to defer actual mounting to the time whenfs is really accessed. We can also use timeout-idle-sec to protect fs on removable drive from corruption due to sudden removalor power loss.

akirak commented 5 years ago

I know systemd-mount, but I don't get the point. If you are willing to fully rely on systemd, you can (and should) use helm-systemd, not this package. However, I find configuring systemd mounting is tedious and not very intuitive, and that's why I looked for an alternative solution. Your concerns would be right for servers, but this package is intended for casual use on desktop.

zabbal commented 5 years ago

It seems like there's (understandable) confusion - I'm not talking about https://www.freedesktop.org/software/systemd/man/systemd.mount.html (manually configured .mount units), I'm referring to https://www.freedesktop.org/software/systemd/man/systemd-mount.html - the binary which is effectively a better alternative to old mount command.

It generates necessary .(auto)mount units automatically taking care of fsck (see --fsck= option) and protecting from unexpected disconnect (see --timeout-idle-sec= option).

While it can be used for servers, it's especially well-suited for desktops where we put in/out USB drives all the time. Even more so in case of casual users who might forget to manually eject/unmount flash driver before physically unplugging it.

akirak commented 5 years ago

Okay, I'll take a look at it. I also plan to rewrite the whole package (#4), so the feature will be, if any, available on the new package.