From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:49765) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJ65P-0007Wf-5L for guix-patches@gnu.org; Mon, 30 Mar 2020 21:53:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jJ65N-0004kS-TN for guix-patches@gnu.org; Mon, 30 Mar 2020 21:53:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52001) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jJ65N-0004kM-QA for guix-patches@gnu.org; Mon, 30 Mar 2020 21:53:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jJ65N-0001Ep-PG for guix-patches@gnu.org; Mon, 30 Mar 2020 21:53:01 -0400 Subject: [bug#40236] [PATCH] doc: Suggest Btrfs with compression instead of ext4 for root partition. Resent-Message-ID: From: Maxim Cournoyer References: <20200326083524.20275-1-mail@ambrevar.xyz> Date: Mon, 30 Mar 2020 21:52:43 -0400 In-Reply-To: <20200326083524.20275-1-mail@ambrevar.xyz> (Pierre Neidhardt's message of "Thu, 26 Mar 2020 09:35:24 +0100") Message-ID: <87h7y5z3x0.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Pierre Neidhardt Cc: 40236@debbugs.gnu.org Hi! Pierre Neidhardt writes: > * gnu/system/examples/desktop.tmpl: Adjust root file-system to use Btrfs. > --- > gnu/system/examples/desktop.tmpl | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/gnu/system/examples/desktop.tmpl b/gnu/system/examples/desktop.tmpl > index 3931bad60d..e61e8064cd 100644 > --- a/gnu/system/examples/desktop.tmpl > +++ b/gnu/system/examples/desktop.tmpl > @@ -34,7 +34,8 @@ > (list (file-system > (device (file-system-label "my-root")) > (mount-point "/") > - (type "ext4") > + (type "btrfs") > + (options "subvol=rootfs,compress=zstd") > (dependencies mapped-devices)) > (file-system > (device (uuid "1234-ABCD" 'fat)) I think Btrfs with compression is a fine, modern default of a file system, but we shall get a good samples of opinions (I expect a variety of them :-)) and common agreement before pushing this change. For those wondering about the benefits of having the root file system on a subvolume (named 'rootfs' in the proposed configuration), the following page [0] explains it as: [...] The above layout, which obviously serves as the system's "main" filesystem, places data directly within the top-level subvolume (namely everything for example /usr, that's not in a child subvolume) This makes changing the structure (for example to something more flat) more difficult, which is why it's generally suggested to place the actual data in a subvolume (that is not the top-level subvolume), in the above example, a better layout would be the following: toplevel (volume root directory, not mounted) \-- root (subvolume root directory, to be mounted at /) +-- home (subvolume root directory) +-- var (subvolume root directory) +-- www (subvolume root directory) +-- lib (directory) \-- postgresql (subvolume root directory) In short, it allows exposing just the subvolumes which should be visible, instead of everything. I've marked this blocked by 37305, which includes GRUB support for booting from a subvolume as well as documentation about Btrfs usage in Guix. [0] https://btrfs.wiki.kernel.org/index.php/SysadminGuide#Layout