back to article Systemd adds filesystem mount tool

The developers behind Systemd, the alternative to sysvinit, have added a mount tool to their user space bootstrapper. The mount tool landed during the weekend in this merge. It gives Systemd users a systemd-mount command, letting the mount command pull in dependencies and use auto-mounting logic. Developer Lennart Poettering …

Page:

  1. Anonymous Coward
    Anonymous Coward

    Do one thing and do it well

    1. Anonymous Coward
      Anonymous Coward

      Zawinski's law of software envelopment:

      "Every program attempts to expand until it can read mail. Those programs which cannot so expand are replaced by ones which can."

    2. Anonymous Coward
      Anonymous Coward

      1970 thinking. When computers could barely do one thing at a tine per user. Repeating over and over outdated ideas acritically means just to remain stuck in the past. Just like religions do.

      1. Anonymous Coward
        Anonymous Coward

        re: 1970 thinking.

        The fact that you think computers can do more than one thing at a time, rather than spend a tiny amount of time doing one thing then swtiching to another one, shows a staggering lack of understanding. I hope you're not engineering anything I have to work on....

        1. richardcox13

          Re: re: 1970 thinking.

          >The fact that you think computers can do more than one thing at a time, rather

          > than spend a tiny amount of time doing one thing then swtiching to another one,

          > shows a staggering lack of understanding

          And when was the last time you used a computer without multiple CPUs/cores?

          Current systems really do multi-task.

        2. bombastic bob Silver badge
          Unhappy

          Re: re: 1970 thinking.

          "The fact that you think computers can do more than one thing at a time, rather than spend a tiny amount of time doing one thing then swtiching to another one, shows a staggering lack of understanding."

          er, you forgot about 'multi-core' dude. Sorry, but I mostly agree with your rant against the "1970 thinking" statement, except that one little detail...

          so my quad core CPU can do 4 things at once [and when I write a multi-threaded algorithm, it really does!]. But yeah time-slice thread scheduling on a single core DOES give "the illusion" of doing multiple things at once, while really doing 'what you said'.

          1. analyzer

            Re: re: 1970 thinking.

            Er - no 'dude' muti-core is just multi cpus.

            You can call it a core since that is common practice but each core is a cpu in its own right and can only do one thing at a time then switch to another. These multi core things used to be called CPU Modules, just you kiddies forget the modules bit.

            1. Brewster's Angle Grinder Silver badge

              Re: re: 1970 thinking.

              Nobody's mentioned SIMD yet. Surely that counts as doing multiple things at once?

              1. Anonymous Coward
                Anonymous Coward

                Re: re: 1970 thinking.

                All the people taking about parallelism don't seem to understand it as an engineering principle. This is more an argument against, for example, the "god object" anti-pattern in OO programming. One thing doing too much which makes maintenance impossible.

                As for SIMD, that's Single Instruction! I write GPU shaders. It's extremely important to write them efficiently; branch-less, and using the least number of the least complex instructions possible.

                The program does one thing (calculate a single pixel), but has to do it over 2 million times per frame.

            2. bombastic bob Silver badge
              Facepalm

              Re: re: 1970 thinking.

              "These multi core things used to be called CPU Modules, just you kiddies forget the modules bit."

              eh? I don't think you're talking about the same thing I'm talking about... [but whatever]

              if you want to split hairs, then yes, a single CPU CORE will do 'one thing at a time' based on a single thread of execution being 'one thing'. [must I _really_ go this far to avoid ambiguity?]

              I consider a multi-core CPU to, in and of itself, be "one CPU" (being as all the other hardware and memory bus is pretty much shared). So from _THAT_ perspective, the CPU can do mutliple 'things' at one time, i.e. multiple threads of execution simultaneously executing on the multiple cores.

              semantics - what a pain

        3. Anonymous Coward
          Facepalm

          Re: re: 1970 thinking.

          Multi-core much? A Baker's dozen computers of my own here and only one, the Intel Galileo, is the only single core. [My room mates add more, only one of which, the stand-alone XP, is also single core.]

        4. This post has been deleted by its author

        5. Andrew Richards

          Re: re: 1970 thinking.

          Original post wasn't explicitly suggesting that "computers can do more than one thing at a time" is their understanding of how it all works. Do lots of things by rapidly switching between them so you usual can't tell is close enough. Calm down, pedant.

          But... my hard disk is retrieving data and will cause an interrupt to awaken a suspended thread and interrupt the current one (not that I'll notice) so it is doing more than one thing at a time. I think the network card is busy doing its stuff too. And that's before we talk "cores". Misunderstanding is yours, I think...

        6. John Hughes

          Re: re: 1970 thinking.

          The fact that you think computers can do more than one thing at a time, rather than spend a tiny amount of time doing one thing then swtiching to another one, shows a staggering lack of understanding.

          Uh...

          $ cat /proc/cpuinfo | grep processor

          processor : 0

          processor : 1

          processor : 2

          processor : 3

      2. Doctor_Wibble
        Trollface

        > do one thing at a tine per user

        This is a process forking thing, right?

        .

        [ tumbleweed ....@.. ]

        .

        *sigh*

        1. ds6 Silver badge

          single clap

      3. bombastic bob Silver badge
        Mushroom

        "1970 thinking." (by an anon, naturally)

        I was 10 years old in 1970. I learned programming on punch cards and these pencil mark 'mark sense' cards that used the same hollerith code. I don't know exactly what you're implying by all of that "1970 thinking" comment, but whenever I hear "remain stuck in the past" I think of an arrogant millenial calling us "gramps" or "old fart" and assuming we're stone-age neanderthals for recognizing 'what works' vs 'new, shiny'.

        Show some RESPECT, you young whipper-snapper! And read Arthur C. Clarke's "Superiority".

        "Do one thing and do it well". It's an excellent philosophy when it comes to making small utilities that have many many uses. Like a knife. Not a "super-doohickey-2D-flugly-GUI-the-metro" knife, but a general purpose 'works for many things' knife, which can often be repurposed in ways its inventor never DREAMED of, because "do one thing and do it well".

      4. Doctor Syntax Silver badge

        "1970 thinking"

        Ken Thompson thinking.

    3. hplasm
      Mushroom

      Do one thing, Poettering-

      Fuck Off- and do it well.

    4. Ken Hagan Gold badge

      The article goes into some detail about how the new command does dependency checking that "mount" never did ... and then uses the aforementioned to do the mount.

      So it is a pretty good example of what you just wrote. Somehow though, I think you were being sarcastic. Unfairly in this case.

    5. ElReg!comments!Pierre

      I don't care about "new"

      One of my sysV servers (6-month uptime with zero downtime, so a rookie server) was inadvertently rebooted (unplugged, as it happens). Uptime is now in the single-digit hours. I investigated and found that systemd (which I NEVER installed manually) is now the init, I can't desinstall it without physical acces (it was happy enough to intall itself without that, though) and it randomly unplugs peripherals (storage, network, etc). I am not entirely happy about that. In 2 days I will be in the server's physical location, systemd's gonna fly through the window, and this time I'm going to pin it out forever.

  2. Christian Berger

    Solving problems that do not exist anymore

    The people who are targeted by this have mostly moved on to Tablets and Smartphones using Android or IOS. The remaining people understand that you must mount and unmount drives or use cloud or network services. And even if they don't, just mounting it sync will get rid of file corruption for the rest.

    Now this wouldn't be a problem if he'd simply write his own version of mount which would just replace any mount you'd want. The problem is that there are dependencies. You will probably no longer be able to use systemd without that new mount, and you will probably not be able to use that new mount without systemd. I mean that whole systemd thing wouldn't be a problem if Poetterling would have just started his own operating system and leave the rest of the Linux community.

    1. asdf

      Re: Solving problems that do not exist anymore

      > if Poetterling would have just started his own operating system

      That's a lot of unnecessary risk and expense when Red Hat (his employer) has shown clearly how much more lucrative it is to get rich off the back of other people's code.

    2. Colin Tree

      Re: Solving problems that do not exist anymore

      I moved to Slackware to avoid systemd.

      Yes it might be time for two branches of Linux

      classical sysinit and new-sort-of systemd

      You might even call the systemd branch forked.

      Re: Creating problems that didn't exist yet

      1. Anonymous Coward
        Anonymous Coward

        Re: Solving problems that do not exist anymore

        I'm seriously contemplating *BSD.

        pfSense is lighting the way.

        1. asdf

          Re: Solving problems that do not exist anymore

          >I'm seriously contemplating *BSD.

          I love the BSDs but sadly for many it won't be a suitable replacement yet because its support on laptops is not great (has real problems with suspend and resume on a lot of hardware) and it doesn't have a native Steam client. For a simple office type desktop at home it is great. Although will have to see if Gnome 3 (dumpster fire DE aside gtk is really important) and other FOSS becoming basically Linux only how much that hurts BSD long term.

          1. bombastic bob Silver badge
            Devil

            Re: Solving problems that do not exist anymore

            "I love the BSDs but sadly for many it won't be a suitable replacement yet "

            I've used FreeBSD for a long time. There are often "linuxy" things written into applications by people who believe that ALL open source operating systems are linux, and have things like systemd running (etc.). So the 'ports' maintainers have to write patches and workarounds for things to compensate. Dbus was one of those patched things, and has had issues with file mounting because of it. gnome wants to mount that file system because you plugged it in, dammit, regardless of what YOU want, and oh you configured it NOT to, so it's not on the desktop... yet you still have to use 'umount -f' to unmount because, DBus.

            so yeah, linuxy things being assume/done in the design, ports maintainers have to patch it, does not always work perfectly afterwards.

            and this goes back to adding a mount utiltiy to systemd...

            WHAT is going to happen on SYSTEMS THAT DO NOT USE SYSTEMD??? Are the desktop people just going to ASSUME that systemd is tehre, and invoke it's version of the mount utility on your behalf?

            I hope not.

            (smiling daemon logo 'cause I'm on FreeBSD at the moment)

          2. ds6 Silver badge
            Megaphone

            Re: Solving problems that do not exist anymore

            GTK is pretty well updated on BSD, so I don't think there's much to worry about. While Gnome is questionable on how much uproar would be generated if it were to drop everything but mainstream Linux distros, I very much doubt there would be no one rioting if it were to happen to GTK. It drives too much of desktop *nix to not be available on every platform.

            Even if it were to go Linux-only, you already know there would be a fork for it, or at least a replacement.

        2. John Crisp

          Re: Solving problems that do not exist anymore

          "pfSense is lighting the way."

          Take a look at Opnsense, a pfsense fork

          1. Anonymous Coward
            Anonymous Coward

            Re: Solving problems that do not exist anymore

            Take a look at Opnsense, a pfsense fork

            I did. I saw "Backup to Google Drive". Apparently listed as a positive feature.

            What could possibly go wrong with that ??

            So I stopped right there.

      2. eswan

        Re: Solving problems that do not exist anymore

        "I moved to Slackware to avoid systemd."

        I recently moved back to slackware. Ran slackware from ver. 3 (Now with ELF binaries!) to

        around ver. 7, then jumped to Debian for aptitude. Returning to slackware feels like putting

        on a pair of comfortably worn shoes.

  3. 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.

    1. bazza Silver badge

      Re: I am stupid

      "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. "

      Ah well, that's the problem in these days when so much has already been done. Pottering has a salary to earn, and he can earn it so long as he's fixing "problems". If he were to say something like "nope, nothing needed", then RedHat would be wondering what else to do with him.

      Other software houses are similar. Look at MS - they have a team of people whose job it is to scientifically measure "Usability", and design things that are more "Usable". They did pretty well with Windows 7, but should have been sacked immediately afterwards. They weren't sacked, and we ended up with Windows 8, 8.1 and 10 as a result. The Office ribbon came out of the same bunch of people.

      The hardest thing ever for a software developer is to admit that, in some respects, software can be "finished", or at least gets to a point where maintenance is needed, not revolution. Fortunately there are bunches out there who are much more cautious with their approach - FreeBSD, Solaris, etc. Even the Linux kernel devs are somewhat cautious - "don't break user land".

      The same is true with senior management. Getting a new director in the company is a guarantee that there's going to be a lot of mucking about, regardless as to whether their predecessor had set things up properly or not. Arrrggghhhh! Weirdly this kind of behaviour has generated a whole sub-profession for those who go around cleaning up the mess caused by others who cannot resist making changes for change's sake.

      1. Doctor Syntax Silver badge

        Re: I am stupid

        Sorry, bazza, I can only update once.

        1. Fatman
          Thumb Up

          Re: I am stupid

          <quote>Sorry, bazza, I can only update once.</quote>

          Don't worry, because I also upvoted him.

  4. Anonymous Coward
    Anonymous Coward

    Amok

    When will this madness be ended?

    1. Anonymous Coward
      Anonymous Coward

      Re: Amockery

      When you stop posting on El Reg and grab your pitchfork!

    2. asdf

      Re: Amok

      When systemd starts becoming more and more unstable spaghetti code on production systems and people learn the hard way what happens when PID 1 goes down because its doing way too much. Then again Windows is still around so who knows.

      1. asdf

        Re: Amok

        Just to spell it out for perhaps newer users to *nix if PID 1 (ie now basically systemd in Linux land) goes down the kernel is required to panic (BSOD in Windows terminology). Therefore systemd is so much more than an init replacement its proponents (basically Red Hat) claim. Its stability now on the majority of Linux distros is as important as the stability of the Linux kernel itself. Therefore, Red Hat shoving shit into PID 1 has a lot more to do with Red Hat business and political reasons than technical ones. Sadly the one thing Red Hat has shown at least me is they basically drive a whole lot of the development in Linux land these days so they can get away with this.

        Good read - http://ewontfix.com/14/

    3. Doctor Syntax Silver badge

      Re: Amok

      When you move to a BSD?

  5. Anonymous Coward
    Linux

    A Redditor writes :)

    @dosida: "Hey Lennart. Out of curiosity (and I mean no disrespect with this) but since you want to improve the functionality and efficiency of mount why not work with whoever's maintaining the mount/umount utility and patch that instead of rewriting it and bundling it with systemd?"

    "Why is mount's place in systemd instead of its own individual package? Why should systemd, which is (unless I'm mistaken) an init system and its role stops right after the kernel loads... deal with mounts? Why not rewrite or push patches to udevs which is more appropriate to deal with pluggable devices?"

  6. JoeF

    systemd is evil.

    Now that Microsoft has ported their Powershell to Linux, I fully expect systemd to soon require it.

    Time to get rid of systemd.

    1. Charles 9

      And replace it with WHAT? Definitely not SysV which falls flat with dynamic hardware which is the norm these days on most systems.

      1. Anonymous Coward
        Anonymous Coward

        "And replace it with WHAT?"

        OpenRC seems to work fine for me. Still waiting for a valid reason that would make me want to migrate away from it to systemd, but then I use a distro which allows the choice. (Gentoo)

      2. Christian Berger

        Dynamic hardware?

        "Definitely not SysV which falls flat with dynamic hardware which is the norm these days on most systems."

        I'm sorry, but systems with "dynamic hardware" are getting less and less common. Laptops rarely have PCMCIA or PCCard slots any more, and even if they have them, they are rarely used. Network cards used to be something you could unplug, today they are a standard part of your chipset, and even if you install additional ones, those are typical PCI-Express based by now.

        I mean there used to be a time when your computer might have had 2 PCI network cards a non-PnP ISA one and one that was PnP and it actually dependent on the order in which the modules were loaded how those cards were named, however today you just have one network card, and if you have more that's all on the same bus, which will always be scanned the same way.

        The same goes for "multi user" features, particularly "multi seated" features. Yes, that used to be a cool feature back in the early 2000s, but today you can literally buy a Raspberry Pi acting as an X-Server for less than a special multiseat graphics card would set you back.

      3. bombastic bob Silver badge
        Trollface

        what do you mean 'dynamic hardware' ? Plugging USB stuff in?

        on FBSD I can configure the system to take specific actions when a USB device of a particular type is plugged in. I think you can do the same on a basic Linux system as well, particularly one without systemd on it. I haven't looked at this capability in a while, though.

        There's no advantage to running systemd. It's merely "this generation" doing things THEIR way, because it's THEIR TURN. It makes them *feel* important.

        [this is also how we ended up with 3 phone OSs, written and force-fed onto customers' desktop computers, being recently excreted out of Redmond - this generation saying "it's OUR turn to do it OUR way now!"]

        1. Vic

          on FBSD I can configure the system to take specific actions when a USB device of a particular type is plugged in. I think you can do the same on a basic Linux system as well, particularly one without systemd on it.

          Yes. Such things were a problem when I first started using Linux (about 17 years ago), but were fixed a very long time back. It's ancient history...

          Vic.

    2. Doctor Syntax Silver badge

      "I fully expect systemd to soon require it."

      I fully expect systemd to fork it and incorporate it.

    3. asdf

      systemd the cancer

      >Time to get rid of systemd.

      Even if you do use another init the way the systemd had wormed itself as being a dependency for an ever widening amount of FOSS if you don't currently require at least having it on your system now (or at least an ever more complicated shim) you will in two years tops.

      1. Anonymous Coward
        Anonymous Coward

        Re: systemd the cancer

        That's the bit that always confuses me. Why on earth should anything have a dependency on a particular init?

Page:

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

Other stories you might like