I cannot reproduce this at will (tried and failed), but sometimes if I delete a file -that is attached to a loop device- first and try to detach it's loop device afterwards, it gives me a
loop: can't delete device /dev/loop0: Device or resource busy
error message. Of course
lsof
does not report any processes hanging on to the loop device or the deleted file. It'd be nice if
losetup
had a "force" switch ... or if this is a bug, it should be fixed.
P.S.: as mentioned, I could not reproduce the problem ... eg. the following code worked for me as expected:
dd if=/dev/urandom of=test.img bs=1M count=10
losetup /dev/loop0 test.img
rm test.img
losetup -d /dev/loop0
Recent comments
2 years 34 weeks ago
4 years 3 weeks ago
4 years 3 weeks ago
4 years 5 weeks ago
4 years 6 weeks ago
4 years 13 weeks ago
4 years 13 weeks ago
4 years 13 weeks ago
4 years 13 weeks ago
4 years 14 weeks ago