Kpartx

From DWIKI

FAQ

What loopback devices are in use?

losetup

Release loopback device

First try

kpartx -d

then

losetup -d /dev/loop1

device-mapper: reload ioctl on loop1p2 (252:19) failed: Invalid argument