Where are "observable" paths like /home/ubuntu/foo.txt stored on a Linux EC2 instance with mounted EBS?

I have a basic EC2 instance with added EBS storage, mounted as /mnt/my-data following one of the AWS tutorials. Is everything that I don't put at /mnt/my-data/... stored on the small 8GB block that comes with the EC2 instance itself?

The reason I ask is that I installed quite a few Python libraries that take up some space (numpy, etc.) as well as mongodb. The installations themselves shouldn't be a problem, and everything is working. But once mongodb starts storing the data I'm wanting, I really need for the database itself to be on the big partition, and I'm assuming it's not the way I have it set up (using defaults for everything).

It would also be nice to be sure my log files go to the big partition rather than the small one.

Or is the situation simply this: Everything at root (/) except /mnt/my-data is on the small virtual disk. Everything that should go on the large EBS volume needs to be put in /mnt/my-data/....


Depending on your setup. But from what you have written it is the option with 'everything under /mnt/my-data' is in EBS, the rest is in ephemeral storage.

You might either change the mountpoint of EBS to contain your mongo database, or make a symlink (though I am not 100% sure mongo won't complain).

  • Having set everything up, I decided that the name /mnt/my-data is fairly stupid and longwinded. In another tutorial, they just recommend /data as mount point, which makes more sense to me just by virtue of being shorter, which is what one would like for the place where you're going to want to store everything you can. Amazon needs to clean up their tutorials, because once you do it that way, it's a pain in the butt to redo it a different way, and without prior experience, I typically try to follow the tutorial pretty exactly under the assumption that a thinking person wrote it. – Marshall Farrier Mar 17 '15 at 1:53
  • That seems a fair choice. Though I prefer using /srv for such things ... it's a little more standard. See en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard for some hints on what goes where. Of course this varies depending on your distro and personal taste. – Fox Mar 17 '15 at 8:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.