Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the loop devices don't get disassociated automatically when umounting #2

Open
zaoqi opened this issue Oct 19, 2019 · 0 comments
Open
Labels
bug Something isn't working

Comments

@zaoqi
Copy link
Owner

zaoqi commented Oct 19, 2019

schuhumi commented: (https://www.mobileread.com/forums/showpost.php?p=3885242&postcount=7)

I found out that the loop devices don't get disassociated automatically when umounting, you can check like this:

[root@kindle kual-linuxdeploy-armhf]# cat /sys/block/loop*/loop/backing_file 
/dev/mmcblk0p4
/mnt/us/extensions/kual-linuxdeploy-armhf/rootfs.img (deleted)
/mnt/us/extensions/kual-linuxdeploy-armhf/rootfs.img
/usr/share/X11/xkb.sqsh
/usr/java/lib/fonts.sqsh
/etc/kdb.src.sqsh
/usr/lib/locale.sqsh
/usr/share/keyboard.sqsh
/opt/var/local.sqsh
/mnt/us/extensions/kual-linuxdeploy-armhf/rootfs.img (deleted)
/mnt/us/extensions/kual-linuxdeploy-armhf/rootfs.img (deleted)

That for me leads to a) running out of loop devices at one point (max 16) b) storage doesn't get freed when deleting the umounted image (df -h). Thus I disassociate it manually:

LOOPDEV="$(mount | grep loop | grep /tmp/alpine | cut -d" " -f1)"
... umounts ...
losetup -d $LOOPDEV
@zaoqi zaoqi added the bug Something isn't working label Oct 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant