Bug#884791: kpartx incompatible with loop.max_part

Nicolas Cavallari batchman at free.fr
Tue Dec 19 19:04:17 UTC 2017


Package: kpartx
Version: 0.6.4-5+b1
Severity: normal

Dear maintainer,

There is a problem with the current version of kpartx in Debian,
which is probably fixed upstream by commit 6ff376d43cadf934447,
released in version 0.7.2.

Having inserted the 'loop' module with option max_part=8
(modprobe loop max_part=8), a simple invocation of vmdeboostrap (1.8-1)
to create a disk image with one partition fails because of kpartx:

# vmdebootstrap --verbose --image=vmd1 --size=1G --arch=i386 --grub
Creating disk image
Creating partitions
EEEK! Something bad happened...
command failed: ['kpartx', '-avs', 'vmd1']
[...]

indeed, the kernel already created loop1p1, and kpartx is confused by
this situation, as it identifies that loop1p1 is the loop device
attached to vmd1, instead of loop1:

# kpartx -avs vmd1
device-mapper: reload ioctl on loop1p1p1  failed: Device or resource busy
create/reload failed on loop1p1p1
# kpartx -l vmd1
loop1p1p1 : 0 1949693 /dev/loop1p1 3

Not using the loop's max_part option can workaround the issue.
The upstream commit will probably cause kpartx to identify loop1 as
the correct loop device and overwrite loop1p1, working around the
problem.


-- System Information:
Debian Release: buster/sid
  APT prefers oldoldstable
  APT policy: (500, 'oldoldstable'), (500, 'unstable'), (500, 'oldstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.14.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to fr_FR.UTF-8), LANGUAGE=fr_FR.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to fr_FR.UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages kpartx depends on:
ii  dmsetup             2:1.02.145-4.1
ii  libc6               2.25-5
ii  libdevmapper1.02.1  2:1.02.145-4.1
ii  udev                236-1

kpartx recommends no packages.

kpartx suggests no packages.

-- no debconf information



More information about the pkg-lvm-maintainers mailing list