minor numbers > 255 not supported

Bug #19625 reported by Ed L. Cashin
4
Affects Status Importance Assigned to Milestone
Ubuntu
Invalid
Medium
Unassigned

Bug Description

Synopsis: creating a device node with a minor number
  greater than 255 results in an incorrectly-numbered
  device node.

Example:
  root@makki:~/aoe-2.6-11 # mknod /tmp/testdev b 152 256
  root@makki:~/aoe-2.6-11 # ls -l !^
  ls -l /tmp/testdev
  brw-r--r-- 1 root root 153, 0 2005-08-11 15:55 /tmp/testdev

The 2.6 kernel eliminated the old limit of 256 different
possible values for minor device numbers by adding more
bits for the minor number. With twenty bits for the minor
number, 1048576 different minor numbers are possible per
major number.

This feature is necessary for supporting the large number
of devices that todays systems can use. With network
storage, for example, it is common for one system to use
tens of disks.

Some software hasn't caught up to the new feature. During
this transitional period, Ubuntu users who are using ATA
over Ethernet (AoE) devices will have trouble using anything
but the first fifteen disks.

Revision history for this message
Alexandre Otto Strube (surak) wrote :

As stated at #ubuntu-devel, "its policy to create bigger minor numbers only when the 255 are used"

Revision history for this message
Lars (lars-taeuber) wrote :

Hi there,

there seems to be a bug in the aoe driver version 47q.
It can use only aoe devices with minor number less than 16.
An aoe target configured with e.g.
major = 2
minor = 16

is shown as

major = 3
minor = 0

(target e2.17 is shown as e3.1 on client and so on)

This seems to be true with ubuntu server 12.04.2 LTS amd64 running 3.2.0-39-generic.

Thanks
Lars

Revision history for this message
Ed L. Cashin (ecashin) wrote :

Lars, the v47q driver does not support many slots per shelf address, but v50 began to add flexibility for handling a greater range of AoE target numbers while retaining the support for multiple partitions per AoE device.

The v81 driver in the 3.8 kernel supports AoE (major, minor) address pairs like (2, 16). You can also download, build, and install the driver from the coraid.com website, and its backwards-compatibility system will backport the driver to older kernels.

For Ubuntu, they'd have to backport the v81 driver from later kernels on systems with kernels older than v3.8 in order to benefit from the more flexible use of minor numbers.

When I created this bug, it was to identify a problem with using mknod on Ubuntu. You simply couldn't create a device node at the time that worked with the large minor device numbers that the Linux kernel began to support in 2.6. Your problem is not the same as the one I described, but both problems need to be solved for you to have convenience and flexibility when using AoE. Both problems are solved in recent versions of the software, but I do not know what Ubuntu version will use a 3.8 kernel---I believe they're only up to 3.0-based kernels.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.