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!
4 Answers
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.
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.
You might want to look into using delay mount scripts during the init process. That could help with timing issues as well.
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?
Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures