Hello, I don't really understand what's going on, it seems that I can't setup a loop device if loop0 is already in use. If no loop is in use, everything works as expected: # LOOPDEV_DEBUG=1 losetup -f disk.img loopdev: [0x7fffaf57c898]: find_unused requested loopdev: [0x7fffaf57c898]: loop0 successfully assigned loopdev: [0x7fffaf57c898]: find_unused by loop-control [rc=0] loopdev: [0x7fffaf57c898]: set backing file=/root/diskt.img loopdev: [0x7fffaf57c898]: device setup requested loopdev: [0x7fffaf57c898]: setup: backing file open: OK loopdev: [0x7fffaf57c898]: open ok loopdev: [0x7fffaf57c898]: setup: device open: OK loopdev: [0x7fffaf57c898]: setup: LOOP_SET_FD: OK loopdev: [0x7fffaf57c898]: setup: LOOP_SET_STATUS64: OK loopdev: [0x7fffaf57c898]: setup success [rc=0] loopdev: [0x7fffaf57c898]: de-initialize loopdev: [0x7fffaf57c898]: iter: de-initialize However if loop0 is busy, it fails this way: # LOOPDEV_DEBUG=1 losetup -f disk.img loopdev: [0x7fff15a8da98]: find_unused requested loopdev: [0x7fff15a8da98]: loop1 successfully assigned loopdev: [0x7fff15a8da98]: find_unused by loop-control [rc=0] loopdev: [0x7fff15a8da98]: set backing file=/root/disk.img loopdev: [0x7fff15a8da98]: device setup requested loopdev: [0x7fff15a8da98]: setup: backing file open: OK loopdev: [0x7fff15a8da98]: open failed loopdev: [0x7fff15a8da98]: setup failed [rc=-6] losetup: failed to setup loop device: No such device or address loopdev: [0x7fff15a8da98]: de-initialize loopdev: [0x7fff15a8da98]: iter: de-initialize The weird thing is that loop1 is succesfully found/allocated but it failed during the open() of the device. strace shows: ... open("/dev/loop-control", O_RDWR) = 0 ioctl(0, 0x4c82, 0x3) = 1 ... open("/dev/loop1", O_RDWR) = -1 ENXIO (No such device or address) ... The loop min count for that system is 8 so it shouldn't be a problem to setup 2 loop devices and the trace shows that requesting a new loop works. One last details is that the system uses pretty old stuff: kernel 3.4.50, util-linux 2.21.1. Could anybody give me some help ? Thanks. -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html