Closed axet closed 4 years ago
As of 1.17 we automatically fall back to manually zeroing the file (discussed in #23 implemented in https://github.com/Tookmund/Swapspace/commit/4e867cc94e5bb9b9ce7ef33a714c8956a41f68c2 )
In any previous versions after 1.14 the zero option should disable fallocate (https://github.com/Tookmund/Swapspace/commit/81afcbd31484f5fcb61ece41157254491e7dea40 )
The fallback logic in 1.17 should consistently error the first time it tries to create a swapfile but it should retry and succeed with the manual approach. If that’s not what you’re seeing, then there’s a major bug here.
Jacob
On Oct 18, 2020, at 10:57, axet notifications@github.com wrote:
Ubuntu bug report, not sure what is causing it.
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1894910
Can we have an option to use fallocate vs dd?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Adding "zero" into /etc/swapspace.conf works. I'm using 1.14 on debian (10) buster. kernel 5.8, and kernel 5.7 failed to create swap files for some reason. Ubuntu seems also affected, can be a kernel bug.
To clarify, the zero option solves the problem for both kernels on Debian and Ubuntu?
I've tested debian only. Yes it does solve the issue
Just tested Ubuntu 20.04 (LTS 5.4.0-53-generic), with BTRFS as root with compression enabled and "zero" option added in /etc/swapspace.conf:
swapspace 1.14-1
Jun 11 21:14:51 axet-laptop kernel: [ 2152.476784] BTRFS warning (device dm-0): swapfile must not be copy-on-write
Jun 11 21:14:55 axet-laptop systemd[1441]: tracker-store.service: Succeeded.
Jun 11 21:14:55 axet-laptop swapspace[15273]: Setting up swapspace version 1, size = 848,9 MiB (890126336 bytes)
Jun 11 21:14:55 axet-laptop swapspace[15273]: no label, UUID=beba3b5c-729d-49c3-80df-3fd790e30f32
Jun 11 21:14:55 axet-laptop swapspace[11788]: Error: Could not enable swapfile '1': Invalid argument
It failed, probably because BTRFS requires additional swap file configuration (truncate + compression off)
Full BTRFS support was added in 1.15. Could you please test with a newer version? Note that the zero option was removed in favor of automatic detection in 1.17.
Thanks. 1.15 works.
Ubuntu bug report, not sure what is causing it.
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1894910
Can we have an option to use fallocate vs dd?