Re: F33 BTRFS - Not enough swap space for hibernation [solved]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 8, 2020 at 5:53 AM Sreyan Chakravarty <sreyan32@xxxxxxxxx> wrote:
>
> On Mon, Dec 7, 2020 at 3:43 PM Chris Murphy <lists@xxxxxxxxxxxxxxxxx> wrote:
>>
>>
>> This isn't a great location for a swapfile on btrfs because you can't ever snapshot /.
>
>
> You never said why it was not possible to snapshot /.
>
> Why is that ?

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.


-- 
Chris Murphy
_______________________________________________
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



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux