Skip to content
This repository was archived by the owner on Nov 23, 2017. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions create_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ sudo sed -i 's/.*ephemeral.*//g' /etc/cloud/cloud.cfg
sudo sed -i 's/.*swap.*//g' /etc/cloud/cloud.cfg

echo "mounts:" >> /etc/cloud/cloud.cfg
echo " - [ ephemeral0, /mnt, auto, \"defaults,noatime,nodiratime\", "\
echo " - [ ephemeral0, /mnt, auto, \"defaults,noatime\", "\
"\"0\", \"0\" ]" >> /etc/cloud.cloud.cfg

for x in {1..23}; do
echo " - [ ephemeral$x, /mnt$((x + 1)), auto, "\
"\"defaults,noatime,nodiratime\", \"0\", \"0\" ]" >> /etc/cloud/cloud.cfg
"\"defaults,noatime\", \"0\", \"0\" ]" >> /etc/cloud/cloud.cfg
done

# Install Maven (for Hadoop)
Expand Down
10 changes: 5 additions & 5 deletions setup-slave.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,24 @@ echo "Setting up slave on `hostname`... of type $instance_type"
if [[ $instance_type == r3* || $instance_type == i2* || $instance_type == hi1* ]]; then
# Format & mount using ext4, which has the best performance among ext3, ext4, and xfs based
# on our shuffle heavy benchmark
EXT4_MOUNT_OPTS="defaults,noatime,nodiratime"
EXT4_MOUNT_OPTS="defaults,noatime"
rm -rf /mnt*
mkdir /mnt
# To turn TRIM support on, uncomment the following line.
#echo '/dev/sdb /mnt ext4 defaults,noatime,nodiratime,discard 0 0' >> /etc/fstab
#echo '/dev/sdb /mnt ext4 defaults,noatime,discard 0 0' >> /etc/fstab
mkfs.ext4 -E lazy_itable_init=0,lazy_journal_init=0 /dev/sdb
mount -o $EXT4_MOUNT_OPTS /dev/sdb /mnt

if [[ $instance_type == "r3.8xlarge" || $instance_type == "hi1.4xlarge" ]]; then
mkdir /mnt2
# To turn TRIM support on, uncomment the following line.
#echo '/dev/sdc /mnt2 ext4 defaults,noatime,nodiratime,discard 0 0' >> /etc/fstab
#echo '/dev/sdc /mnt2 ext4 defaults,noatime,discard 0 0' >> /etc/fstab
if [[ $instance_type == "r3.8xlarge" ]]; then
mkfs.ext4 -E lazy_itable_init=0,lazy_journal_init=0 /dev/sdc
mount -o $EXT4_MOUNT_OPTS /dev/sdc /mnt2
fi
# To turn TRIM support on, uncomment the following line.
#echo '/dev/sdf /mnt2 ext4 defaults,noatime,nodiratime,discard 0 0' >> /etc/fstab
#echo '/dev/sdf /mnt2 ext4 defaults,noatime,discard 0 0' >> /etc/fstab
if [[ $instance_type == "hi1.4xlarge" ]]; then
mkfs.ext4 -E lazy_itable_init=0,lazy_journal_init=0 /dev/sdf
mount -o $EXT4_MOUNT_OPTS /dev/sdf /mnt2
Expand All @@ -57,7 +57,7 @@ fi

# Mount options to use for ext3 and xfs disks (the ephemeral disks
# are ext3, but we use xfs for EBS volumes to format them faster)
XFS_MOUNT_OPTS="defaults,noatime,nodiratime,allocsize=8m"
XFS_MOUNT_OPTS="defaults,noatime,allocsize=8m"

function setup_ebs_volume {
device=$1
Expand Down