Losing swap after reboot
-
I have a workaround that works!
It's not an elegant fix, but it works for me. As the geometry of my hard drive partitions is not going to change, I'm going with this for now.
# /sbin/swapon -F /tmp/fstab.swap -a 2>/dev/null >/dev/null /sbin/swapon /dev/mirror/swap.eli /etc/rc.savecore
Which successfully activates my encrypted swap.
GEOM_MIRROR: Device mirror/swap launched (2/2). random: unblocking device. GEOM_ELI: Device mirror/swap.eli created. GEOM_ELI: Encryption: AES-XTS 128 GEOM_ELI: Crypto: software
-
What do you have in
/tmp/fstab.swap
? -
I am still getting the following in /tmp/fstab.swap
/dev/label/swap* none swap sw 0 0
One thing I didn't mention earlier is my setup is using CARP with two identical machines.
The problem exists on both machines. -
OK, I did not test the new swap device code with ZFS encrypted+mirrored swap. I'll have to setup a test environment and replicated it here.
https://redmine.pfsense.org/issues/9281
-
@jimp said in Losing swap after reboot:
OK, I did not test the new swap device code...
WHAT IS THIS, OPNSENSE??
(Meant only as a joke, mad respect for the hard work you guys put into all the testing you do)-|
-
I just committed a fix, should show up soon on the issue linked above.
-
Thanks for working on a fix.
I am assuming this will be rolled into the next round of updates. Do I need to do anything special? Will it just work after a reboot or will I need to reinstall (if the fix is in the install process)? -
If you add the fix as a patch using the system patches package, then you can just reboot and it will be active. You could turn it on by hand if you want, but rebooting is simpler.
If you wait for the next update then it will come in naturally and just work without any intervention.
-
I just want to report the patch is working here.
Vanilla 2.4.4-p2
2.4.4-p2 with Patch 14d470377eab89d7c3f6f765a150ce737409af28
2.4.4-p1 was Okay and broke in 2.4.4-p2
-Rico
-
It works great, thanks.