Home_greyopenFATE - openSUSE feature tracking > #305584
Dashboard | Search | Sign up | Login

Please login or register to be able to edit or vote this feature.

Do not assume fixed and contiguous device numbers in installation and management tools for storage

Feature state

Rejected Information


Subject: [Research] head up on upcoming extended block devt change 
From: Tejun Heo <tj@kernel.org>
Date: Thu, 18 Dec 2008 12:59:21 +0900
Reply-To: research@suse.de
Hello, all.
From soon to be released 2.6.28, the kernel contains extended block
devt support, which basically allocates block device numbers
dynamically from major number 259 (might expand to other major numbers
if ever necessary). This means that device numbers belonging to the
same device become non-contiguous and can be on different major
This will remove the 15 partition limit on /dev/sdX's and increase the
total number of supported SCSI disks considerably. Also, it's used by
md to allow partitioning of /dev/mdX's thus removing the distinction
of partitionable and non-partitionable md devices.
For example, /dev/sda with 60 partitions can look like as follows.
# cat /proc/partitions
major minor #blocks name
8 0 156290904 sda
8 1 8001 sda1
8 2 8032 sda2
8 3 8032 sda3
8 4 1 sda4
8 15 8001 sda15
259 0 8001 sda16
259 1 8001 sda17
259 2 8001 sda18
259 43 8001 sda59
259 44 8001 sda60
For detailed overview, please take a look at the following message.
As device node creation is completely dynamic these days, installed
systems usually can cope fine with this change; however, in
installation and management tools, there seem to be many places which
assume fixed and contiguous device numbers.
To ease hunting down those areas, a debug option is available which
forces every block device to be allocated on the dynamic major
non-consecutively. With the debug option turned on, the above disk
will look like the following.
# cat /proc/partitions
major minor #blocks name
8 0 156290904 sda
259 262144 8001 sda1
259 786432 8032 sda2
259 131072 8032 sda3
259 655360 1 sda4
259 393216 8001 sda5
259 917504 8001 sda6
259 65536 8001 sda7
259 114688 8001 sda55
259 638976 8001 sda56
259 376832 8001 sda57
259 901120 8001 sda58
259 245760 8001 sda59
259 770048 8001 sda60
So, the installation / management tools need to follow
/sys/block/*/device/driver to determine which type of device it is and
use /sys/block/*/dev to determine its device number.
I'll add a kernel parameter (say, block.force_ext_devt) so that this
debug option can be turned on and off during boot so that people who
don't work on related subsystems don't have to suffer.
I'm not sure how and when to proceed with this yet but I definitely
think we'll need plenty of time to sort this out completely. Any
ideas on how to proceed on this?


icons/user_comment.png T. H. wrote: (9 years ago)

So... when and how do we proceed with things like this? I wanna enable it in HEAD but SLES11 hasn't branched out from HEAD yet but I don't think we should wait till SLES11 is released.

icons/user_comment.png M. E. wrote: (9 years ago)

SLE 11 has precedence over anything else we currently do - with respect to focus and time spent on it. Thus we should concentrate on SLE 11 and wait with those changes after release of SLE 11. There are more than enough P1 and P2 issues with the SLE 11 kernel to work on, ... Vojtech?

icons/user_comment.png V. P. wrote: (9 years ago)

I agree, Matthias, and I see no reason why this couldn't wait until SLES11 branches out of HEAD.

icons/user_comment.png T. H. wrote: (9 years ago)

Alright, then. I'll enable it when SLES11 branches out. Thanks.

icons/user_comment.png T. H. wrote: (9 years ago)

Added genhd.mangle_devt parameter and enabled DEBUG_BLOCK_EXT_DEVT for all configs except for vanilla's and ppc/ps3. Ext major and mangled minor can be enabled by specifying "genhd.mangle_devt=1" as kernel parameter. Have fun. :-)

icons/user_comment.png C. T. wrote: (9 years ago)

Tejun, IIUC the options you put in, don't break anything unless genhd.mangle_devt=1 on kernel cmdline? We won't be able to complete the YaST part of this for 11.2.

icons/user_comment.png T. H. wrote: (9 years ago)

Yeap, the kernel will behave exactly the same as before if the parameter isn't specified. Also, we can disable DEBUG_BLOCK_EXT_DEVT when we're nearing SL112 release (maybe when we enter beta). For now, I'll leave it there in case someone wants to play with it. Maybe it's wise to schedule dev resource so that SL113 can have it implemented?

icons/user_comment.png A. S. wrote: (9 years ago)

I don't expect major problems from the mangled node numbers in YaST.

For the partitioner the main work is to change the maximal number of partitions for disks and
handling it everywhere (from lib to UI).

icons/user_comment.png A. S. wrote: (9 years ago)

During hackweek I have extended libstorage to read both "range" and "ext_range". A few tests with genhd.mangle_devt=1 showed
no problems and I was able to create 20 partitions on sda using YaST. The range is likely not handled correctly everywhere but testing
should be possible now.

Changes should be included in openSUSE 11.2 Milestone 5.

icons/user_comment.png J. S. wrote: (9 years ago)

Duncan, please, evaluate what needs to be done for SP1.

I don't think that many of YaST components deal with major/minor numbers; we should just ensure that bootloader only relies on data from partitioner, resp. perl-Bootloader initializes properly when invoked from a script.

icons/user_comment.png A. S. wrote: (8 years ago)

Backported by hackweek changes to YaST SLE11 SP1 branch.

Last change: 8 years ago
Score: 4
  • Negative: 0
  • Neutral: 0
  • Positive: 4
Feature Export
Application-xmlXML   Text-x-logPlaintext   PrinterPrint