Skip to content

Commit aceb1a6

Browse files
author
Dougal Ballantyne
committed
Fixing LVM volume create
1 parent cbd7993 commit aceb1a6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

bootstrap/src/scripts/boot_as_compute

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ sleep 10
6969
# Setup LVM
7070
pvcreate $PARTITIONS
7171
vgcreate vg.01 $PARTITIONS
72+
lvcreate -i $NUM_DEVS -I 64 -l 100%FREE -n lv_ephemeral vg.01
7273
if [ "$cfn_encrypted_ephemeral" == "true" ]; then
7374
mkfs -q /dev/ram1 1024
7475
mkdir -p /root/keystore
@@ -80,7 +81,6 @@ if [ "$cfn_encrypted_ephemeral" == "true" ]; then
8081
mkfs.xfs /dev/mapper/ephemeral_luks
8182
mount -v -t xfs -o noatime,nodiratime /dev/mapper/ephemeral_luks /scratch
8283
else
83-
lvcreate -i $NUM_DEVS -I 64 -l 100%FREE -n lv_ephemeral vg.01
8484
mkfs.xfs /dev/vg.01/lv_ephemeral
8585
echo "/dev/vg.01/lv_ephemeral /scratch xfs noatime,nodiratime 0 0" >> /etc/fstab
8686
mount -v /scratch
@@ -102,7 +102,7 @@ RC=0
102102
location=`curl --retry 3 --retry-delay 0 --silent --fail http://169.254.169.254/latest/meta-data/placement/availability-zone` || RC=1
103103
cd /etc/ganglia || RC=1
104104
/bin/cp -f /opt/cfncluster/templates/os/gmond.conf.COMPUTE gmond.conf || RC=1
105-
sed -i "s/<master>/$cfn_master/" gmond.conf || RC=1
105+
sed -i "s/<master>/${cfn_master}/" gmond.conf || RC=1
106106
sed -i "s/<location>/$location/" gmond.conf || RC=1
107107
chkconfig gmond on || RC=1
108108
service gmond start || RC=1

bootstrap/src/scripts/boot_as_master

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ sleep 10
8888
# Setup LVM
8989
pvcreate $PARTITIONS
9090
vgcreate vg.01 $PARTITIONS
91+
lvcreate -i $NUM_DEVS -I 64 -l 100%FREE -n lv_ephemeral vg.01
9192
if [ "$cfn_encrypted_ephemeral" == "true" ]; then
9293
mkfs -q /dev/ram1 1024
9394
mkdir -p /root/keystore
@@ -99,7 +100,6 @@ if [ "$cfn_encrypted_ephemeral" == "true" ]; then
99100
mkfs.xfs /dev/mapper/ephemeral_luks
100101
mount -v -t xfs -o noatime,nodiratime /dev/mapper/ephemeral_luks /scratch
101102
else
102-
lvcreate -i $NUM_DEVS -I 64 -l 100%FREE -n lv_ephemeral vg.01
103103
mkfs.xfs /dev/vg.01/lv_ephemeral
104104
echo "/dev/vg.01/lv_ephemeral /scratch xfs noatime,nodiratime 0 0" >> /etc/fstab
105105
mount -v /scratch

0 commit comments

Comments
 (0)