Skip to content

Commit

Permalink
fix some small issues with adding disks
Browse files Browse the repository at this point in the history
  • Loading branch information
psy0rz committed Jun 15, 2024
1 parent ecadaf6 commit 9beaf2d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion add-disk
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 0 additions & 3 deletions grow-disks
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions install/2-partition-disk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 9beaf2d

Please sign in to comment.