THX for this article BiX and all:
I'm not a Linux administrator only a user but can contribute so much to a had loop device problem:
When a virtual mounted image file (.iso) is not really cleanly removed from the file explorer (Dolphin/Nautilus).
You can unmount this virtual partition using the Prg "Disks" (under Service Prg's the disk management tool).
However, the ISO file will still remain as a loop in the device management list. For example, if you want to delete this ISO file reel from the disk, the deletion process will only take place virtually, and the corresponding storage space in MB or GB will not be free at all. The ISO file is no longer visible in Dolphin/Nautilus after the deletion, but the corresponding storage space requirement is not specified as free again; i.e. the information of the free and occupied storage space on the data carrier where this ISO file was is unchanged before and after the deletion.
A simple but unconventional solution is to reboot/start the computer.
But that can‘t not be the real solution!
The Linux shell losetup
, which is described in the man page, provides a remedy here:
losetup is used to associate loop devices with regular files or block devices, to detach loop devices and to query the status of a loop device. If only the loopdev argument is given, the status of the corresponding loop device is shown.
So you can use losetup -d /dev/loop0
to delete a file associated with a loop on dev/loop0(! "losetup -d" is just usable as admin., so you need to type sudo losetup -d
or wath the most LinuxGurus not fink fin, u have a so-terminal static open).
In the man page of losetup
you can see that the expression Delete
is not used here, but Solve
. Nevertheless, according to my example, that a "file is not deleted reel, despite clean unmount" after using the option -d, the file is only now deleted reel. (I'm not a Linux administrator but:) This is rather associated with an assignment of the loopNumber which is virtual, but becomes a real condition when mounting the iso-image (image).
Here the complete syntax to the shell losetup
:
https://linux.die.net/man/8/losetup
(I work on a bit corrupted linuxMint-18)
Translated from German with www.DeepL.com/Translator