Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a maximum amount of hard drives that one can connect to a 64-bit linux machine? I'm not concerned with practicality, as my situation involves a VM.

share|improve this question
Edited your question, since "mounts" are not quite the same thing as "hard drives". – Renan Mar 29 '12 at 18:50
Another way to ask this is "Could I attach, say, 147 file systems to my Linux machine? In other words, tell us what you are trying to accomplish and we can give you more practical answers. Unless this is an intellectual exercise only. – uSlackr Mar 29 '12 at 21:45
This is an intellectual exercise only. – monksy Jan 25 '13 at 23:09
up vote 8 down vote accepted

From this LinuxQuestions post:

Linux does not put arbitrary limits on the number of hard disks.

Also, from this post in the Debian mailing list:

That's easy. After /dev/sdz comes /dev/sdaa. And, I've just tested it by making and logging into 800 ISCSI targets on my laptop, after /dev/sdzz comes /dev/sdaaa. :)

and this blog post:

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!

So, theoretically there are limits, but in practice they are unreachable.

share|improve this answer
Surely there is a limit. – monksy Mar 29 '12 at 23:04
There is, but in practice it's almost unreachable. – Renan Mar 29 '12 at 23:29
Using hardware raid, the number of devices any kernel has access to may be greater than what can be seen. – Clearer Nov 21 '14 at 20:44

There is, in fact, a limit on the number of drives exposed by Linux's abstract SCSI subsystem, which includes SATA and USB drives. This is because device files are marked by major/minor device number pairs, and the scheme allocated for the SCSI subsystem has this implicit limit.

The following major opcodes are allocated: 8, 65 through 71, and 128 through 135, resulting in a total of 16 allocated blocks. The minor opcode is limited to 256 possible values (range 0..255). Each disk gets 16 consecutive minor opcodes where the first represents the entire disk and the next 15 represent partitions.

let major = number of major allocated opcodes = 16
let minor = number of minor opcodes per major opcode = 256
let parts = number of minor opcodes per disk = 16
major * (minor / parts) = 16 * (256 / 16) = 256 possible drives

I've previously seen people write 128 as the limit. I believe Linux more recently 128..135, which would explain the discrepancy.

The naming scheme (/dev/sdbz7) is chosen by userland, not by the Linux kernel. In most cases these are managed by udev, eudev, or mdev (though in the past they were created manually). I don't know their naming schemes. Don't necessarily rely on all Linux-based systems naming devices the same way, as the system administrator can modify the device naming policies.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.