Trouble with Secondary Volume Mounting on EC2

May 2, 2025 4 answers
Asked by PAVEMENT MARKINGS
I'm having a strange issue with my EC2 instance that has two volumes: one for the OS and web servers, and a secondary st1 volume for storing large data where I prefer lower throughput. Sometimes, I encounter an error message at startup: `/dev/nvme1n1: Can't open blockdev`. This problem usually resolves itself when I completely shut down the instance and start it again, but a simple reboot doesn't help. I suspect it might be related to a slow spin-up of the HDD after being down for a bit, but this has only become a frequent issue in the last couple of months. I'm looking for ideas on how to handle this without switching to an SSD, which I don't need for this application. Any advice would be greatly appreciated!

Answers

detour 29km
It sounds like there might be a timing issue during your instance's boot process where the NVMe driver isn't being loaded in sync with the device detection and volume mounting. What instance type are you using and which Linux distribution? Also, how are you setting up the volume mount in your OS configuration?
Reply to this answer
microscope slide
You might want to look into using delay mount scripts during the init process. That could help with timing issues as well.
Reply to this answer
fossilized footsteps
Just a heads up, st1 volumes do require a spin-up time compared to gp3 SSDs, which are instant. If gp3 is your root drive, ensure that you're not confusing the two types.
Reply to this answer
!field hockey stick
Consider writing a script that checks if the secondary volume has mounted after boot; if it hasn't, you could try to mount it again a few seconds later. That might solve your problem.
Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions