Cannot create more than 11 raw devices. WTF?

C&T: Video Games, Table Top Games & Computerized Stuff
Post Reply
Kreshna Aryaguna Nurzaman
Sick, Twisted Fuck
Posts: 1949
Joined: Thu Jun 09, 2005 2:37 pm
19
Location: MENTAL HOSPITAL
Contact:

#1 Cannot create more than 11 raw devices. WTF?

Post by Kreshna Aryaguna Nurzaman »

Well, just like in my previous post (this and [http://www.libriumarcana.com/phpBB2/vie ... php?t=3040]this[/url]), I'm still struggling with my RHEL 4 ES, installed on VMWare 5.5.1.

The virtual machine has 1024 Mb of RAM, while the server itself (where the virtual machine resides) has 1.5 Gb of RAM. The hard drive space allocated for the VMWare virtual machine is about 10 Gb.


I created twelve logical partition on an extended partition (/dev/sda5 to /dev/sda/16). The partition table is shown below:

Code: Select all

Command (m for help): p

Disk /dev/sda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1         653     5245191   83  Linux
/dev/sda2             654         914     2096482+  82  Linux swap
/dev/sda3             915        1305     3140707+   5  Extended
/dev/sda5             915         946      257008+  83  Linux
/dev/sda6             947         978      257008+  83  Linux
/dev/sda7             979        1010      257008+  83  Linux
/dev/sda8            1011        1042      257008+  83  Linux
/dev/sda9            1043        1074      257008+  83  Linux
/dev/sda10           1075        1106      257008+  83  Linux
/dev/sda11           1107        1138      257008+  83  Linux
/dev/sda12           1139        1170      257008+  83  Linux
/dev/sda13           1171        1202      257008+  83  Linux
/dev/sda14           1203        1234      257008+  83  Linux
/dev/sda15           1235        1266      257008+  83  Linux
/dev/sda16           1267        1305      313236   83  Linux

Then, using /etc/sysconfig/rawdevices, I mapped the raw devices accordingly:

Code: Select all

# This file and interface are deprecated.
# Applications needing raw device access should open regular
# block devices with O_DIRECT.
# raw device bindings
# format:  <rawdev> <major> <minor>
#          <rawdev> <blockdev>
# example: /dev/raw/raw1 /dev/sda1
#          /dev/raw/raw2 8 5
/dev/raw/raw1 /dev/sda5
/dev/raw/raw2 /dev/sda6
/dev/raw/raw3 /dev/sda7
/dev/raw/raw4 /dev/sda8
/dev/raw/raw5 /dev/sda9
/dev/raw/raw6 /dev/sda10
/dev/raw/raw7 /dev/sda11
/dev/raw/raw8 /dev/sda12
/dev/raw/raw9 /dev/sda13
/dev/raw/raw10 /dev/sda14
/dev/raw/raw11 /dev/sda15
/dev/raw/raw12 /dev/sda16

Naturally, the next thing I did was rebooting the system and executed raw -qa to query the raw devices. Oddly, all I got was only eleven raw devices instead of ten:

Code: Select all

[root@kreshna-redhat ~]# raw -qa
/dev/raw/raw1:  bound to major 8, minor 5
/dev/raw/raw2:  bound to major 8, minor 6
/dev/raw/raw3:  bound to major 8, minor 7
/dev/raw/raw4:  bound to major 8, minor 8
/dev/raw/raw5:  bound to major 8, minor 9
/dev/raw/raw6:  bound to major 8, minor 10
/dev/raw/raw7:  bound to major 8, minor 11
/dev/raw/raw8:  bound to major 8, minor 12
/dev/raw/raw9:  bound to major 8, minor 13
/dev/raw/raw10: bound to major 8, minor 14
/dev/raw/raw11: bound to major 8, minor 15
Well, that was certainly odd; where the fuck is /dev/raw/raw12?? :evil:


Then I rebooted the system and examined the booting messages, and here's what I got:

Code: Select all

           /dev/raw/raw1 --> /dev/sda5
/dev/raw/raw1: bound to major 8, minor 5
           /dev/raw/raw2 --> /dev/sda6
/dev/raw/raw2: bound to major 8, minor 6
           /dev/raw/raw3 --> /dev/sda7
/dev/raw/raw3: bound to major 8, minor 7
           /dev/raw/raw4 --> /dev/sda8
/dev/raw/raw4: bound to major 8, minor 8
           /dev/raw/raw5 --> /dev/sda9
/dev/raw/raw5: bound to major 8, minor 9
           /dev/raw/raw6 --> /dev/sda10
/dev/raw/raw6: bound to major 8, minor 10
           /dev/raw/raw7 --> /dev/sda11
/dev/raw/raw7: bound to major 8, minor 11
           /dev/raw/raw8 --> /dev/sda12
/dev/raw/raw8: bound to major 8, minor 12
           /dev/raw/raw9 --> /dev/sda13
/dev/raw/raw9: bound to major 8, minor 13
           /dev/raw/raw10 --> /dev/sda14
/dev/raw/raw10: bound to major 8, minor 14
           /dev/raw/raw11 --> /dev/sda15
/dev/raw/raw11: bound to major 8, minor 15
           /dev/raw/raw12 --> /dev/sda16
Cannot locate block device '/dev/sda16' (No such file or directory)
Cannot locate block device '/dev/sda16' (No such file or directory). Huh? WTF was that supposed to mean? When I query the partitions using fdisk, there is the /dev/sda16 partition. Why mapping it into raw device fails?


Oh, by the way, I'm not really sure whether it's irrelevant or not, but I also got this message when booting Linux:

Code: Select all

Uncompressing Linux... Ok, booting the kernel.
PCI: Cannot allocate resource region 4 of device 0000:00:07.1
audit(1160997070.293:0) initialized
Red Hat nash version 4.1.18 starting
sda: asking for cache data failed
sda: assuming drive cache: write through
INIT: version 2.85 booting
...etcetera.
The Sick, Twisted Fuck | Sap #2 of the Bitter Trio | Knight of the e-mail | Evil Liberal Conspirator | Esoteric Order of Dagon | Weird TGODer

Share your free D&D character here.

:welcome :arrow: :sheepfucker: :thumbsup

So be it. If saying "NO" means being alone, then to hell with love, with romance, with marriage, and all the shit life keeps pumping at me. I'll walk alone, but with freedom and a healed pride.

NEVER buy a LiteOn CD/DVD Writer. Ever.
User avatar
Destructionator XV
Lead Programmer
Posts: 2352
Joined: Sun Jun 12, 2005 10:12 am
19
Location: Watertown, New York
Contact:

#2

Post by Destructionator XV »

A little googling points me to something that seems relevant:
IBM linka
SCSI disk devices have special device files that start with an ‘sd’ prefix, and have the following naming format:
/dev/sd[a-z][a-z][1-15]
Names without a trailing digit refer to the whole disk, while names with a trailing digit refer to a partition of that whole disk. By convention, SCSI disks have a maximum of 16 minor numbers mapped to a single disk. Thus, for each whole disk, there is a maximum of 15 partitions per disk because one minor number is used to describe the entire disk (for example /dev/sda), and the other 15 minor numbers are used to refer to partitions for that disk (for example /dev/sda1, /dev/sda2, etc). Figure 1 displays the device files for the whole disk /dev/sda, which has a major number of 8 and a minor number of 0, and its 15 partitions.
The bolded part is what is more relevant here.

If that is right, you should also not be able to mount the 16th partition, and there would be no way around it without some serious kernel hacking.
Last edited by Destructionator XV on Sun Oct 15, 2006 10:53 pm, edited 1 time in total.
Adam D. Ruppe
Image Oh my hero, so far away now.....
Kreshna Aryaguna Nurzaman
Sick, Twisted Fuck
Posts: 1949
Joined: Thu Jun 09, 2005 2:37 pm
19
Location: MENTAL HOSPITAL
Contact:

#3

Post by Kreshna Aryaguna Nurzaman »

By convention, SCSI disks have a maximum of 16 minor numbers mapped to a single disk.
Ah, I see! So the limitation is the number of logical partitions in a single disk, am I correct? If I'm to create more than 16 partition (say, 20), then I'll need more than single disk (for instance, 1 to 15 on /dev/sda, 16 to 20 on /dev/sdb), am I correct?

Thanks!

By the way, haven't I told you how I hate development server so much?
The Sick, Twisted Fuck | Sap #2 of the Bitter Trio | Knight of the e-mail | Evil Liberal Conspirator | Esoteric Order of Dagon | Weird TGODer

Share your free D&D character here.

:welcome :arrow: :sheepfucker: :thumbsup

So be it. If saying "NO" means being alone, then to hell with love, with romance, with marriage, and all the shit life keeps pumping at me. I'll walk alone, but with freedom and a healed pride.

NEVER buy a LiteOn CD/DVD Writer. Ever.
User avatar
Destructionator XV
Lead Programmer
Posts: 2352
Joined: Sun Jun 12, 2005 10:12 am
19
Location: Watertown, New York
Contact:

#4

Post by Destructionator XV »

Kreshna Aryaguna Nurzaman wrote:Ah, I see! So the limitation is the number of logical partitions in a single disk, am I correct?
Yeah, it looks that way.
If I'm to create more than 16 partition (say, 20), then I'll need more than single disk (for instance, 1 to 15 on /dev/sda, 16 to 20 on /dev/sdb), am I correct?
Yup. If you have the extra disks to use, that should work.
Adam D. Ruppe
Image Oh my hero, so far away now.....
Post Reply