[Top][All Lists]

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

[bug#40236] [PATCH] doc: Suggest Btrfs with compression instead of ext4

From: Maxim Cournoyer
Subject: [bug#40236] [PATCH] doc: Suggest Btrfs with compression instead of ext4 for root partition.
Date: Mon, 30 Mar 2020 21:52:43 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)


Pierre Neidhardt <address@hidden> 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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]