[jaunty] /sys/module/nbd/parameters/max_part is 0, which prevents /dev/nbd0p* devices from getting created

Bug #342563 reported by Jamie Strandboge on 2009-03-13
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Medium
Tim Gardner
Jaunty
Medium
Tim Gardner

Bug Description

Running Jaunty, I can no longer mount my qcow2 disk images via ndb because the /dev/nbd0p* devices don't get created.

Steps to reproduce (need a kvm VM):
1. sudo qemu-nbd --connect=/dev/nbd0 disk.img

2. $ sudo nbd-client -c /dev/nbd0
10350 (this shows it is available)

3. sudo fdisk -l /dev/nbd0

Disk /dev/nbd0: 5368 MB, 5368709120 bytes
4 heads, 32 sectors/track, 81920 cylinders
Units = cylinders of 128 * 512 = 65536 bytes
Disk identifier: 0x0005ae68

     Device Boot Start End Blocks Id System
/dev/nbd0p1 1 62485 3999024 83 Linux
/dev/nbd0p2 62486 78110 1000000 82 Linux swap / Solaris

4. $ sudo mount /dev/nbd0p1 /mnt
mount: special device /dev/nbd0p1 does not exist

I'm putting this with linux, but it might be something else. Feel free to move it as needed. This was working up until yesterday.

ProblemType: Bug
Architecture: amd64
DistroRelease: Ubuntu 9.04
MachineType:

Package: linux-image-2.6.28-8-generic 2.6.28-8.28
ProcCmdLine: root=UUID=fa956e4f-1055-4969-aa6c-e3072e07b8f6 ro quiet splash
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.28-8.28-generic
SourcePackage: linux

Related branches

Jamie Strandboge (jdstrand) wrote :
Jamie Strandboge (jdstrand) wrote :

Still have the problem with linux-image-2.6.28-9-generic 2.6.28-9.29.

Jamie Strandboge (jdstrand) wrote :

Thanks to Soren Hansen for determining that /sys/module/nbd/parameters/max_part was set to 0. I'm not sure if the module was getting loaded before my script (which loads nbd with max_part=15) with the upstream default of '0' now and it wasn't before, but this fixes it for me:
$ sudo rmmod nbd
$ sudo modprobe nbd max_part=15

Changed in linux:
importance: Undecided → Wishlist
status: New → Confirmed
Changed in nbd:
importance: Wishlist → Undecided

This was previously changed by using an "options" line in a modprobe.d
file, however that practice is now deprecated. This is because module
names, option names, their values and even their current defaults can
all change inside the kernel and module-init-tools has never been kept
in sync.

In addition, changing the kernel means that the option change will apply
if the module is built in by users or the OEM team.

Bug: #342563

Signed-off-by: Scott James Remnant <email address hidden>
---
 drivers/block/nbd.c | 2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index 92d6c9f..e3db5c3 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -56,7 +56,7 @@ static unsigned int debugflags;

 static unsigned int nbds_max = 16;
 static struct nbd_device *nbd_dev;
-static int max_part;
+static int max_part = 15;

 /*
  * Use just one lock (or at most 1 per NIC). Two arguments for this:
--
1.6.0.5

A mistake on my part, I removed the modprobe options believing the default was already 16 after checking the kernel source, but I'd read the nbds_max default not the max_part

Kernel patch submitted to correct that ;)

Changed in linux (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Triaged
Tim Gardner (timg-tpi) wrote :
Changed in linux (Ubuntu Jaunty):
assignee: nobody → timg-tpi
milestone: none → ubuntu-9.04-beta
status: Triaged → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 2.6.28-10.33

---------------
linux (2.6.28-10.33) jaunty; urgency=low

  [ Scott James Remnant ]

  * SAUCE: nbd: Change default partitions per device to 15
    - LP: #342563

  [ Tejun Heo ]

  * SAUCE: libata: make sure port is thawed when skipping resets
    - LP: #269652

  [ Tim Gardner ]

  * Revert "SAUCE: Auto-load esp module when device opened."
    This driver performs unsafe ISA probes (according to Alan Cox).
  * Enable CONFIG_USB_GADGET_DUMMY_HCD
    This facilitates gadget slave endpoints in virtual environments.
  * Build ehci, uhci, and ohci into the i386/amd64 kernels
    - LP: #296710

  [ Upstream Kernel Changes ]

  * Add "thumbee" to the hwcap_str array
    - LP: #343602
  * Add HWCAP_NEON to the ARM hwcap.h file
    - LP: #343602
  * x86: mtrr: don't modify RdDram/WrDram bits of fixed MTRRs
    - LP: #292619

 -- Tim Gardner <email address hidden> Mon, 16 Mar 2009 08:19:53 -0600

Changed in linux:
status: Fix Committed → Fix Released
Michael Macnair (mmacnair) wrote :

This appears to be still present in Ubuntu 9.10 (2.6.32-02063204-generic SMP x86_64).
Workaround still works (rmmod, modprobe with max_part > 0)

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

Other bug subscribers