From cc151f3f41455f291356495729aca0a5125b8f13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Zaoral?= Date: Wed, 18 Dec 2024 10:54:40 +0100 Subject: [PATCH] savelayout: error out on mounted multi-disk BTRFS filesystems ... because ReaR does not support this scenario at the moment. Related: https://github.com/rear/rear.github.com/pull/22#issuecomment-2540763985 Related: https://github.com/rear/rear/issues/2028 --- .../rear/layout/save/GNU/Linux/230_filesystem_layout.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/usr/share/rear/layout/save/GNU/Linux/230_filesystem_layout.sh b/usr/share/rear/layout/save/GNU/Linux/230_filesystem_layout.sh index 166b9cd2eb..15e1044034 100644 --- a/usr/share/rear/layout/save/GNU/Linux/230_filesystem_layout.sh +++ b/usr/share/rear/layout/save/GNU/Linux/230_filesystem_layout.sh @@ -231,6 +231,13 @@ fi echo -n " uuid=$uuid label=$label" ;; (btrfs) + # FIXME: Support for multi-disk BTRFS should be implemented sooner or later + # because it is the default layout for multi-disk Fedora Workstation installations. + # See: https://github.com/rear/rear/issues/2028 + if grep -qE 'Total devices ([2-9]|[1-9][0-9]+) ' <(btrfs filesystem show "$mountpoint"); then + Error "Mounpoint $mountpoint points to a BTRFS filesystem spanning multiple disk devices which is not yet supported. See: https://github.com/rear/rear/issues/2028" + fi + # Remember devices and mountpoints of the btrfs filesystems for the btrfs subvolume layout stuff below: btrfs_devices_and_mountpoints+=" $device,$mountpoint" uuid=$( btrfs filesystem show $device | grep -o 'uuid: .*' | cut -d ':' -f 2 | tr -d '[:space:]' )