Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Block devices called loops

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
Sadrax
Posts: 9
Joined: 2021-09-22 07:30
Location: Poland

Block devices called loops

#1 Post by Sadrax »

Hi,
I used the command "lsblk" on my Debian GNU/Linux in order to see my block devices, but I noticed that there are some devices called loops. What are they and what is the purpose to keep them on the OS? I'll put a link to Imgur so that you could see the Terminal with the output. I'll be grateful for every helpful comment. Have a nice day! :D

https://imgur.com/a/dJMn2lw

User avatar
ticojohn
Posts: 1284
Joined: 2009-08-29 18:10
Location: Costa Rica
Has thanked: 21 times
Been thanked: 44 times

Re: Block devices called loops

#2 Post by ticojohn »

I'm not an expert, but those loop devices are files that have been mounted as devices. The following is quoted from a post at this url
https://unix.stackexchange.com/question ... n-mounting
Loop device is a device driver that allows you to mount a file that acts as a block device (a loop device is not actually a device type, it's an ordinary file).
So, all those snap packages have been mounted as block devices.
I am not irrational, I'm just quantum probabilistic.

Sadrax
Posts: 9
Joined: 2021-09-22 07:30
Location: Poland

Re: Block devices called loops

#3 Post by Sadrax »

ticojohn wrote: 2021-09-24 14:35 I'm not an expert, but those loop devices are files that have been mounted as devices. The following is quoted from a post at this url
https://unix.stackexchange.com/question ... n-mounting
Loop device is a device driver that allows you to mount a file that acts as a block device (a loop device is not actually a device type, it's an ordinary file).
So, all those snap packages have been mounted as block devices.
Are these snap packages essential for system? I can't remember if I installed snap or if snap is installed automatically.

steve_v
df -h | grep > 20TiB
df -h | grep > 20TiB
Posts: 1400
Joined: 2012-10-06 05:31
Location: /dev/chair
Has thanked: 79 times
Been thanked: 175 times

Re: Block devices called loops

#4 Post by steve_v »

Sadrax wrote: 2021-09-25 10:08Are these snap packages essential for system?
Snap shouldn't be essential in any way on Debian, but if you have installed software or themes with it, removing it will obviously break those.

Personally I consider snap to be gratuitous bloat, and a solution in search of a problem. It's also creeping into everything and being aggressively pushed by certain organisations I intensely dislike.

But you do you. It is becoming quite popular, and it is a relatively safe and sane way to get more recent application versions on Debian stable without mucking with sources and lousing up the system.
OTOH, it will waste a bunch of disk space, pollute the mount table with zillions of loops, and things installed with it will tend to open noticeably slower than those installed with apt.
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.

User avatar
ticojohn
Posts: 1284
Joined: 2009-08-29 18:10
Location: Costa Rica
Has thanked: 21 times
Been thanked: 44 times

Re: Block devices called loops

#5 Post by ticojohn »

Sadrax wrote: 2021-09-25 10:08 Are these snap packages essential for system? I can't remember if I installed snap or if snap is installed automatically.
Snap is NOT part of the default Debian installation, so you had to have installed those packages. :roll:
I am not irrational, I'm just quantum probabilistic.

seeker5528
Posts: 61
Joined: 2021-09-18 00:37
Been thanked: 2 times

Re: Block devices called loops

#6 Post by seeker5528 »

The problem that snap and flatpak solves is getting software that is not available in your distribution or that you want a newer version of than is available in your distribution in a managed way, without having to worry about dependencies.

Snaps are distributed as squashfs files so loop mounting is how the filesystem is accessed. So for every snap there will be a loop device. Additionally as you update the software there are 2 or 3 revisions kept so you can revert to the previous version, so even more loop devices. The number of revisions is an option and I don't know how many revisions are set for the packages that provide support for snap installations in Debian.

I run Debian unstable so none of the stuff I care about that is in in the Debian repositories is so far behind upstream that I feel compelled to go outside of the Debian repositories to get them, but I have installed 2 flatpaks for things that are not in the Debian repositories.

I don't have any snaps installed, so I can't really say what difference there is in load time of the applications, squashfs may provide some advantage there. With flatpak the first time I run an application after a reboot there is a long load time, then after that the application loads in a more normal-ish amount of time, until the next reboot. No loopmounts for the flatpak stuff.

Appimage is another alternative. Single executable file download, put it somewhere, run it, it's up to you to go back to the site you downloaded it from and check for updated appimages and dowload newer versions.

With all of these you have the question of who is doing the packaging, is it the developers of the applications or someone else and if it is someone else are they providing support for them.

User avatar
ticojohn
Posts: 1284
Joined: 2009-08-29 18:10
Location: Costa Rica
Has thanked: 21 times
Been thanked: 44 times

Re: Block devices called loops

#7 Post by ticojohn »

seeker5528 wrote: 2021-09-25 16:28 The problem that snap and flatpak solves is getting software that is not available in your distribution or that you want a newer version of than is available in your distribution in a managed way, without having to worry about dependencies.
......
......
......
With all of these you have the question of who is doing the packaging, is it the developers of the applications or someone else and if it is someone else are they providing support for them.
Ok. But my question is this: If you want all the lastest goodies, why install a distro (Debian) that is known to not have all the latest and greatest software specifically because it designed to provide stability, and then set about screwing with the stability by adding packages that aren't provided by, and maintained by the distro? And then people come here complaining about problems they are having. Sorry, but I don't have much empathy for those that cause problems with their distro by installing things that aren't part of the distro. Yeah yeah yeah, Debian provides the means for installing Snap packages, but that doesn't necessarily mean that it is a good thing to do. Just my opinion, but I'll stick with what Debian provides. No FrankenDebian here.
I am not irrational, I'm just quantum probabilistic.

Sadrax
Posts: 9
Joined: 2021-09-22 07:30
Location: Poland

Re: Block devices called loops

#8 Post by Sadrax »

ticojohn wrote: 2021-09-25 14:09
Sadrax wrote: 2021-09-25 10:08 Are these snap packages essential for system? I can't remember if I installed snap or if snap is installed automatically.
Snap is NOT part of the default Debian installation, so you had to have installed those packages. :roll:
https://imgur.com/a/22vSqTu

I haven't got Snap Package Manager on my Debian OS, so it's perhaps not possible that I installed it earlier.

Sadrax
Posts: 9
Joined: 2021-09-22 07:30
Location: Poland

Re: Block devices called loops

#9 Post by Sadrax »

ticojohn wrote: 2021-09-25 18:42
seeker5528 wrote: 2021-09-25 16:28 The problem that snap and flatpak solves is getting software that is not available in your distribution or that you want a newer version of than is available in your distribution in a managed way, without having to worry about dependencies.
......
......
......
With all of these you have the question of who is doing the packaging, is it the developers of the applications or someone else and if it is someone else are they providing support for them.
Ok. But my question is this: If you want all the lastest goodies, why install a distro (Debian) that is known to not have all the latest and greatest software specifically because it designed to provide stability, and then set about screwing with the stability by adding packages that aren't provided by, and maintained by the distro? And then people come here complaining about problems they are having. Sorry, but I don't have much empathy for those that cause problems with their distro by installing things that aren't part of the distro. Yeah yeah yeah, Debian provides the means for installing Snap packages, but that doesn't necessarily mean that it is a good thing to do. Just my opinion, but I'll stick with what Debian provides. No FrankenDebian here.
How is it possible to install snap packages without having Snap Package Manager?

https://imgur.com/a/22vSqTu

Sadrax
Posts: 9
Joined: 2021-09-22 07:30
Location: Poland

Re: Block devices called loops

#10 Post by Sadrax »

https://imgur.com/a/At6hQHj

Here is the link to Imgur, which shows all the apps I've installed up to now. I remember that I enabled the Snap and Flatpack support on the Software Manager Center and that's all what I have done.

seeker5528
Posts: 61
Joined: 2021-09-18 00:37
Been thanked: 2 times

Re: Block devices called loops

#11 Post by seeker5528 »

ticojohn wrote: 2021-09-25 18:42 Ok. But my question is this: If you want all the lastest goodies, why install a distro (Debian) that is known to not have all the latest and greatest software specifically because it designed to provide stability, and then set about screwing with the stability by adding packages that aren't provided by, and maintained by the distro?
There will always be those people who only equate stable to not crashing and fail to grasp the Debian definition of stable as it relates to Debian stable even after multiple attempts at explaining it to them.

People afflicted with FOMO have a decision to make, run Debian testing or unstable or switch to another distribution.Flatpaks and snaps are not a good way to satisfy FOMO.

I always cringe a little bit when people say they are mixing things together from different releases of Debian or installing things from testing or unstable in a released version of Debian. Even when it comes to installing things from unstable in testing I'm on the 'Choose a lane, damn it!!', side of the fence.

If you just have a need for a newer LibreOffice, OBS Studio, Kdenlive or need/want something not packaged for Debian, flatpaks and snaps are good for that, they are contained and separate from the distribution stuff so you can install them and not have a Frankendebian. There are limitations to flatpaks and snaps that are a result of the containment mechanisms and I don't know what all those are, but sometimes the answer to somebodies question will be that is a limitation of the flatpak containment or snap containment.

If somebody downloaded the source code for something and asked for help because they were having a problem getting the build environment set up and or figuring out what they needed to install to satisfy the build dependencies would you still have the same question about wanting the latest goodies and creating a Frankendebian?

Snap and flatpak have some momentum so complaining about people getting software that way isn't going to accomplish much except to alienate people who installed snaps or flatpaks.

If people have questions about them the best we can do is explain what they are, what they are good for, what they are not good for, and how the support equation changes for the software they got in snap or flatpak form. There are some limitations that are specific to flatpaks and snaps because of the containment mechanisms they use and I don't know all the limitations, but as these things become more well known those limitations can be explained to people.

The level of support people get from the forums is dependent on people visiting the forums who know the answer or are willing to help troubleshoot the problem. Independently of whether people got all their software from the Debian repositories or installed something from some other source, sometimes the the correct response will be to direct people the the official support forums for the software in question or some other forum for people who run the type of software in question. Some times the correct response will be change this Debian configuration or switch to this driver, or there is this other software not technically necessary for running the software in question, but if you want to use said software to perform this task or that task you need to install this or that to make it possible.

If somebody says they installed a flatpak or snap for something that requires jackd or has a jack option and they want to use it are you going to complain that they got the software from outside of the Debian repositories or are you going to direct them toward jackd, qjackctl and friends in the Debian repositories and help them understand how the jack stuff works?

Snaps have their own place in the filesystem, flatpaks have their own place in the filesystem, so theoretically there should be no reason you can't have the same thing installed as a flatpak, a snap, and from the Debian repositories at the same time, so from the perspective of support, sometimes the correct answer to a question will be install the version from the Debian repositories and make sure that works first and then worry about the snap or flatpak version.

Post Reply