!PSmBFWNKoXmlQBzUQf:helsinki-systems.de

Stage 1 systemd

81 Members
systemd in NixOs's stage 1, replacing the current bash tooling https://github.com/NixOS/nixpkgs/projects/5125 Servers

Load older messages


SenderMessageTime
9 Nov 2022
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgthat's why you want udev rules that update some metadata info06:35:40
@uep:matrix.org@uep:matrix.orgthere are two basic ways to do it: wait till everything's settled then probe once, or probe every time a new disk appears until something's importable06:36:24
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgnot exactly06:37:03
@uep:matrix.org@uep:matrix.orgwhich is probably going to take longer, especially for lots of spinning disks, the lookup can be slow06:37:08
@uep:matrix.org@uep:matrix.orgwell 3, but the third uses cached info from previous boot, with the issues as noted above06:37:48
@elvishjerricco:matrix.org@elvishjerricco:matrix.org You don't have to like... run zpool import to check every time a disk attaches. ZFS should ship with a tool that can read the labels and know what disks are necessary. Then there can just be a rule that fires when the last disk appears, and it says "hey pool FOO is available" 06:37:56
@uep:matrix.org@uep:matrix.org * there are two basic ways to do it as pure discovery: wait till everything's settled then probe once, or probe every time a new disk appears until something's importable06:38:13
@uep:matrix.org@uep:matrix.orgthat's roughly what I outlined above, yeah06:39:52
@uep:matrix.org@uep:matrix.orgbut that event may not fire; a disk might be missing. the pool can still be importable (degraded). So you wind up having both this, and the wait anyway06:40:54
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgYea, I think you'd want it to fire for each state change. "It's degraded." "It's available"06:41:17
@elvishjerricco:matrix.org@elvishjerricco:matrix.organd then the user can decide whether to try a degraded import06:41:26
@uep:matrix.org@uep:matrix.orgbroadly speaking not really worth it I think06:41:28
@uep:matrix.org@uep:matrix.orgOr rather, effort better spent into looking into why 9s of waiting is needed even after all devices have appeared.06:42:12
@uep:matrix.org@uep:matrix.orgbut even then, meh06:42:23
@uep:matrix.org@uep:matrix.orgfwiw, on my laptop there is no "udev settling time" in old stage1, and the prompt is almost instant. About to try it with systemd stage 1 too06:43:43
@elvishjerricco:matrix.org@elvishjerricco:matrix.org well old initrd definitely uses udev settle 06:44:10
@elvishjerricco:matrix.org@elvishjerricco:matrix.orghttps://github.com/NixOS/nixpkgs/blob/master/nixos/modules/system/boot/stage-1-init.sh#L25906:44:32
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgZFS stuff doesn't happen until after that06:44:42
@uep:matrix.org@uep:matrix.orgok, no messages about it, at least, and no delay06:45:12
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgYea I'd like to know what that's about...06:45:35
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgMaybe we just have too many udev rules in stage 1?06:45:44
@uep:matrix.org@uep:matrix.orgthere is an annoying pause waiting for a swap zvol to appear, after the passwd prompt06:46:20
@elvishjerricco:matrix.org@elvishjerricco:matrix.org (sidenote, you really don't want your swap on ZFS at all) 06:46:55
@uep:matrix.org@uep:matrix.orgah, damn, the laptop is doing a big update as part of the rebuild, may take a minute ore06:46:59
@uep:matrix.org@uep:matrix.orgyeah, I know. Bit of legacy issue there with too-small a real swap partition06:47:27
@uep:matrix.org@uep:matrix.orgthe zvol is lower priority and rarely gets hit06:47:58
@uep:matrix.org@uep:matrix.org(the pool and partitioning long pre-dates nixos, it was running ubuntu zfs for years)06:48:54
@uep:matrix.org@uep:matrix.orgok, very different timing on the laptop!06:50:06
@uep:matrix.org@uep:matrix.orgno wait for settling, and 🎉 no wait now for the zvol swap to appear, so faster boot overall06:50:33
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgwell that's good at least :)06:50:52

Show newer messages


Back to Room ListRoom Version: 6