Skip to content

Commit ab75773

Browse files
committed
Merge pull request #93 from dselivanov/branch-1.3
workaround for hi1.4xlarge instances (similar to r3)
2 parents 770941e + 56de800 commit ab75773

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

Diff for: setup-slave.sh

+12-4
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ instance_type=$(curl http://169.254.169.254/latest/meta-data/instance-type 2> /d
2626

2727
echo "Setting up slave on `hostname`... of type $instance_type"
2828

29-
if [[ $instance_type == r3* || $instance_type == i2* ]]; then
29+
if [[ $instance_type == r3* || $instance_type == i2* || $instance_type == hi1* ]]; then
3030
# Format & mount using ext4, which has the best performance among ext3, ext4, and xfs based
3131
# on our shuffle heavy benchmark
3232
EXT4_MOUNT_OPTS="defaults,noatime,nodiratime"
@@ -37,12 +37,20 @@ if [[ $instance_type == r3* || $instance_type == i2* ]]; then
3737
mkfs.ext4 -E lazy_itable_init=0,lazy_journal_init=0 /dev/sdb
3838
mount -o $EXT4_MOUNT_OPTS /dev/sdb /mnt
3939

40-
if [[ $instance_type == "r3.8xlarge" ]]; then
40+
if [[ $instance_type == "r3.8xlarge" || $instance_type == "hi1.4xlarge" ]]; then
4141
mkdir /mnt2
4242
# To turn TRIM support on, uncomment the following line.
4343
#echo '/dev/sdc /mnt2 ext4 defaults,noatime,nodiratime,discard 0 0' >> /etc/fstab
44-
mkfs.ext4 -E lazy_itable_init=0,lazy_journal_init=0 /dev/sdc
45-
mount -o $EXT4_MOUNT_OPTS /dev/sdc /mnt2
44+
if [[ $instance_type == "r3.8xlarge" ]]; then
45+
mkfs.ext4 -E lazy_itable_init=0,lazy_journal_init=0 /dev/sdc
46+
mount -o $EXT4_MOUNT_OPTS /dev/sdc /mnt2
47+
fi
48+
# To turn TRIM support on, uncomment the following line.
49+
#echo '/dev/sdf /mnt2 ext4 defaults,noatime,nodiratime,discard 0 0' >> /etc/fstab
50+
if [[ $instance_type == "hi1.4xlarge" ]]; then
51+
mkfs.ext4 -E lazy_itable_init=0,lazy_journal_init=0 /dev/sdf
52+
mount -o $EXT4_MOUNT_OPTS /dev/sdf /mnt2
53+
fi
4654
fi
4755
fi
4856

0 commit comments

Comments
 (0)