From 466380019645edc27e6a9f98f1ed37f703b97d37 Mon Sep 17 00:00:00 2001 From: bin456789 Date: Tue, 5 Dec 2023 22:29:48 +0800 Subject: [PATCH] =?UTF-8?q?core:=20=E4=BF=AE=E5=A4=8D=20nvme=20=E7=A3=81?= =?UTF-8?q?=E7=9B=98=E5=AE=89=E8=A3=85ubuntu=20=E6=9C=AA=E5=90=88=E5=B9=B6?= =?UTF-8?q?=20installer=20=E5=88=86=E5=8C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resize.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resize.sh b/resize.sh index d44c229..ffc9ded 100644 --- a/resize.sh +++ b/resize.sh @@ -37,7 +37,7 @@ fi # el7 的 lsblk 没有 --sort,所以用其他方法 # shellcheck disable=2012 part_num=$(ls -1v /dev/$xda* | tail -1 | grep -o '[0-9]*$') -part_fstype=$(lsblk -no FSTYPE /dev/$xda$part_num) +part_fstype=$(lsblk -no FSTYPE /dev/$xda*$part_num) # 扩容分区 # ubuntu 和 el7 用 growpart,其他用 parted @@ -52,7 +52,7 @@ update_part /dev/$xda # 扩容最后一个分区的文件系统 case $part_fstype in xfs) xfs_growfs / ;; -ext*) resize2fs /dev/$xda$part_num ;; +ext*) resize2fs /dev/$xda*$part_num ;; btrfs) btrfs filesystem resize max / ;; esac update_part /dev/$xda