this post was submitted on 31 Oct 2023
300 points (95.7% liked)

Linux

48072 readers
1 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 6 years ago
MODERATORS
 

Yet another win for Systemd.

all 35 comments
sorted by: hot top controversial new old
[–] Satelllliiiiiiiteeee@kbin.social 63 points 2 years ago (2 children)

Target disk mode is fantastic, I'm thrilled to see this coming to Linux

[–] stardreamer@lemmy.blahaj.zone 16 points 2 years ago* (last edited 2 years ago)

Worked in IT, target disk mode is a life saver when you have to recover data from a laptop with a broken screen/keyboard/bad ribbon cable and don't want to take apart something held together by glue.

[–] RaoulDook@lemmy.world 15 points 2 years ago

It's a nice feature. I used it a few times on old Macs with external FireWire hard drives for booting a different OS or troubleshooting.

[–] MigratingtoLemmy@lemmy.world 28 points 2 years ago (1 children)

I'm happy that this is coming to linux (I believe Nutanix has a great method to expose storage over IPs), but I would have liked if this was a bit more project/dependence agnostic.

[–] Kata1yst@kbin.social 10 points 2 years ago (1 children)

I mean, it specifically is giving support for booting disks over an existing protocol to systemd. That's pretty well within scope?

[–] MigratingtoLemmy@lemmy.world 4 points 2 years ago* (last edited 2 years ago) (2 children)

Oh, my gripe is not with Poettering creating a systemd service for it (for I cannot dispute that systemd wrappers such as this does make life somewhat easier), but I would have liked perhaps a more distribution agnostic method of running NVMe-TCP in a way that the OS would not have to be booted. I suppose I do understand the community's support for this: systemd is used by most of the popular distributions, and writing a service in it will enable systemd to maybe interleave this between other processes and perhaps fulfill the goal of producing a block device on an L3 network without booting userland.

As one can probably surmise, I do not have a great understanding of how the process works - will have to figure out how MacOS did it first, and then about how Poettering implemented it. I think I'll have a better idea of what the solution is geared towards.

Thanks for your comment!

[–] patatahooligan@lemmy.world 4 points 2 years ago (1 children)

I would have liked perhaps a more distribution agnostic method of running NVMe-TCP in a way that the OS would not have to be booted.

From the pull request:

This all requires that the target mode stuff is included in the initrd of course. And the system will the stay in the initrd forever.

I think that's as minimal a boot target as you can reasonably get, or in other words you're as far away from booting the OS as you can get.

So now the question is whether this uses any systemd-specific interfaces beyond the .service and .target files. If not, it should not take much effort to create a wrapper init script for the executable and run it on non systemd distros.

[–] MigratingtoLemmy@lemmy.world 2 points 2 years ago

Thanks, that makes it easy to understand. Indeed, it doesn't seem very dependent on systemd, which is great. I was aware that the project existed, and for a second thought that Poettering was trying to integrate it directly within systemd somehow whilst making improvements to it. I suppose that's not the case, which is good.

And you're correct, that is probably the easiest way to boot the minimum required resources.

Thanks.

[–] stella@lemm.ee 1 points 2 years ago

"Magic was meant to serve men, never to rule over them."

Pragmatism > all else.

[–] MonkderZweite@feddit.ch 19 points 2 years ago

Oh, another arm growing.

[–] woelkchen@lemmy.world 16 points 2 years ago

Link to the post (for accessibility and follow-up in the thread): https://mastodon.social/@pid_eins/111324093735348164

Pull request: https://github.com/systemd/systemd/pull/29748

[–] ramble81@lemm.ee 16 points 2 years ago (1 children)

Yay, yet another storage protocol over the network.

[–] TCB13@lemmy.world 17 points 2 years ago (1 children)

Not a storage protocol over the network, but yes :P

[–] ramble81@lemm.ee 1 points 2 years ago (1 children)

“ via NVMe-TCP (in case you wonder what that is: it's the new hot shit for exposing block devices over the network, kinda like iSCSI…”

So….?

[–] maryjayjay@lemmy.world 29 points 2 years ago* (last edited 2 years ago) (1 children)

The protocol already existed. This made it convenient to boot from it

[–] ramble81@lemm.ee -2 points 2 years ago (2 children)

So NVMe-TCP is yet another storage over network standard…. Regardless of making it work like this.

[–] maryjayjay@lemmy.world 9 points 2 years ago

I guess if you had your way we'd still be doing token ring over twin-ax. Whatever

[–] ReakDuck@lemmy.ml 5 points 2 years ago

I see no flaw in this logic

[–] kittenzrulz123@lemmy.ml 15 points 2 years ago

This seems like a win for almost all distros

[–] iamak 13 points 2 years ago (2 children)
[–] smo@lemmy.sdf.org 22 points 2 years ago (2 children)

"target disk mode", which this claims to be taking a lot of inspiration from, pretty much turns your computer into an external harddrive - so you can connect another machine to it for direct access. This appears to be trying to accomplish the same, but over the network.

If you've ever stuffed up a machine so badly that the best idea you could come up with, was to take the harddrive out and work on it from another machine - this pretty much allows you to do that. But instead of taking the drive out and putting it an external drive enclosure, you just ask the stuffed up machine to act as the external drive enclosure.

[–] kalessin@lemmy.world 3 points 2 years ago

Great answer

[–] iamak 1 points 2 years ago

Oh okay. Thanks for the simple explanation :)

[–] callyral@pawb.social 6 points 2 years ago (1 children)

same, i have no idea what any of that means and i use runit

[–] voidskull@lemmy.ml 2 points 2 years ago

runit gang !

[–] immibis@social.immibis.com 9 points 2 years ago (1 children)

@TCB13 @linux Everything is systemd in the future. This has nothing to do with systemd. It could as well have been called targetdiskd.

[–] TCB13@lemmy.world 13 points 2 years ago (2 children)

You assessment isn't entirely correct as this is indeed related to systemd. Read the PR https://github.com/systemd/systemd/pull/29748

[–] immibis@social.immibis.com 5 points 2 years ago (1 children)

@TCB13 services aren't systemd-related just because they are launched by systemd.

[–] lemann@lemmy.one 13 points 2 years ago

From what I see in the repo, this functionality is being built into systemd (in the same vein as something like systemd-resolved), and introduces a new target dedicated for the new feature.

Sure, you could probably rip it out and use it with your own init system, but that seems tedious to now scour the documentation to ensure your init system brings up the 'dependencies' launched at the preceeding systemd targets, so the NVMe TCP service can run.

Would be easier to just use another existing implementation IMO, most people running their own init systems probably want more than the bare minimum featureset offered by the services included in systemd's package

[–] patatahooligan@lemmy.world 0 points 2 years ago

How is it related? Is there something preventing the executable from running without systemd? Just providing a service and target file doesn't mean anything if it can run without them just fine. If it came with a reference init script instead I don't think people would be arguing that it's part of sysvinit and that sysvinit is bloated.

[–] andruid@lemmy.ml 3 points 2 years ago

So this is a service aimed at exposing disks as nvme-tcp boot targets on boot of the system? I mean I love it, I wonder if this could be used to help with a chicken and egg problem I've had with building clustered systems easier. So far I either need a running service to host a network file system (like NFS or CEPH), or I need local disks that bootstrap the clustered storage environment.

[–] lambalicious@lemmy.sdf.org 0 points 2 years ago

And why would this need systemd of all things? Should basically be doable over something like SSH / TFTP, right?