Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: AppImages cause Loop Device mounting; can this be a cumulative problem?

  1. #1
    Join Date
    Jun 2017
    Location
    Australia
    Posts
    582

    Default AppImages cause Loop Device mounting; can this be a cumulative problem?

    Hi

    I've come to realise that each time i launch an AppImage, a Loop Device is mounted

    This is not the same AI that i'm using, but this user seems to have the same experience... https://discuss.pixls.us/t/gimp-2-9-5-appimage/1959/13 :
    I think this an unavoidable price to pay... as far as i understand it, the appimage is a compressed disk image. Each time it is launched the system needs to uncompress the image and mount it via a loop back device.
    My concern is that each time i've finished using the pgm & close it, the Loop Device remains mounted. Next time i run the AI, another Loop Device mounts... then another, then another. Sometimes Dolphin exhibits a long list of these in its lhs panel. Here, in the current TW session [ie, between reboots] i've only run it twice, & there's 2 LDs mounted [but other times i've seen 4, 5, 6...].


    My question is: sooner or later, will this apparently never-ending accumulation of mounted LDs cause TW any kind of problem?

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,113
    Blog Entries
    15

    Default Re: AppImages cause Loop Device mounting; can this be a cumulative problem?

    Hi
    If it's not clearing the loop device then to me it's a bug in the image (or the underlying process that starts app image?). You can check the kernel config, AFAIK default is 256.
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  3. #3
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    10,667
    Blog Entries
    1

    Default Re: AppImages cause Loop Device mounting; can this be a cumulative problem?

    if you need info on how to unmount and more, I wrote a Wiki that aggregates info from a number of loop device documentation and summarized

    https://en.opensuse.org/User:Tsu2/loop_devices

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  4. #4
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,633

    Default Re: AppImages cause Loop Device mounting; can this be a cumulative problem?

    I read your article and while I have no doubt it is all very true what you documented, but I am really interested in what the losetup is good for.

    I have read the man pages of mount an umount (well, in this case not from top to bottom, but specially what they say about loop devices).

    in man mount there is a special section about " THE LOOP DEVICE" where you can see that you can use mount for setting up the loop device (in most cases the defaults look fine to me) and the mounting of course.

    Likewise man umount has the --detach-loop option to do what it says after the unmounting.

    My question, what is the extra usage of losetup bringing?
    Henk van Velden

  5. #5
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,633

    Default Re: AppImages cause Loop Device mounting; can this be a cumulative problem?

    I did not read enough of man umount. It says:
    THE LOOP DEVICE

    The umount command will free the loop device (if any) associated with the mount, in case it finds the option 'loop=...' in /etc/mtab, or when the -d option was given. Any pending loop devices can be freed using 'losetup -d', see losetup(8).
    Thus it seems that you can do perfectly with mount and umount and that losetup is only needed when something goes wrong.
    Last edited by hcvv; 17-Oct-2017 at 10:48.
    Henk van Velden

  6. #6
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    10,667
    Blog Entries
    1

    Default Re: AppImages cause Loop Device mounting; can this be a cumulative problem?

    Another option is to simply configure your machine to set up more than 8 loop devices, that's only a default number.
    Of course, if you end up with a large number of loop devices mounted, it will
    - Use more resources
    - Will have to be unmounted eventually, possibly on shutdown which will mean that takes longer.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  7. #7
    Join Date
    Jun 2017
    Location
    Australia
    Posts
    582

    Default Re: AppImages cause Loop Device mounting; can this be a cumulative problem?

    Thanks Malcolm, tsu2 & Henk

    I'm not ignoring anyone here, but need time to digest the info herein & referenced, to understand it & what i should do.

    Quote Originally Posted by tsu2 View Post
    Another option is to simply configure your machine to set up more than 8 loop devices, that's only a default number.
    Of course, if you end up with a large number of loop devices mounted, it will
    - Use more resources
    - Will have to be unmounted eventually, possibly on shutdown which will mean that takes longer.

    TSU
    I do not Shutdown my Tower each night, but instead Suspend it, then Resume the next morning. If it was only up to me, i would only reboot weekly, given i do my TW zypper dups weekly. Sadly however, Tower rarely gets to the target 7 days Uptime, but instead maybe every 3 or 4 [maybe 5] days something goes wrong that either causes it to freeze & reboot itself, or freeze & need me to REISUB etc. I realise there's vast numbers of possible causes [some of which have been canvassed in previous threads], but now reading your comment here, i'd like to ask this... could these accumulating Loop Devices which "Use more resources", lead to some critical point in "resources" demand that causes the misbehaviour i described?

  8. #8
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,633

    Default Re: AppImages cause Loop Device mounting; can this be a cumulative problem?

    Quote Originally Posted by GooeyGirl View Post
    could these accumulating Loop Devices which "Use more resources", lead to some critical point in "resources" demand that causes the misbehaviour i described?
    I doubt this when you are up to a max of 8. I think the warning there is directly connected to when you do increase the max as he suggests as a possible solution (bypass).
    Henk van Velden

  9. #9
    Join Date
    Jun 2017
    Location
    Australia
    Posts
    582

    Default Re: AppImages cause Loop Device mounting; can this be a cumulative problem?

    That's good news then - thanks Henk.

  10. #10
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    10,667
    Blog Entries
    1

    Default Re: AppImages cause Loop Device mounting; can this be a cumulative problem?

    Quote Originally Posted by hcvv View Post
    I did not read enough of man umount. It says:

    Thus it seems that you can do perfectly with mount and umount and that losetup is only needed when something goes wrong.
    There are actually a variety of ways that loop devices are mounted...
    - Can be invoked in Grub to make a block device or file system available during bootstrap
    - Whenever you use a virtual disk file in any virtualization, it's mounted as a loop d4vice

    Similarly,
    As you reference the mount command can be used, but also as you note it's not as reliable or full an implementation as using losetup.

    For myself,
    I use losetup to remind me what kind of device is mounted... Unless there is a special need to use the mount command like in fstab, I prefer to keep track of my loop devices separately from others.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •