I have a more concise method for showing this problem. When I try to
mount the partitions in an img file with kpartx 0.7.4-2ubuntu1, it
silently fails:

# First, fetch an image
$ wget 
https://cloud-images.ubuntu.com/bionic/20180124/bionic-server-cloudimg-amd64.img
...
$ sudo kpartx -v -l bionic-server-cloudimg-amd64.img 
loop deleted : /dev/loop0
$ sudo kpartx -v -s -a bionic-server-cloudimg-amd64.img 
$ ll /dev/mapper/
total 0
drwxr-xr-x  2 root root      60 Feb  2 20:03 ./
drwxr-xr-x 16 root root    3580 Feb  2 20:03 ../
crw-------  1 root root 10, 236 Feb  2 20:03 control


The same works with 0.6.4-5ubuntu1 (and it can even delete the loop device):

$ sudo kpartx -v -l bionic-server-cloudimg-amd64.img 
loop0p1 : 0 598525 /dev/loop0 3
loop deleted : /dev/loop0
$ sudo kpartx -v -s -a bionic-server-cloudimg-amd64.img
add map loop0p1 (253:0): 0 598525 linear 7:0 3
$ ll /dev/mapper
total 0
drwxr-xr-x  2 root root      80 Feb  2 20:08 ./
drwxr-xr-x 16 root root    3600 Feb  2 20:08 ../
crw-------  1 root root 10, 236 Feb  2 20:04 control
lrwxrwxrwx  1 root root       7 Feb  2 20:08 loop0p1 -> ../dm-0

$ sudo kpartx -v -d bionic-server-cloudimg-amd64.img 
del devmap : loop0p1
loop deleted : /dev/loop0
$ ll /dev/mapper
total 0
drwxr-xr-x  2 root root      60 Feb  2 20:13 ./
drwxr-xr-x 16 root root    3580 Feb  2 20:13 ../
crw-------  1 root root 10, 236 Feb  2 20:04 control

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1747044

Title:
  kpartx 0.7.4-2ubuntu1 in bionic does not remove loop devices

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/multipath-tools/+bug/1747044/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to