Search code examples
amazon-web-servicesamazon-ec2

AWS EC2 g5 - Mounting disk every time when starting the instance


Do we have to mount the inbuilt drives of AWS g5 instances, every time after starting and stopping the instance ?

In my case, it is unmounted every time after stopping and I will have to manually mount it on start. Is there a way to fix this ?


Solution

  • If you are manually running the mount command, then Linux will not re-mount that volume after you stop and restart the instance. The official guide for mounting instance store volumes in EC2 has a link at the bottom to the documentation for automatically mounting an attached volume after reboot. You have to add the volume to the Linux /etc/fstab configuration file in order for Linux to mount the volume automatically on boot.