Subject: bug#50788: closed (Re: Swapfile on Btrfs does not start at boot)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 06 Feb 2022 20:21:01 +0000

Your bug report

#50788: Swapfile on Btrfs does not start at boot

which was filed against the guix package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
50788: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=50788
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: Swapfile on Btrfs does not start at boot
From: Josselin Poiret <[email-masked]>
To: [email-masked]
Date: Sun, 06 Feb 2022 21:20:27 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello,

swap-devices now include a dependencies system since
133a61ae263520378ac44482810d7adecfb017d9, see "(guix) Swap Space".

Closing.

-- 
Josselin Poiret

Subject: Swapfile on Btrfs does not start at boot
From: John Kehayias <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Fri, 24 Sep 2021 21:14:58 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi all,

This has been discussed a few times on #guix, with some having success, but mostly it seems not. The issue is having a swapfile (maybe also for partition?) on Btrfs and swap not being activated on boot. In my case, I can manually start with `sudo herd start swap-/swap/swapfile` and it will work fine. There might be an issue with when different filesystems are loaded with Btrfs subvolumes? I have my swap as a file on a subvolume.

>From syslog, just before and after the only "swap" related message:

Sep 23 13:09:31 localhost vmunix: [    9.424364] shepherd[1]: Service udev has been started.
Sep 23 13:09:31 localhost vmunix: [    9.424466] Unable to find swap-space signature
Sep 23 13:09:31 localhost vmunix: [    9.424912] shepherd[1]: Service user-file-systems has been started.
Sep 23 13:09:31 localhost vmunix: [    9.443245] shepherd[1]: Service file-system-/swap has been started.
Sep 23 13:09:31 localhost vmunix: [    9.454002] shepherd[1]: Service file-system-/var/log has been started.
Sep 23 13:09:31 localhost vmunix: [    9.464911] shepherd[1]: Service file-system-/home has been started.

Checking the status of the service shows:

  It is stopped.
  It is enabled.
  Provides (swap-/swap/swapfile).
  Requires (udev).
  Conflicts with ().
  Will not be respawned.

This is the file-systems and swap part of my system configuration:

  (file-systems (append
                 (list (file-system
                         (device (file-system-label "system"))
                         (mount-point "/")
                         (type "btrfs")
                         (flags '(no-atime))
                         (options "subvol=root,compress=lzo,ssd"))
                       (file-system
                         (device (file-system-label "system"))
                         (mount-point "/swap")
                         (type "btrfs")
                         (flags '(no-atime))
                         (options "subvol=swap,ssd"))
                       (file-system
                         (device (file-system-label "system"))
                         (mount-point "/gnu/store")
                         (type "btrfs")
                         (flags '(no-atime))
                         (options "subvol=gnu-store,compress=lzo,ssd"))
                       (file-system
                         (device (file-system-label "system"))
                         (mount-point "/var/log")
                         (type "btrfs")
                         (flags '(no-atime))
                         (options "subvol=var-log,compress=lzo,ssd"))
                       (file-system
                         (device (file-system-label "system"))
                         (mount-point "/home")
                         (type "btrfs")
                         (flags '(no-atime))
                         (options "subvol=home,compress=lzo,ssd"))
                       (file-system
                         (device (uuid "5989-F926" 'fat))
                         (mount-point "/boot/efi")
                         (type "vfat")))
                 %base-file-systems))
  (swap-devices (list "/swap/swapfile"))

Hope this is helpful in tracking down what is happening, I know I'm not alone in this issue.

John