Mount /tmp in /mnt on EC2

Posted by Claudio Poli on Server Fault See other posts from Server Fault or by Claudio Poli
Published on 2012-09-14T21:39:01Z Indexed on 2012/09/14 21:39 UTC
Read the original article Hit count: 357

Filed under:
|
|
|

I was wondering what is the best way to mount the /tmp endpoint in the ephemeral storage /mnt on an EC2 instance and give the ubuntu user default write permissions.

Some suggest editing /etc/rc.local this way:

mkdir -p /mnt/tmp && mount --bind -o nobootwait /mnt/tmp /tmp

However that doesn't work for me.

I tried editing the fstab:

/dev/xvdb /tmp auto defaults,nobootwait,comment=cloudconfig 0 2

and giving it a umask=0777, however it doesn't work because of cloudconfig.

I'm using Ubuntu 12.04.

© Server Fault or respective owner

Related posts about ubuntu

Related posts about amazon-ec2