Plainnotes

fstab will not mount after a disk move: the UUID changed

2024-10-05 · 2 min readSystems

A data disk moved between instances, fstab still names the old UUID, and the machine boots into emergency mode.

Names like /dev/vda and /dev/sdb are not stable, which is why fstab should use UUID or LABEL. Moving the disk changes the UUID.

blkid
lsblk -f

Test with mount -a before rebooting, and consider nofail so a missing disk does not block boot:

UUID=xxxx /data ext4 defaults,nofail 0 2

nofail is worth adding for anything non-essential, especially on cloud hosts — at least you can still SSH in and fix it.