Partition Filename Number Mismatch with Minor Number

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Following is a problem description, some observations, a question, and
some sample output:


PROBLEM
=======

I discovered the following problem while trying to add DMRAID support
to GParted:

When creating partitions and updating the /dev/mapper directory
entries, the last number of the partition filename often does not
match the partition minor number.

This causes difficulty in GParted because libraries such as libparted
appear to use the minor number when referencing a partition.

With SCSI or IDE devices, the partition minor numbers appear to always
be in the same order as the last number of the partition filenames.
In fact, the integer remainder of dividing the partition minor number by
the device minor number equals the last number of the partition
filename.
E.g.,
    last number of partition filename ==
         partition minor number % device minor number



OBSERVATIONS
============

My observations on the problem are as follows:

 * partition minor numbers appear to increase linearly in the order the
   partitions were created.

whereas:

 * Primary and extended partition filenames align to their respective
   position in the partition table.

 * Logical partition filenames are numbered in order according to the
   chain of Extended Boot Records (EBRs).


QUESTION
========

1) Would this problem be considered a bug?

   It would seem to me that the partition minor numbers should match
   the last number of the partition filename.  That is, at least when
   using the following formula:

    last number of partition filename ==
         partition minor number % device minor number


SAMPLE OUTPUT
=============

Following are some details and the sample output:

 * An MSDOS partition table was used.

 * The partitions were created in the order noted by the device minor
   numbers.

 * The command "kpartx -a /dev/mapper/isw_idedecefg_Txt" was used
   after each partition was created.


<---------- Begin Sample ---------->

gedakc@quad:/dev/mapper$ ll -l
total 0
drwxr-xr-x  2 root root     180 2009-03-13 14:01 ./
drwxr-xr-x 13 root root   14700 2009-03-13 14:01 ../
crw-rw----  1 root root  10, 63 2009-03-12 15:11 control
brw-rw----  1 root disk 254,  0 2009-03-13 14:01 isw_idedecefg_Tst
brw-rw----  1 root disk 254,  1 2009-03-13 13:55 isw_idedecefg_Tst1
brw-rw----  1 root disk 254,  2 2009-03-13 14:00 isw_idedecefg_Tst2
brw-rw----  1 root disk 254,  4 2009-03-13 14:01 isw_idedecefg_Tst3
brw-rw----  1 root disk 254,  3 2009-03-13 14:00 isw_idedecefg_Tst5
brw-rw----  1 root disk 254,  5 2009-03-13 14:01 isw_idedecefg_Tst6
gedakc@quad:/dev/mapper$ sudo fdisk -l -u isw_idedecefg_Tst

Disk isw_idedecefg_Tst: 159.9 GB, 159996968960 bytes
255 heads, 63 sectors/track, 19451 cylinders, total 312494080 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x0009635e

           Device Boot      Start         End      Blocks   Id  System
isw_idedecefg_Tst1              63     1044224      522081   83  Linux
isw_idedecefg_Tst2         1044225   280093274   139524525    5  Extended
isw_idedecefg_Tst3       280093275   296479574     8193150   83  Linux
isw_idedecefg_Tst5         1044288     2088449      522081   83  Linux
isw_idedecefg_Tst6         2088513     6281414     2096451   83  Linux
gedakc@quad:/dev/mapper$

<---------- End Sample ---------->

Regards,
Curtis Gedak

_______________________________________________
Ataraid-list mailing list
Ataraid-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/ataraid-list

[Index of Archives]     [Linux RAID]     [Linux Device Mapper]     [Linux IDE]     [Linux SCSI]     [Kernel]     [Linux Books]     [Linux Admin]     [GFS]     [RPM]     [Yosemite Campgrounds]     [AMD 64]

  Powered by Linux