]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
homed: default to "btrfs" as fs type in the LUKS backend
authorLennart Poettering <lennart@poettering.net>
Tue, 18 Aug 2020 13:11:06 +0000 (15:11 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 19 Aug 2020 13:46:07 +0000 (15:46 +0200)
Apparently both Fedora and suse default to btrfs now, it should hence be
good enough for us too.

This enables a bunch of really nice things for us, most importanly we
can resize home directories freely (i.e. both grow *and* shrink) while
online. It also allows us to add nice subvolume based home directory
snapshotting later on.

Also, whenever we mention the three supported types, alaways mention
them in alphabetical order, which is also our new order of preference.

man/homectl.xml
man/homed.conf.xml
shell-completion/bash/homectl
src/home/homectl.c
src/home/homed.conf
src/shared/user-record.c

index 0724749c07a43857d71b6cf26c1da908c3ab8f32..f2e98799304431ea7d993eae76038ac01828e2e0 100644 (file)
         <term><option>--fs-type=</option><replaceable>TYPE</replaceable></term>
 
         <listitem><para>When LUKS2 storage is used configures the file system type to use inside the home
-        directory LUKS2 container. One of <literal>ext4</literal>, <literal>xfs</literal>,
-        <literal>btrfs</literal>. If not specified
+        directory LUKS2 container. One of <literal>btrfs</literal>, <literal>ext4</literal>,
+        <literal>xfs</literal>. If not specified
         <citerefentry><refentrytitle>homed.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
         defines which default file system type to use. Note that <literal>xfs</literal> is not recommended as
         its support for file system resizing is too limited.</para></listitem>
index 2c5f3355d319d7cef26d45420f653028a7d2a8b5..d43a83de3eb81f688b660f83ebaccdef6e7cb607 100644 (file)
@@ -63,9 +63,9 @@
       <varlistentry>
         <term><varname>DefaultFileSystemType=</varname></term>
         <listitem><para>When using <literal>luks</literal> as storage (see above), selects the default file
-        system to use inside the user's LUKS volume. Takes one of <literal>ext4</literal>,
-        <literal>xfs</literal> or <literal>btrfs</literal>. If not specified defaults to
-        <literal>ext4</literal>. This setting has no effect if a different storage mechanism is used. The
+        system to use inside the user's LUKS volume. Takes one of <literal>btrfs</literal>,
+        <literal>ext4</literal> or <literal>xfs</literal>. If not specified defaults to
+        <literal>btrfs</literal>. This setting has no effect if a different storage mechanism is used. The
         file system type selected on the <command>homectl</command> command line always takes
         precedence.</para></listitem>
       </varlistentry>
index c2a9e610d155ad3392fe6297a7e2b9c9a4b4af93..1a1d5229667bb2d82a2015c8099c7c54b504bcc5 100644 (file)
@@ -139,7 +139,7 @@ _homectl() {
                 comps=$(cat /etc/shells)
                 ;;
             --fs-type)
-                comps='ext4 xfs btrsf'
+                comps='btrfs ext4 xfs'
                 ;;
             --cifs-user-name)
                 comps=$(compgen -A user -- "$cur" )
index 9d082ef0c05177f4ed9f92674032fbbce8365348..9e80a1d60f5b17e26ff3bf86bc096f9cf74b613a 100644 (file)
@@ -1956,7 +1956,7 @@ static int help(int argc, char *argv[], void *userdata) {
                "     --image-path=PATH        Path to image file/directory\n"
                "\n%4$sLUKS Storage User Record Properties:%5$s\n"
                "     --fs-type=TYPE           File system type to use in case of luks\n"
-               "                              storage (ext4, xfs, btrfs)\n"
+               "                              storage (btrfs, ext4, xfs)\n"
                "     --luks-discard=BOOL      Whether to use 'discard' feature of file system\n"
                "                              when activated (mounted)\n"
                "     --luks-offline-discard=BOOL\n"
index 6de75fc5ca297c773973a9e702f6cf6760caca33..1b5dbedabd5c3f9458c2fbd9e8f052c33fc54063 100644 (file)
@@ -13,4 +13,4 @@
 
 [Home]
 #DefaultStorage=
-#DefaultFileSystemType=ext4
+#DefaultFileSystemType=btrfs
index 678f04e53747ceec718d563164d4cf38fd746155..5d9fe84061d9cb002ffa792678ce1937e18539d9 100644 (file)
@@ -1581,7 +1581,7 @@ UserStorage user_record_storage(UserRecord *h) {
 const char *user_record_file_system_type(UserRecord *h) {
         assert(h);
 
-        return h->file_system_type ?: "ext4";
+        return h->file_system_type ?: "btrfs";
 }
 
 const char *user_record_skeleton_directory(UserRecord *h) {