be me, 4 a.m., migrating a disk image on my homelab
dd if=backup.img of=/dev/sdb bs=4M"sdb is the new disk, I plugged it in a minute ago" it is not kernel reorders device names after reboot sdb is the data disk realise after 12 seconds Ctrl+C first 400 MB of the partition table and file system are gonetestdiskand a lot of praying recovered everything, except my sense of calm
What I do now, written on a sticky note on the monitor:
- Never trust
/dev/sdXnames. Uselsblk -o NAME,SIZE,MODEL,SERIALand/dev/disk/by-id/paths, which include the serial number. - Read the command out loud before pressing Enter.
- Unplug the disks you are not touching, if you can.
- And, as everyone says: have a backup you have actually restored.