| 28 Jan 2023 |
@elvishjerricco:matrix.org | Ok, I used their config and I see this:
resume # [ 0.948879] systemd[1]: Found device /dev/vda1.
resume # [ 0.949179] systemd[1]: Mounting /sysroot...
resume # [ 0.949847] systemd[1]: Starting Resume from hibernation using device /dev/vda1...
resume # [ 0.951809] systemd-hibernate-resume[115]: Could not resume from '/dev/vda1' (254:1).
| 22:37:33 |
@elvishjerricco:matrix.org | it doesn't say why it couldn't resume, so maybe I need to enable some debug output | 22:37:48 |
@elvishjerricco:matrix.org | but | 22:37:49 |
@lily:lily.flowers | Wait I've got another one. What if you made a swap partition but nuked that partition from the table and set an offset relative to the previous partition | 22:37:54 |
@elvishjerricco:matrix.org | the Mounting /sysroot thing is scary | 22:37:57 |
@lily:lily.flowers | In reply to @elvishjerricco:matrix.org the Mounting /sysroot thing is scary Yes | 22:38:02 |
@elvishjerricco:matrix.org | I mean, I've known about that ordering issue for a while | 22:38:13 |
@elvishjerricco:matrix.org | but it hasn't actually bitten any of my testing | 22:38:19 |
@elvishjerricco:matrix.org | maybe btrfs is smart enough to make it bite you | 22:38:28 |
@lily:lily.flowers | In reply to @lily:lily.flowers Wait I've got another one. What if you made a swap partition but nuked that partition from the table and set an offset relative to the previous partition (it would read in basically the same from the kernel's perspective as a swapfile, right?) | 22:38:34 |
@elvishjerricco:matrix.org | let me see what happens if I force a proper ordering... | 22:38:56 |
@elvishjerricco:matrix.org | In reply to @lily:lily.flowers Wait I've got another one. What if you made a swap partition but nuked that partition from the table and set an offset relative to the previous partition oh wow | 22:39:15 |
@elvishjerricco:matrix.org | brillian | 22:39:17 |
@elvishjerricco:matrix.org | * brilliant | 22:39:18 |
@lily:lily.flowers | In reply to @elvishjerricco:matrix.org let me see what happens if I force a proper ordering... It would be interesting to know if your branch for that fixes it. Because then they've been very lucky so far that it's failed to resume and they haven't lost data | 22:40:46 |
@elvishjerricco:matrix.org | My fsck PR does fix the ordering for file systems that systemd generates fsck units for, but only by happenstance. systemd-hibernate-resume@.service comes Before=local-fs-pre.target, but systemd is dumb and doesn't add After=local-fs-pre.target to initrd file systems. However, it does add it to fsck units | 22:42:04 |
@elvishjerricco:matrix.org | which is the only reason it works right upstream | 22:42:11 |
@lily:lily.flowers | In reply to @elvishjerricco:matrix.org which is the only reason it works right upstream Oh dear.... So things are only working by accident upstream right now? | 22:42:49 |
@elvishjerricco:matrix.org | essentially | 22:43:05 |
@elvishjerricco:matrix.org | I have a patch for that | 22:43:11 |
@lily:lily.flowers | That's horrifying | 22:43:12 |
@elvishjerricco:matrix.org | I have like three or four systemd patches that I need to properly evaluate and open a PR with | 22:43:36 |
@elvishjerricco:matrix.org | I need to go eat dinner before I try fixing the ordering thing | 22:44:46 |
@lily:lily.flowers | In reply to @elvishjerricco:matrix.org I need to go eat dinner before I try fixing the ordering thing Okay, I may take a closer look tomorrow too, depending on what you find out (not sure I'll have time/energy/motivation to debug deep linux arcana tonight) | 22:46:26 |
@elvishjerricco:matrix.org | Lily Foster: Yea, adding proper ordering fixes it :/ | 23:12:24 |
@elvishjerricco:matrix.org | ooohhh I see why it's an issue with swap files and not block devices | 23:27:15 |
@elvishjerricco:matrix.org | systemd-hibernate-resume@.service and sysroot.mount will compete for access to the same block device if swap is on a swap file | 23:27:55 |
@elvishjerricco:matrix.org | if swap is on another device you'll just get the silent scaries :P | 23:28:14 |
@elvishjerricco:matrix.org | let me see if the same happens with ext4 | 23:28:27 |
@lily:lily.flowers | In reply to @elvishjerricco:matrix.org
systemd-hibernate-resume@.service and sysroot.mount will compete for access to the same block device if swap is on a swap file Oh how nice... | 23:29:40 |