!PSmBFWNKoXmlQBzUQf:helsinki-systems.de

Stage 1 systemd

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

Load older messages


SenderMessageTime
9 Nov 2022
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgyea it'd be really nice to have better udev support from zfs06:26:13
@uep:matrix.org@uep:matrix.orgnothing zfs (that I can spot in the logs at least) happens before then, other than the modules getting loaded06:30:31
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgright, that's the problem :)06:30:43
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgZFS doesn't know how to know when a pool is ready to import06:30:51
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgso it just waits for all udev stuff to be done06:30:58
@elvishjerricco:matrix.org@elvishjerricco:matrix.org even though that's way more than necessary 06:31:05
@uep:matrix.org@uep:matrix.orgoh right06:31:06
@uep:matrix.org@uep:matrix.orgyeh, fair06:31:14
@uep:matrix.org@uep:matrix.orgthough at this point you don't really know what pools / devices you're waiting for, you could have an event that fires when all the device members of a pool have appeared by looking at the labels, but you don't actually want to import them anyway06:33:11
@uep:matrix.org@uep:matrix.org(they might be busy on another system with multi-attach, among other wrinkles)06:33:34
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgYea that's sort of the direction a fix would go in06:33:34
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgjust create some virtual info that tracks what pools have been noticed on devices, along with how import-able it is06:34:04
@uep:matrix.org@uep:matrix.orgto know which you might want to import, you'd need to basically parse or bundle in the cache file into the initrd.06:34:09
@elvishjerricco:matrix.org@elvishjerricco:matrix.organd have udev rules that keeps that info up to date06:34:12
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgwell and the initrd would still just hard code what pool it wants or something like that06:34:33
@elvishjerricco:matrix.org@elvishjerricco:matrix.organd use udev rules to wait for that pool to be ready06:34:43
@uep:matrix.org@uep:matrix.orgI mean it's basically a systemd generator for imports, similar to the one there now for mounts06:34:47
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgit would be if you knew the devices06:35:04
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgbut you don't, and shouldn't06:35:07
@uep:matrix.org@uep:matrix.orgbut it has to use data from the previous boot, which is of course fragile when you rebooted to change things06:35:21
@uep:matrix.org@uep:matrix.orgexactly06:35:27
@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

Show newer messages


Back to Room ListRoom Version: 6