On Wed, Dec 9, 2020 at 5:31 AM Chris Murphy <lists@xxxxxxxxxxxxxxxxx> wrote:
I referred you to man 5 btrfs about a list of limitations of swapfiles
on btrfs 10 days ago.
https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx/message/XF7YO27N2XPWGLPMPUN76VFT3RW2KFYS/
It's important to know all the limitations. Most people will find them
a non-issue. But...
Like, where should the swapfile go? I think maybe /var/swap could be a
nested subvolume, i.e. actually create the subvolume in /var/. That's
pretty straightforward, and is compatible with rpm-ostree systems
where root is read-only. The catch is if there's any kind of rollback
of sysroot (on the subvolume typically named "root") because if
/var/swap is a subvolume, then the snapshot of the "root" subvolume on
/ will stop at /var/swap. That's exactly what we want, to avoid
snapshotting it. But then on rollback of "root", /var/swap is just an
empty directory. So we need some intelligent handling up front, or at
the back end to find that older/pre-rollback /var/swap and move that
subvolume into the new position. Ick. Right?
However, it might be better to have a "swap" subvolume along with
"root" and "home" in the top-level of the file system. And add it to
fstab or maybe we can create a native systemd mount unit. Importantly
we have to have complete certainty that this mount happens before
swapon, or it'll fail. So we can't have races either. Now both issues
are fixed. It won't be snapshot if we snapshot "root". But if we
rollback a "root" snapshot, then the same "swap" subvolume always
mounts into the proper position at /var/swap with the same swapfile.
But that automatic solution is also kinda hidden. So no matter what
there's some kind of tradeoff. And that's the long answer for why it's
not the default yet, and also not even documented how to do a
post-install setup of swap. But it's on my todo.
Ok, I am out of ideas.
Have created the swap file in a different subvolume from my root.
I have also used btrfs_map_physical script to find the offset, but I am still getting
"Not enough swap space for hibernation."
What else can I do?
Regards,
Sreyan Chakravarty
_______________________________________________ users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx