Bug#860894: kpartx: kpartx returns error even when loop device is deleted successfully
Ritesh Raj Sarraf
rrs at debian.org
Fri Apr 21 16:58:34 UTC 2017
Control: tag -1 +moreinfo
Hello Balint,
On Fri, 2017-04-21 at 15:00 +0200, Balint Reczey wrote:
> Sometimes kpartx reports errors during handling partition while at the
> end deleting the loop device succeeds:
>
You mention "Sometimes". Is it to assume that the issue is not persistently
reproducible ? What steps to follow if I were to reproduce this locally ?
> $ kpartx -v -d binary/boot/disk-uefi.ext4
> device-mapper: remove ioctl on loop0p1 failed: Device or resource busy
> del devmap : loop0p15
> del devmap : loop0p14
> loop deleted : /dev/loop0
> $
> # here we have $? != 0
> # (from: https://bugs.launchpad.net/ubuntu/+source/livecd-rootfs/+bug/1684090)
>
> Please find the patch attached which ignores earlier errors after loop
> deletion is done.
I tried it locally and cannot reproduce it.
rrs at learner:/tmp$ sudo kpartx -av foo.img
add map loop2p1 (254:6): 0 1024000 linear 7:2 2048
add map loop2p2 (254:7): 0 1071104 linear 7:2 1026048
2017-04-21 / 22:25:44 ♒♒♒ ☺
rrs at learner:/tmp$ sudo kpartx -v -d foo.img
del devmap : loop2p2
del devmap : loop2p1
loop deleted : /dev/loop2
2017-04-21 / 22:25:49 ♒♒♒ ☺
And I don't see the behavior wrong in what you shared, where partition 1 failed
to delete.
--
Ritesh Raj Sarraf | http://people.debian.org/~rrs
Debian - The Universal Operating System
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/pkg-lvm-maintainers/attachments/20170421/a8aa8148/attachment.sig>
More information about the pkg-lvm-maintainers
mailing list