From d5df9f06be9465a19e09c1ff6fed8985db77ea5d Mon Sep 17 00:00:00 2001 From: Aleksey Vasenev Date: Sun, 30 Jun 2024 20:33:33 +0300 Subject: [PATCH] Fix btrfs and xfs resize --- extensions/fs-btrfs-support.sh | 5 +++++ extensions/fs-xfs-support.sh | 5 +++++ .../bsp/common/usr/lib/armbian/armbian-resize-filesystem | 6 +++++- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/extensions/fs-btrfs-support.sh b/extensions/fs-btrfs-support.sh index 67cff837bd3f..be32c4d3f048 100644 --- a/extensions/fs-btrfs-support.sh +++ b/extensions/fs-btrfs-support.sh @@ -2,6 +2,11 @@ # Enable this extension to include the required dependencies for building. # This is automatically enabled if ROOTFS_TYPE is set to btrfs in main-config.sh. +function extension_prepare_config__add_to_image_btrfs-progs() { + display_alert "Adding btrfs-progs extra package..." "${EXTENSION}" "info" + add_packages_to_image btrfs-progs +} + function add_host_dependencies__add_btrfs_tooling() { display_alert "Adding BTRFS to host dependencies" "BTRFS" "debug" EXTRA_BUILD_DEPS="${EXTRA_BUILD_DEPS} btrfs-progs" # @TODO: convert to array later diff --git a/extensions/fs-xfs-support.sh b/extensions/fs-xfs-support.sh index f25c3329905c..6cf1d05cfc27 100644 --- a/extensions/fs-xfs-support.sh +++ b/extensions/fs-xfs-support.sh @@ -2,6 +2,11 @@ # Enable this extension to include the required dependencies for building. # This is automatically enabled if ROOTFS_TYPE is set to xfs in main-config.sh. +function extension_prepare_config__add_to_image_xfsprogs() { + display_alert "Adding xfsprogs extra package..." "${EXTENSION}" "info" + add_packages_to_image xfsprogs +} + function add_host_dependencies__add_xfs_tooling() { display_alert "Adding XFS to host dependencies" "XFS xfsprogs" "debug" EXTRA_BUILD_DEPS="${EXTRA_BUILD_DEPS} xfsprogs" # @TODO: convert to array later diff --git a/packages/bsp/common/usr/lib/armbian/armbian-resize-filesystem b/packages/bsp/common/usr/lib/armbian/armbian-resize-filesystem index d57fe7ed806c..88b2ca12b599 100755 --- a/packages/bsp/common/usr/lib/armbian/armbian-resize-filesystem +++ b/packages/bsp/common/usr/lib/armbian/armbian-resize-filesystem @@ -217,12 +217,16 @@ do_expand_filesystem() echo "Running 'resize2fs $partdev' now..." resize2fs $partdev ;; + xfs) + echo "Running 'xfs_growfs $mountpoint' now..." + xfs_growfs $mountpoint + ;; btrfs) echo "Running 'btrfs filesystem resize max $mountpoint' now..." btrfs filesystem resize max $mountpoint ;; nilfs2) - echo "Running 'nilfs2 filesystem resize max $mountpoint' now..." + echo "Running 'nilfs-resize -v -y $partdev' now..." nilfs-resize -v -y $partdev ;; *)