From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 3jHZHqscT2HcEwEAgWs5BA (envelope-from ) for ; Sat, 25 Sep 2021 14:57:15 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 6MPBGascT2FQUgAAbx9fmQ (envelope-from ) for ; Sat, 25 Sep 2021 12:57:15 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id ECDBE5AD8 for ; Sat, 25 Sep 2021 14:57:14 +0200 (CEST) Received: from localhost ([::1]:45398 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mU7Ew-0007V7-1y for larch@yhetil.org; Sat, 25 Sep 2021 08:57:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55292) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mU7Dn-0006Fa-QC for bug-guix@gnu.org; Sat, 25 Sep 2021 08:56:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:48844) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mU7Dm-0005bA-Ht for bug-guix@gnu.org; Sat, 25 Sep 2021 08:56:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mU7Dm-0003dd-BL for bug-guix@gnu.org; Sat, 25 Sep 2021 08:56:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#50788: Swapfile on Btrfs does not start at boot Resent-From: Brice Waegeneire Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 25 Sep 2021 12:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50788 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: John Kehayias Received: via spool by 50788-submit@debbugs.gnu.org id=B50788.163257450213910 (code B ref 50788); Sat, 25 Sep 2021 12:56:02 +0000 Received: (at 50788) by debbugs.gnu.org; 25 Sep 2021 12:55:02 +0000 Received: from localhost ([127.0.0.1]:60390 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mU7Cn-0003cD-T5 for submit@debbugs.gnu.org; Sat, 25 Sep 2021 08:55:02 -0400 Received: from relay12.mail.gandi.net ([217.70.178.232]:41411) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mU7Ck-0003bl-Oi for 50788@debbugs.gnu.org; Sat, 25 Sep 2021 08:54:59 -0400 Received: (Authenticated sender: brice@waegenei.re) by relay12.mail.gandi.net (Postfix) with ESMTPSA id 8E426200005; Sat, 25 Sep 2021 12:54:51 +0000 (UTC) From: Brice Waegeneire References: Date: Sat, 25 Sep 2021 14:54:47 +0200 In-Reply-To: (John Kehayias's message of "Fri, 24 Sep 2021 21:14:58 +0000") Message-ID: <877df4hl2g.fsf@waegenei.re> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: zaccysc@gmail.com, 50788@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1632574635; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=qpU+EVNxlBekM8ZWWZbHy7tOuOC/rSqsF6TOhGJcDt4=; b=iQCzxvzvAOta2K8W7/BejXmc67By9IfG4D2v9gqBfcWR6bGvirfofBBgWnIUCB9LyXpinN owAEFxW8mjc36SMBU1RMw4t5+gv5a/DdLTZX3KZjUt8lodffAHJ+J+dlAmkTih+f5fLCrt mJDtc3x51/CnjAxdkvRuneJ7Fa05ietkCxwKMIvsYU0Ptcmk0b2BkI1bohG7ld+1pB408+ wV9dlVk+VL18k3Zer5TtmnMweWBylFViwS/cLxz3UnkKRimAkLibHUFwXXkksbNdlV8VR5 sgQ+0WKgwh6dsoHT80wFAXhp1bZ+Xycmz+8ZaJ20mGqbXJ/gdGEb2RG6JHB+mA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1632574635; a=rsa-sha256; cv=none; b=UjqWb+lGesn1mK8qbIFDhBh8OUctfLpKWrSlRJLrYEJzl6LvORqJBAKtzg0BqmBukM/eFH 8cqbMvSwZqdiyIXATSz4MKxhiANe4aCHE8eEwdTiQFNum5QvPKLH9XJNM15teIAy4z2rHn 3PvGv4Q2N+LU+hU5S8UTW41qhY0W3JoXP7bK0j/yRDcddaupKNY34/0yaBohKvMTSE6uZ/ WH2XdnK1HWOd4mVSLpj9cxULwPzhicBEJQa1VkAidFfr6iLs2Fcqn+Mgx9q9OC46rurUCN 7d0nkSf3xBfbnUyqGftdf31Oo1bv+YcJWZ8trdi0G6dui3x8Ayjw6Q2ErBTg+w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -2.39 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: ECDBE5AD8 X-Spam-Score: -2.39 X-Migadu-Scanner: scn0.migadu.com X-TUID: arNzTghgcFUu Hello John and Zacchaeus, A month ago I open a thread in guix-devel titled =E2=80=9CUsing a swapfile = on btrfs for hibernation=E2=80=9D=C2=B9 describing in depth my setup about your specific= issue but it had no response so far. It should be detailled enought for you to reproduce a similar setup and if not I would like your feedbakc on it. John Kehayias writes: > This has been discussed a few times on #guix, with some having success, b= ut mostly it seems not. The issue is having a swapfile (maybe also for part= ition?) on Btrfs and swap not being activated on boot. In my case, I can ma= nually start with `sudo herd start swap-/swap/swapfile` and it will work fi= ne. 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: [...] > Checking the status of the service shows: [...] > This is the file-systems and swap part of my system configuration: Following are the same output as yours but from a working setup. --8<---------------cut here---------------start------------->8--- # dmesg [...] [ 6.393304] shepherd[1]: Service udev has been started. [ 6.431318] Adding 32488200k swap on /swap/swapfile. Priority:-2 extent= s:2 across:32706248k FS [ 6.433275] shepherd[1]: Service swap-/swap/swapfile has been started. [ 6.434347] shepherd[1]: Service user-file-systems has been started. [ 6.469352] shepherd[1]: Service file-system-/boot/efi has been started. [ 6.535679] shepherd[1]: Service file-system-/home has been started. [...] --8<---------------cut here---------------end--------------->8--- --8<---------------cut here---------------start------------->8--- # herd status swap-/swap/swapfile Status of swap-/swap/swapfile: It is started. Running value is #t. It is enabled. Provides (swap-/swap/swapfile). Requires (udev). Conflicts with (). Will not be respawned. --8<---------------cut here---------------end--------------->8--- Here are the file-systems and swap-devices fields of my operating-system: --8<---------------cut here---------------start------------->8--- (file-systems (append (list (file-system (mount-point "/boot/efi") (device (uuid "588A-2266" 'fat32)) (type "vfat")) (file-system (mount-point "/swap") (device (uuid "2ab8e658-5878-4acd-ba33-8a46707a3828" 'btrf= s)) (type "btrfs") (needed-for-boot? #t) (options "compress=3Dzstd,subvol=3Dswap"))) (hash-map->list (lambda (mount-point subvolume) (file-system (mount-point mount-point) (device (uuid "2ab8e658-5878-4acd-ba33-8a46707a3828" 'btrfs)) (type "btrfs") (options (string-append "compress=3Dzstd" ",subvol=3D" subvo= lume)))) (alist->hash-table '(("/" . "guix-system") ("/home" . "home") ;; ("/swap" . "swap") ("/mnt/btrfs-root" . "/")))) %base-file-systems)) (swap-devices (list "/swap/swapfile")) --8<---------------cut here---------------end--------------->8--- > Hope this is helpful in tracking down what is happening, I know I'm not a= lone in this issue. I think you are just missing =E2=80=9C(needed-for-boot? #t)=E2=80=9D on you= r swap subvolume, even tho you shouldn't need to have it mounted from the initramfs (except i= f you want to hibernate on your swapfile). On the thread previsouly cited=C2=B9,= I suggest two new records =E2=80=9Cswap-file=E2=80=9D and =E2=80=9Cswap-device=E2=80= =9D where it would make sense to add an additional =E2=80=9Cdependecies=E2=80=9D field, similar to the one in = =E2=80=9Dfile-system=E2=80=9D record, which would list the =E2=80=9Cfile-system=E2=80=9D to be mounted before act= ivating that swap file (or device). Hope it helps. =C2=B9 https://yhetil.org/guix/87zgt9nrmg.fsf@waegenei.re/ Cheers, - Brice