Commit 67ff1f9d authored by David Johnson's avatar David Johnson

Fix bugs in b9baf898.

parent b9baf898
......@@ -83,13 +83,13 @@ if [ $? -eq 0 -a "$COMPUTE_EXTRA_NOVA_DISK_SPACE" = "1" ]; then
mkfs.ext3 /dev/$VGNAME/nova
fi
mkdir -p /mnt/var-lib-nova
echo "/dev/$VGNAME/nova /mnt/var-lib-nova none defaults,bind 0 0" \
echo "/mnt/var-lib-nova /dev/$VGNAME/nova none defaults,bind 0 0" \
>> /etc/fstab
mount /mnt/var-lib-nova
chown nova:nova /mnt/var-lib-nova
rsync -avz /var/lib/nova/ /mnt/var-lib-nova/
mount -o bind /mnt/var-lib-nova /var/lib/nova
echo "/mnt/var-lib-nova /var/lib/nova none defaults,bind 0 0" \
echo "/var/lib/nova /mnt/var-lib-nova none defaults,bind 0 0" \
>> /etc/fstab
elif [ -e $ROOTDISK -a "$COMPUTE_EXTRA_NOVA_DISK_SPACE" = "1" ]; then
PART="${ROOTDISK}${ROOTPART}"
......
......@@ -72,14 +72,14 @@ if [ -z "$LVM" ] ; then
if [ $? -eq 0 ]; then
vgrename emulab $VGNAME
sed -i -re "s/^(.*)(\/dev\/emulab)(.*)$/\1\/dev\/$VGNAME\3/" /etc/fstab
fi
/usr/local/etc/emulab/mkextrafs.pl ${MKEXTRAFS_ARGS}
if [ $? -ne 0 ]; then
/usr/local/etc/emulab/mkextrafs.pl ${MKEXTRAFS_ARGS} -f
else
/usr/local/etc/emulab/mkextrafs.pl ${MKEXTRAFS_ARGS}
if [ $? -ne 0 ]; then
/usr/local/etc/emulab/mkextrafs.pl -f /storage
LVM=0
/usr/local/etc/emulab/mkextrafs.pl ${MKEXTRAFS_ARGS} -f
if [ $? -ne 0 ]; then
/usr/local/etc/emulab/mkextrafs.pl -f /storage
LVM=0
fi
fi
fi
fi
......
......@@ -43,9 +43,16 @@ fi
# First try to make LVM volumes; fall back to loop device in /storage. We use
# /storage for swift later, so we make the dir either way.
#
mkdir -p /storage
if [ -z "$LVM" ] ; then
# Check to see if we already have an `emulab` VG. This would occur
# if the user requested a temp dataset. If this happens, we simple
# rename it to the VG name we expect.
vgdisplay emulab
if [ $? -eq 0 ]; then
vgrename emulab $VGNAME
sed -i -re "s/^(.*)(\/dev\/emulab)(.*)$/\1\/dev\/$VGNAME\3/" /etc/fstab
LVM=1
elif [ -z "$LVM" ] ; then
LVM=1
VGNAME="openstack-volumes"
MKEXTRAFS_ARGS="-l -v ${VGNAME} -m util -z 1024"
......@@ -71,15 +78,6 @@ if [ -z "$LVM" ] ; then
fi
fi
# Check to see if we already have an `emulab` VG. This would occur
# if the user requested a temp dataset. If this happens, we simple
# rename it to the VG name we expect.
vgdisplay emulab
if [ $? -eq 0 ]; then
vgrename emulab $VGNAME
sed -i -re "s/^(.*)(\/dev\/emulab)(.*)$/\1\/dev\/$VGNAME\3/" /etc/fstab
fi
/usr/local/etc/emulab/mkextrafs.pl ${MKEXTRAFS_ARGS}
if [ $? -ne 0 ]; then
/usr/local/etc/emulab/mkextrafs.pl ${MKEXTRAFS_ARGS} -f
......
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