- Newest
- Most votes
- Most comments
The /dev/nvme0n1 (and so on) naming convention is dictated by the storage device driver, which can be different across different instance families https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nvme-ebs-volumes.html
It's possible that previously you have worked with instances that are not Nitro instances, and so the /dev/xvdf convention would have been used on those.
You can hard-code the disk's UUID entry in to /etc/fstab, meaning that as long as the device is never replaced it will always be able to be referenced by the same name https://www.cyberciti.biz/faq/linux-finding-using-uuids-to-update-fstab/
For those that may find this, I wanted to be explicit-- in your fstab file, refer to the drive by its UUID. Don't use the "disk path" that Lightsail gives you.
Ex:
lsblk -f
Look for the storage disk (ex: nvme1n1), but you want to copy its UUID. Ex: 9b39294-4932baf30-b34ba...etc.
Now, to make sure it always mounts correctly on boot, refer to it by its UUID, not it's "disk path" at /dev/whatever.
sudo nano /etc/fstab
(add to the bottom:)
UUID=my_uuid_here /data ext4 defaults,nofail 0 2
This would mount the drive at /data. Replace that with whatever directory you want to mount it at.
answered 5 months ago
Relevant content
asked 6 months ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated 2 years ago
