From 9beaf2dfc872ef365dcafa928c18f6532810af0b Mon Sep 17 00:00:00 2001 From: Edwin Eefting Date: Sat, 15 Jun 2024 14:47:34 +0200 Subject: [PATCH] fix some small issues with adding disks --- add-disk | 2 +- grow-disks | 3 --- install/2-partition-disk.sh | 1 + 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/add-disk b/add-disk index 59733f6..5831a56 100755 --- a/add-disk +++ b/add-disk @@ -25,7 +25,7 @@ cd install #add to pool ZPOOL_DEV=`zpool list -P -L -H -v $INSTALL_ZPOOL|grep -v $INSTALL_ZPOOL|grep ONLINE|cut -f2|grep /|tail -1` -zpool attach $INSTALL_ZPOOL $ZPOOL_DEV $INSTALL_ZPOOL_DEV +zpool attach -f $INSTALL_ZPOOL $ZPOOL_DEV $INSTALL_ZPOOL_DEV zpool status diff --git a/grow-disks b/grow-disks index 4faca20..9676abb 100755 --- a/grow-disks +++ b/grow-disks @@ -15,9 +15,6 @@ for ZPOOL_DEV in $ZPOOL_DEVS; do DISK=`echo $ZPOOL_DEV | sed 's/p*[0-9]$//'` echo "ALPINEBOX: Repartitioning disk $DISK" - #sometimes the whole disk has an old label that confuses zfs after growing: - zpool labelclear -f $DISK &>/dev/null || true - #repartition sgdisk -d4 $DISK || true sgdisk -n4:0:0 -t4:BF00 $DISK diff --git a/install/2-partition-disk.sh b/install/2-partition-disk.sh index 5aa4349..30f77a1 100755 --- a/install/2-partition-disk.sh +++ b/install/2-partition-disk.sh @@ -24,6 +24,7 @@ sgdisk -n4:0:0 -t4:BF00 $INSTALL_DISK partx -u $INSTALL_DISK sync +sleep 3 mdev -s mkswap $INSTALL_SWAP_DEV