kpartx fails to map partitions (device-mapper: resume ioctl failed: Invalid argument)

Bug #605436 reported by Malte S. Stretz
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
multipath-tools (Debian)
Fix Released
Unknown
multipath-tools (Ubuntu)
Fix Released
Medium
Serge Hallyn
Precise
Won't Fix
Undecided
Unassigned
Quantal
Fix Released
Medium
Serge Hallyn

Bug Description

Binary package hint: multipath-tools

Under certain conditions kpartx fails to map partitions. You can try it with the image available here <http://m0n0.ch/wall/download.php?file=generic-pc-1.32.img>:

----8<----
root@Otherland:~/Work/m0n0# mv generic-pc-1.32.img generic-pc-1.32.img.gz
root@Otherland:~/Work/m0n0# gunzip generic-pc-1.32.img.gz

gzip: generic-pc-1.32.img.gz: decompression OK, trailing garbage ignored
root@Otherland:~/Work/m0n0# sfdisk -l generic-pc-1.32.img
Disk generic-pc-1.32.img: cannot get geometry

Disk generic-pc-1.32.img: 1 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start End #cyls #blocks Id System
generic-pc-1.32.img1 0 - 0 0 0 Empty
generic-pc-1.32.img2 0 - 0 0 0 Empty
generic-pc-1.32.img3 0 - 0 0 0 Empty
generic-pc-1.32.img4 * 0 3- 4- 25000 a5 FreeBSD
                end: (c,h,s) expected (3,28,41) found (1023,254,63)
generic-pc-1.32.img5 0+ 1- 2- 10232
root@Otherland:~/Work/m0n0# kpartx -v -a generic-pc-1.32.img
device-mapper: resume ioctl failed: Invalid argument
add map loop0p4 (0:0): 0 50000 linear /dev/loop0 0
----8<----

dmesg says:
device-mapper: table: 252:9: loop0 too small for target: start=0, len=50000, dev_size=20480

It seems like this is debian bug 586104 and fixed in newer versions of multipath-tools.

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: kpartx 0.4.8-14ubuntu4
ProcVersionSignature: Ubuntu 2.6.32-23.37-generic 2.6.32.15+drm33.5
Uname: Linux 2.6.32-23-generic x86_64
Architecture: amd64
Date: Wed Jul 14 16:06:53 2010
ProcEnviron:
 LANGUAGE=
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: multipath-tools

Revision history for this message
Malte S. Stretz (mss) wrote :
description: updated
Revision history for this message
Malte S. Stretz (mss) wrote :

I've got to correct myself: This is fixed by a Debian patch which is available here <http://git.debian.org/?p=pkg-lvm/multipath-tools.git;a=patch;h=858f733> (I haven't tried it though).

Changed in multipath-tools (Debian):
status: Unknown → Fix Released
Scott Moser (smoser)
Changed in multipath-tools (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Changed in multipath-tools (Ubuntu):
assignee: nobody → Serge Hallyn (serge-hallyn)
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

The patch listed in comment #2 is applied in precise and quantal, so the bug should be fixed. (The sample .img file in the description is also no longer available.)

Marking this 'fix released'. Please feel free to re-open if you can reproduce this bug.

Changed in multipath-tools (Ubuntu Quantal):
status: Triaged → Fix Released
Changed in multipath-tools (Ubuntu Precise):
status: New → Fix Released
Revision history for this message
Malte S. Stretz (mss) wrote :

Looks like this is still an issue in Precise (see below). You can find the most recent version of that image at http://m0n0.ch/wall/downloads.php (get the generic-pc-1.33.img). I can't judge about Quantal.

----8<----
root@slpn-nb-mss:~/Work/m0n0# kpartx -d -v generic-pc-1.33.img
loop deleted : /dev/loop0
root@slpn-nb-mss:~/Work/m0n0# kpartx -a -v generic-pc-1.33.img
device-mapper: resume ioctl failed: Invalid argument
create/reload failed on loop0p4
add map loop0p4 (0:0): 0 50000 linear /dev/loop0 0
root@slpn-nb-mss:~/Work/m0n0# dmesg | grep loop0
[ 3041.671498] device-mapper: table: 252:9: loop0 too small for target: start=0, len=50000, dev_size=20480
----8<----

Changed in multipath-tools (Ubuntu Precise):
status: Fix Released → Triaged
Revision history for this message
Steve Langasek (vorlon) wrote :

The Precise Pangolin has reached end of life, so this bug will not be fixed for that release

Changed in multipath-tools (Ubuntu Precise):
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.