Bug 137666
| Summary: | fdisk no longer allows creation of more than 16 logical partitions on an IDE disk | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 3 | Reporter: | greg hosler <greg> |
| Component: | util-linux | Assignee: | Elliot Lee <sopwith> |
| Status: | CLOSED DUPLICATE | QA Contact: | Ben Levenson <benl> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 3.0 | ||
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | i386 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2006-02-21 19:06:42 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
greg hosler
2004-10-30 12:13:33 UTC
I looked into the SRPM, and discovered, low and behold, the reason
for this bug is the following:
util-linux-2.11r-miscfixes.patch
has the following patch:
.
.
.
-#define MAXIMUM_PARTS 60
+#define MAXIMUM_PARTS 16
This is definately wrong. IDE's have up to 63 partitions. SCSI's are
limited to 15. Red Hat specifically delivers /dev/hda's with 32
inode's defined (hda, hda1 thru hda32), with the ability to create
from 32 thru 63 via mknod.
while I'll agree that 60 is alot to allow, it is legal, and 16 is
way to small a number for an all to common largish ide these days.
(especially when one goes to divide it up for multiple os's, or in
my case, multiple Red Hat installations. I'm a RHCX, and I need
multiple installations (test system, instructor system, exam system,
etc!)
that patch ought to be corrected to allow for more that 16 partitions...
16 is the limit for other devices such as SCSI ones, and there's no way to know what the limit is for a particular device, so the limit of 16 has to be global. *** This bug has been marked as a duplicate of 56244 *** 16 is NOT 'the limit for other devices, such as SCSI'. 15 is the
limit. At present, fdisk allows the creation of /dev/sda16, which is a
non-existant, non-addressable partition. (device node 8,16 is /dev/sdb,
not /dev/sda16)!
Truth be told, there *is* a way to tell the limit of a device, to the
extent that there is a way to get the inode of the device. While I am
not recommending this, one could fstat (or lstat) argv[1], and using
the major number, index into a hard coded table, that listed each of
the scsi major numbers, and for those set the limit to 15, and 63
otherwise. (or conversly, use the ide major numbers in the hard-coded
table). nearther option is particularly attractive. I detest hard
coded numbers in tables. Another possible solution is that given
device argv[1], see which of the partition inodes exist, and
minimally, allow the creation of partitions for any partition which
exists. (e.g. for (i=1; i<64; i++) {does argv[1]$i exist} Not perfect,
but certainly much better than an arbitrary cut-off, which happens to
be the wrong value anyway!
Thanks for pointing out the actual SCSI limit... As you stated, the ideas for finding the per-device limit are not that great. (The second one won't work quite right for devices such as the /dev/cciss/* ones.) parted appears to limit partition tables to 16 partitions, so I'm in good company. I can't see anywhere where it does a per-device limit. sfdisk seems to enforce no limit at all. Changed to 'CLOSED' state since 'RESOLVED' has been deprecated. |