-1

What are these empty (0B SIZE) read-write loop devices?

sudo lsblk --all
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
loop0    7:0    0    0B  0 loop 
loop1    7:1    0    0B  0 loop 
loop2    7:2    0    0B  0 loop 
loop3    7:3    0    0B  0 loop 
loop4    7:4    0    0B  0 loop 
loop5    7:5    0    0B  0 loop 
loop6    7:6    0    0B  0 loop 
loop7    7:7    0    0B  0 loop 
sda      8:0    0  100G  0 disk 
└─sda1   8:1    0  100G  0 part /
sudo mount | grep -i loop
sudo cat /proc/mounts | grep -i loop
sudo cat /etc/fstab | grep loop
sudo lsof /dev/loop0

No output.

sudo dmesg | grep loop
[    0.572944] Calibrating delay loop (skipped), value calculated using timer frequency.. 4390.12 BogoMIPS (lpj=8780240)
[   15.902123] systemd[1]: Starting [email protected] - Load Kernel Module loop...
[   15.909809] loop: module loaded
[   15.915496] systemd[1]: [email protected]: Deactivated successfully.
[   15.915643] systemd[1]: Finished [email protected] - Load Kernel Module loop.
  • This never happened in Debian 11 (bullseye).
  • This was introduced in Debian 12 (bookworm).

How are these loop devices created? What is the purpose of these loop devices?

1

1 Answer 1

1

These are loop devices, created by the loop module. They are used to present any underlying storage as a block device; typically, this is used to mount a file system stored in an image.

A few of them are instantiated by default, but they remain empty until they are associated with underlying storage. lsblk doesn’t show empty devices, lsblk --all does.

This behaviour isn’t directly related to the switch from Debian 11 to 12; it happens on Debian 11 too, if the loop module is loaded.

2
  • How many you get depends on the max_loop module parameter (see /sys/module/loop/parameters/max_loop for the value which can be changed at loading time or as kernel cmdline parameter when the module is builtin, not run time) Commented Aug 24, 2023 at 18:51
  • The [email protected] seems to be dependency of systemd-repart.service Commented Aug 24, 2023 at 18:55

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.