Skip to content

Commit

Permalink
savelayout: error out on mounted multi-disk BTRFS filesystems
Browse files Browse the repository at this point in the history
... because ReaR does not support this scenario at the moment.

Related: rear/rear.github.com#22 (comment)
Related: rear#2028
  • Loading branch information
lzaoral committed Dec 18, 2024
1 parent 40cbaaf commit cc151f3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions usr/share/rear/layout/save/GNU/Linux/230_filesystem_layout.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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:]' )
Expand Down

0 comments on commit cc151f3

Please sign in to comment.