This particular instance type mounts two ephemeral drives, in /dev/ and /mnt/. I have to create working directories for one of my services in these paths at startup or the services won't launch. Sometimes the script below works, sometimes it does not. I suspect it's a race between the folder being mounted, and my rc.local script kicking off. Is there a more reliable place I can create these directories? The last time I booted up, the /mnt/mongodb dir did get created, but the /dev/ one did not. I'm running the 12.04 HVM ubuntu instance from amazon.Here is my rc.local file:cd /mnt/sudo mkdir mongodbsudo chown -R mongodb mongodbsudo chgrp -R mongodb mongodbcd /dev/sudo mkdir mongodbsudo chown -R mongodb mongodbsudo chgrp -R mongodb mongodbsudo service mongodb startexit 0
Can't reliably create a directory on startup after ec2 instance mounts its ephemeral drives
ubuntu;startup;amazon ec2