[Edit: Thanks to adrianmonk for correcting my math]
It’s surprisingly hard to find a definitive answer to the question of what happens with Linux block device names when you get past drive 26 (ie. counting from one, the first disk is /dev/sda and the 26th disk is /dev/sdz, what comes next?) I need to find out because libguestfs is currently limited to 25 disks, and this really needs to be fixed.
Anyhow, looking at the code we can see that it depends on which driver is in use.
For virtio-blk (/dev/vd*) the answer is:
| Drive # — | Name |
|---|---|
| 1 | vda |
| 26 | vdz |
| 27 | vdaa |
| 28 | vdab |
| 52 | vdaz |
| 53 | vdba |
| 54 | vdbb |
| 702 | vdzz |
| 703 | vdaaa |
| 704 | vdaab |
| 18278 | vdzzz |
Beyond 18278 drives the virtio-blk code would fail, but that’s not currently an issue.
For SATA and SCSI drives under a modern Linux kernel, the same as above applies except that the code to derive names works properly beyond sdzzz up to (in theory) sd followed by 29 z‘s! [Edit: or maybe not?]
As you can see virtio and SCSI/SATA don’t use common code to name disks. In fact there are also many other block devices in the kernel, all using their own naming scheme. Most of these use numbers instead of letters: eg: /dev/loop0, /dev/ram0, /dev/mmcblk0 and so on.
If disks are partitioned, then the partitions are named by adding the partition number on the end (counting from 1). But if the drive name already ends with a number then a letter p is added between the drive name and the partition number, thus: /dev/mmcblk0p1.




