Skip to content

Commit

Permalink
Fix btrfs and xfs resize
Browse files Browse the repository at this point in the history
  • Loading branch information
Ratio2 authored and igorpecovnik committed Jul 1, 2024
1 parent c090ab8 commit d5df9f0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
5 changes: 5 additions & 0 deletions extensions/fs-btrfs-support.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions extensions/fs-xfs-support.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
;;
*)
Expand Down

0 comments on commit d5df9f0

Please sign in to comment.