Skip to content

Instantly share code, notes, and snippets.

@aruseni
Created April 14, 2014 10:11
Show Gist options
  • Save aruseni/10634762 to your computer and use it in GitHub Desktop.
Save aruseni/10634762 to your computer and use it in GitHub Desktop.
Place /tmp and /var/tmp on EC2 instance store
# /etc/fstab
LABEL=cloudimg-rootfs / ext4 defaults 0 0
/dev/xvdb /mnt/is0 auto defaults,nobootwait,comment=instancestore0 0 2
/dev/xvdc /mnt/is1 auto defaults,nobootwait,comment=instancestore1 0 2
/mnt/is0/tmp /tmp none bind,noauto 0 0
/mnt/is0/var/tmp /var/tmp none bind,noauto 0 0
# /etc/rc.local
# Create directories on instance store
test -d /mnt/is0/tmp || mkdir -m 1777 /mnt/is0/tmp
test -d /mnt/is0/var/tmp || mkdir -p -m 1777 /mnt/is0/var/tmp
# Mount these directories
mount /tmp
mount /var/tmp
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment