Many instances on EC2 (AWS) now have local SSD’s attached. The excellent ubuntu 14.04 imageÂ boots brilliantly on these and automatically formats and mounts any of the local SSD storage. However when the instance shuts down, reboots or gets migrated these SSD’s go away so you still need to use the persistent EBS storageÂ for most operations.
If you want to enable swap on the box, add the following to /etc/rc.local – it will create a 2gb swap file each boot on the local SSD and mount it:
dd if=/dev/zero of=/mnt/swapfile bs=1M count=2048
chmod 600 /mnt/swapfile
I’ve not yet figured out what the process is to format/mount these local disks on bootup it may well be easier to add this to them.