increasing size of /tmp on EC2 instances
Solution 1:
With EBS-backed images, the ephemeral storage is still available, it just isn't mapped as a block device by default (as it is on instance-store images)
The amazon doc is here, and there's a useful blog post, here
In summary: you can specify this mapping on the command line when you launch the image, and then mount it as a normal volume on /dev/sd[x]
. Or you if you roll your own AMI, then you can bake the mapping into that AMI so that all images launched from it have access to it from the outset.
Symlinking /tmp
will work, but I wouldn't recommend it in this case, where you have a large amount of temporary storage in use. Once you have the device mapping available, you can have the device mounted as /tmp
in /etc/fstab
.
With a small instance, you should have 150GB of instance store available for free. It hoepfully goes without saying that this storage dies when the instance reboots. If your usage isn't that temporary, then you need to create your own, new EBS volume and mount it that way.
Solution 2:
You can bind the /tmp mount point to /mnt/tmp:
sudo mount -B /tmp /mnt/tmp