Reply to post: I am stupid

Systemd adds filesystem mount tool

Anonymous Coward
Anonymous Coward

I am stupid

I was clearly mistaken when I thought that udisks (alright, udisks2) already pretty much did this, and that udisks was implemented for systemd through polkit/D-Bus.

But the properly set up udisks already automounts drives, and automatically cleans everything up if you yank the drive. It does it by default in most distros. The Ubuntu I'm using now does it without having to write any rules. But Windows isn't a model for a solution: it will still potentially corrupt either file or filesystem if you yank the drive at the wrong point.

So the idea is that now systemd will run fsck on a drive if it's detected to be corrupted when you connect it. Okay, great. But we can do that anyway, if we want. And from what I'm reading this doesn't actually make that any easier than using udisks and fsck. And udisks, despite what Lennart says there, does not explicitly expect the drive to be unmounted before it's pulled:

https://udisks.freedesktop.org/docs/latest/gdbus-org.freedesktop.UDisks2.Filesystem.html

"If the device is removed without being unmounted (e.g. the user yanking the device or pulling the media out) or unmounted in a way that bypasses the Unmount() method (e.g. unmounted by the super-user by using the umount(8) command directly), the device will be unmounted (if needed) and/or the mount point will be cleaned up."

No, it *should* be unmounted, just like you *should* always use "Safely remove drive" in Windows. But there is a specific case in udisks for dealing with what happens when it's not. Systemd-mount does not offer any feature on mount that udisks can't do. And it does not offer protection against yanking the drive. It offers a remedial solution involving calling fsck on mount (which udisks can do). That's not protection. That's called shutting the stable door after the horse has bolted. There is *no* solution to the physical removal problem except not doing it, and it's wrong to paint this as such.

I like systemd. I much prefer it to the alternatives. It has actually made my life a whole bunch easier. But you know, this isn't necessary. There aren't any problems with udisks2 that are fixed with this. All this really means for me - given that the majority of systemd distributions use an all-in approach to features - is that I'm going to have to either disable systemd-mount, or I'm going to spend a whole bunch of time fighting with it to stop it trying to automount or auto-fix removable drives. It's a potential disaster area when you're trying to deal with drives that need recovery or repair and systemd-mount comes along and fires up fsck as soon as you plug it in.

Not necessary. Lennart needs to stop fixing things that aren't broken, and really stop implying that everyone in the community he serves is a relic. He's starting to prove people right about calling him arrogant and single minded. In that Reddit thread, he sounds like he's always sounded toward Linux: every developer is stuck in the past. Which he then uses as an excuse to push for changes that really just let systemd take over that little bit more. "I can't believe we're doing this when no-one uses USB drives any more!" says Lennart, implying that he's the saviour of all the dinosaurs that still do, and that once again he's the progressive developer that really pays attention to the world around him.

Here's hoping the distro devs kick back on this one and just never implement it.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Biting the hand that feeds IT © 1998–2019