diff --git a/main.sh b/main.sh index fa50975..f6fadd5 100644 --- a/main.sh +++ b/main.sh @@ -102,13 +102,13 @@ do_partition() { size=2048 parted -a optimal $TARGET_PHY_WWN unit mib -s -- mkpart primary ext4 $start $(( start + size )) start=$(( start + size )) - sync - sleep 3 mkfs.btrfs -f "${TARGET_PHY_WWN}-part1" TARGET_PART="2" fi parted -a optimal $TARGET_PHY_WWN unit mib -s -- mkpart primary ext4 $start -1s fi + sync + sleep 3 TARGETNAME=$(basename ${TARGET_PHY_WWN}-part${TARGET_PART}) TARGETNAME_UNDERSCORE=${TARGETNAME//-/_}