Commit 172a87de authored by David Johnson's avatar David Johnson

Fix up mkextra calls in general; make sure sgdisk is installed.

parent 1690632f
......@@ -41,11 +41,26 @@ mkdir -p /storage
if [ -z "$LVM" ] ; then
LVM=1
VGNAME="openstack-volumes"
MKEXTRAFS_ARGS="-l -v ${VGNAME} -m util -z 1G"
MKEXTRAFS_ARGS="-l -v ${VGNAME} -m util -z 1024"
# On Cloudlab ARM machines, there is no second disk nor extra disk space
# Well, now there's a new partition layout; try it.
if [ "$ARCH" = "aarch64" ]; then
MKEXTRAFS_ARGS=""
LVM=0
maybe_install_packages gdisk
sgdisk -i 1 /dev/sda
if [ $? -eq 0 ] ; then
sgdisk -N 2 /dev/sda
if [ $? -eq 0 ] ; then
partprobe
# Add the second partition specifically
MKEXTRAFS_ARGS="${MKEXTRAFS_ARGS} -s 2"
else
MKEXTRAFS_ARGS=""
LVM=0
fi
else
MKEXTRAFS_ARGS=""
LVM=0
fi
fi
/usr/local/etc/emulab/mkextrafs.pl ${MKEXTRAFS_ARGS}
......
......@@ -43,15 +43,17 @@ mkdir -p /storage
if [ -z "$LVM" ] ; then
LVM=1
VGNAME="openstack-volumes"
MKEXTRAFS_ARGS="-l -v ${VGNAME} -m util -z 1G"
MKEXTRAFS_ARGS="-l -v ${VGNAME} -m util -z 1024"
# On Cloudlab ARM machines, there is no second disk nor extra disk space
# Well, now there's a new partition layout; try it.
if [ "$ARCH" = "aarch64" ]; then
maybe_install_packages gdisk
sgdisk -i 1 /dev/sda
if [ $? -eq 0 ] ; then
sgdisk -N 2 /dev/sda
partprobe /dev/sda
if [ $? -eq 0 ] ; then
partprobe
partprobe /dev/sda
# Add the second partition specifically
MKEXTRAFS_ARGS="${MKEXTRAFS_ARGS} -s 2"
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment