/dev/loopX devices left around for removed snap revisions
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
Confirmed
|
Low
|
Zygmunt Krynicki |
Bug Description
On my 19.04 box, I noticed the Gnome file manager at times starts showing extra drivers, if I click on those they get mounted and they turn out to be snaps filesystems.
Looking at gnome VFS mounts I see:
$ gio mount -li
Drive(0): SanDisk SD8TB8U512G1001
Type: GProxyDrive (GProxyVolumeMo
ids:
unix-device: '/dev/sda'
themed icons: [drive-
symbolic themed icons: [drive-
is_removable=0
is_media_
has_media=1
is_media_
can_poll_
can_eject=0
can_start=0
can_stop=0
start_
sort_
Volume(0): 57 MB Volume
Type: GProxyVolume (GProxyVolumeMo
ids:
class: 'loop'
unix-device: '/dev/loop47'
themed icons: [drive-
symbolic themed icons: [drive-
can_mount=1
can_eject=0
should_
sort_
Volume(1): 57 MB Volume
Type: GProxyVolume (GProxyVolumeMo
ids:
class: 'loop'
unix-device: '/dev/loop8'
themed icons: [drive-
symbolic themed icons: [drive-
can_mount=1
can_eject=0
should_
sort_
Volume(2): 57 MB Volume
Type: GProxyVolume (GProxyVolumeMo
ids:
class: 'loop'
unix-device: '/dev/loop9'
themed icons: [drive-
symbolic themed icons: [drive-
can_mount=1
can_eject=0
should_
sort_
Volume(3): 57 MB Volume
Type: GProxyVolume (GProxyVolumeMo
ids:
class: 'loop'
unix-device: '/dev/loop51'
themed icons: [drive-
symbolic themed icons: [drive-
can_mount=1
can_eject=0
should_
sort_
Volume(4): 57 MB Volume
Type: GProxyVolume (GProxyVolumeMo
ids:
class: 'loop'
unix-device: '/dev/loop3'
themed icons: [drive-
symbolic themed icons: [drive-
can_mount=1
can_eject=0
should_
sort_
Volume(5): 99 MB Volume
Type: GProxyVolume (GProxyVolumeMo
ids:
class: 'loop'
unix-device: '/dev/loop14'
themed icons: [drive-
symbolic themed icons: [drive-
can_mount=1
can_eject=0
should_
sort_
Volume(6): 57 MB Volume
Type: GProxyVolume (GProxyVolumeMo
ids:
class: 'loop'
unix-device: '/dev/loop60'
themed icons: [drive-
symbolic themed icons: [drive-
can_mount=1
can_eject=0
should_
sort_
Those loop devices correspond to old snap revisions that have been removed (by snapd itself), but it seems the loopback devices are left around:
$ losetup -l | grep deleted
/dev/loop47 0 0 1 1 /var/lib/
/dev/loop8 0 0 1 1 /var/lib/
/dev/loop51 0 0 1 1 /var/lib/
/dev/loop9 0 0 1 1 /var/lib/
/dev/loop14 0 0 1 1 /var/lib/
/dev/loop60 0 0 1 1 /var/lib/
/dev/loop3 0 0 1 1 /var/lib/
Note that those snap files don't exist anymore under /var/lib/
A reboot fixes the issue, but it starts appearing again at the next udpate of a snap.
Snapd versions are the following:
$ snap version
snap 2.40+19.04
snapd 2.40+19.04
series 16
ubuntu 19.04
kernel 5.0.0-21-generic
ii snapd 2.40+19.04 amd64 Daemon and tooling that enable snap packages
Changed in snapd: | |
status: | Triaged → Confirmed |
FTR, "losetup -d" on those loop devices doesn't seem to work