From 7059f379a4eefe27e29b3777dc3a0b9e21aceaf3 Mon Sep 17 00:00:00 2001 From: Justin Santa Barbara Date: Thu, 25 Jun 2015 15:30:01 -0400 Subject: [PATCH] AWS: Mount persistent disk as sdb on master --- cluster/aws/templates/setup-master-pd.sh | 5 +++-- cluster/aws/util.sh | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cluster/aws/templates/setup-master-pd.sh b/cluster/aws/templates/setup-master-pd.sh index b699f5bc847..09e8b142ab3 100644 --- a/cluster/aws/templates/setup-master-pd.sh +++ b/cluster/aws/templates/setup-master-pd.sh @@ -13,14 +13,15 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + # Format and mount the disk, create directories on it for all of the master's # persistent data, and link them to where they're used. # Mount Master Persistent Disk echo "Mounting master-pd" mkdir -p /mnt/master-pd -mkfs -t ext4 /dev/xvdh -echo "/dev/xvdh /mnt/master-pd ext4 noatime 0 0" >> /etc/fstab +mkfs -t ext4 /dev/xvdb +echo "/dev/xvdb /mnt/master-pd ext4 noatime 0 0" >> /etc/fstab # Contains all the data stored in etcd mkdir -m 700 -p /mnt/master-pd/var/etcd diff --git a/cluster/aws/util.sh b/cluster/aws/util.sh index 8f740b50be5..c0aaba7c528 100644 --- a/cluster/aws/util.sh +++ b/cluster/aws/util.sh @@ -55,7 +55,7 @@ MINION_SG_NAME="kubernetes-minion-${CLUSTER_ID}" # Be sure to map all the ephemeral drives. We can specify more than we actually have. # TODO: Actually mount the correct number (especially if we have more), though this is non-trivial, and # only affects the big storage instance types, which aren't a typical use case right now. -BLOCK_DEVICE_MAPPINGS="{\"DeviceName\": \"/dev/sdb\",\"VirtualName\":\"ephemeral0\"},{\"DeviceName\": \"/dev/sdc\",\"VirtualName\":\"ephemeral1\"},{\"DeviceName\": \"/dev/sdd\",\"VirtualName\":\"ephemeral2\"},{\"DeviceName\": \"/dev/sde\",\"VirtualName\":\"ephemeral3\"}" +BLOCK_DEVICE_MAPPINGS="{\"DeviceName\": \"/dev/sdc\",\"VirtualName\":\"ephemeral0\"},{\"DeviceName\": \"/dev/sdd\",\"VirtualName\":\"ephemeral1\"},{\"DeviceName\": \"/dev/sde\",\"VirtualName\":\"ephemeral2\"},{\"DeviceName\": \"/dev/sdf\",\"VirtualName\":\"ephemeral3\"}" function json_val { python -c 'import json,sys;obj=json.load(sys.stdin);print obj'$1'' @@ -724,7 +724,7 @@ function kube-up { # HTTPS to the master is allowed (for API access) authorize-security-group-ingress "${MASTER_SG_ID}" "--protocol tcp --port 443 --cidr 0.0.0.0/0" - master_volume_mapping="{\"DeviceName\": \"/dev/sdh\",\"Ebs\":{\"DeleteOnTermination\":false,\"VolumeSize\":${MASTER_DISK_SIZE},\"VolumeType\":\"${MASTER_DISK_TYPE}\"}}" + master_volume_mapping="{\"DeviceName\": \"/dev/sdb\",\"Ebs\":{\"DeleteOnTermination\":false,\"VolumeSize\":${MASTER_DISK_SIZE},\"VolumeType\":\"${MASTER_DISK_TYPE}\"}}" master_block_device_mappings="[${master_volume_mapping},${BLOCK_DEVICE_MAPPINGS}]" (