Strange btrfs subvolumes

Hello.
I need an opinion of yours about some strange btrfs subvolumes although it is not a problem closely related to Garuda.
It is a problem related to btrfs and its subvolumes.
I use snapper, but about 2 weeks ago I used timeshift.
The strange btrfs subvolumes existed before from timeshift to snapper migration.
I want to fix it now only because I have had to fix other little problems.
The output of

btrfs subvolume list / is

ID 257 gen 387928 top level 5 path @home
ID 258 gen 387915 top level 5 path @root
ID 259 gen 304934 top level 5 path @srv
ID 260 gen 387921 top level 5 path @cache
ID 261 gen 387925 top level 5 path @log
ID 262 gen 387818 top level 5 path @tmp
ID 739 gen 387928 top level 5 path @
ID 937 gen 387922 top level 739 path var/lib/docker/btrfs/subvolumes/a029807f4abb4b681df9617c4ec656daf272606d5
871370a7968a4cdfa9116e5
ID 938 gen 309656 top level 739 path var/lib/docker/btrfs/subvolumes/d5128c24b3082663ba3bcfabf04c57560d085b559
99d3a4d082b2f19bfd3893c
ID 939 gen 309657 top level 739 path var/lib/docker/btrfs/subvolumes/b32dbf9db9bcce439f79ed8e0915960be532a7122
24c88f31af27e91d4539b42
ID 940 gen 309658 top level 739 path var/lib/docker/btrfs/subvolumes/8b8a81241697fdfeeeb71ee5cbc75850b804e524d
71ea55983790d3b15b0f9ae
ID 941 gen 309659 top level 739 path var/lib/docker/btrfs/subvolumes/0512d5e9852615b2134054e2adf4cd6947ce9f5f8
e81bb3acb4d7c7cab483785
ID 1226 gen 387922 top level 739 path .snapshots
ID 1256 gen 383713 top level 1226 path .snapshots/30/snapshot
ID 1257 gen 383714 top level 1226 path .snapshots/31/snapshot
.....

Why I have ?

var/lib/docker/btrfs/subvolumes/a029807f4abb4b681df9617c4ec656daf272606d5
871370a7968a4cdfa9116e5
ID 938 gen 309656 top level 739 path var/lib/docker/btrfs/subvolumes/d5128c24b3082663ba3bcfabf04c57560d085b559
99d3a4d082b2f19bfd3893c

@home, @root, @srv, @cache, @log, @tmp and @ are the subvolumes that I use.

May I delete var/lib/docker/btrfs/subvolumes/d5128c24b3082663ba3bcfabf04c57560d085b559
99d3a4d082b2f19bfd3893c ?

I suppose that these subvolumes are trash. Am I right?

Thanks.

My garuda-inxi output is here.

[root@fibonacci ~]# garuda-inxi  
System:
Kernel: 5.17.2-zen3-1-zen arch: x86_64 bits: 64 compiler: gcc v: 11.2.0
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen root=UUID=e1b87af6-67e0-4350-97cb-8bdfe430d209
rw rootflags=subvol=@ quiet
cryptdevice=UUID=735c2a29-e901-4fc7-893a-52a88bf43878:luks-735c2a29-e901-4fc7-893a-52a88bf43878
root=/dev/mapper/luks-735c2a29-e901-4fc7-893a-52a88bf43878 splash rd.udev.log_priority=3
vt.global_cursor_default=0 systemd.unified_cgroup_hierarchy=1
resume=/dev/mapper/luks-23c04b79-4698-461f-ade3-f485919f86ca loglevel=3
Console: pty pts/1 DM: SDDM Distro: Garuda Linux base: Arch Linux
Machine:
Type: Laptop System: FUJITSU product: LIFEBOOK A544 v: N/A serial: <filter> Chassis: type: 10
serial: <filter>
Mobo: FUJITSU model: FJNBB35 serial: <filter> UEFI: FUJITSU // Phoenix v: Version 1.13
date: 11/18/2013
Battery:
ID-1: BAT0 charge: 0.9 Wh (100.0%) condition: 0.9/4.5 Wh (20.7%) volts: 12.2 min: 10.8
model: PTL CP651527-01 type: Li-ion serial: <filter> status: N/A cycles: 274
CPU:
Info: model: Intel Core i7-4702MQ socket: rPGA988B (On Board) note: check bits: 64 type: MT MCP
arch: Haswell family: 6 model-id: 0x3C (60) stepping: 3 microcode: 0x28
Topology: cpus: 1x cores: 4 tpc: 2 threads: 8 smt: enabled cache: L1: 256 KiB
desc: d-4x32 KiB; i-4x32 KiB L2: 1024 KiB desc: 4x256 KiB L3: 6 MiB desc: 1x6 MiB
Speed (MHz): avg: 2195 high: 2196 min/max: 800/3200 base/boost: 2200/2200 scaling:
driver: intel_cpufreq governor: performance volts: 0.7 V ext-clock: 100 MHz cores: 1: 2195
2: 2196 3: 2195 4: 2195 5: 2195 6: 2196 7: 2195 8: 2195 bogomips: 35118
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Vulnerabilities:
Type: itlb_multihit status: KVM: VMX disabled
Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable
Type: mds mitigation: Clear CPU buffers; SMT vulnerable
Type: meltdown mitigation: PTI
Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl
Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
Type: spectre_v2
mitigation: Retpolines, IBPB: conditional, IBRS_FW, STIBP: conditional, RSB filling
Type: srbds mitigation: Microcode
Type: tsx_async_abort status: Not affected
Graphics:
Device-1: Intel 4th Gen Core Processor Integrated Graphics vendor: Fujitsu driver: i915
v: kernel ports: active: HDMI-A-1 off: eDP-1 empty: VGA-1 bus-ID: 00:02.0 chip-ID: 8086:0416
class-ID: 0300
Device-2: Importek FJ Camera type: USB driver: uvcvideo bus-ID: 1-7:5 chip-ID: 10f1:1a58
class-ID: 0e02
Display: server: X.org v: 1.21.1.3 with: Xwayland v: 22.1.1 compositor: kwin_wayland driver:
X: loaded: modesetting alternate: fbdev,intel,vesa gpu: i915 tty: 110x25
Monitor-1: HDMI-A-1 model: LG (GoldStar) FULL HD built: 2016 res: 1920x1080 dpi: 102
gamma: 1.2 size: 480x270mm (18.9x10.63") diag: 551mm (21.7") ratio: 16:9 modes: max: 1920x1080
min: 720x400
Monitor-2: eDP-1 model: Seiko Epson 0x3642 built: 2012 res: 1366x768 dpi: 101 gamma: 1.2
size: 344x194mm (13.54x7.64") diag: 395mm (15.5") ratio: 16:9 modes: 1366x768
Message: GL data unavailable in console for root.
Audio:
Device-1: Intel Xeon E3-1200 v3/4th Gen Core Processor HD Audio vendor: Fujitsu
driver: snd_hda_intel v: kernel bus-ID: 00:03.0 chip-ID: 8086:0c0c class-ID: 0403
Device-2: Intel 8 Series/C220 Series High Definition Audio vendor: Fujitsu
driver: snd_hda_intel v: kernel bus-ID: 00:1b.0 chip-ID: 8086:8c20 class-ID: 0403
Sound Server-1: ALSA v: k5.17.2-zen3-1-zen running: yes
Sound Server-2: PulseAudio v: 15.0 running: no
Sound Server-3: PipeWire v: 0.3.50 running: yes
Network:
Device-1: Intel Wireless 7260 driver: iwlwifi v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1
bus-ID: 03:00.0 chip-ID: 8086:08b1 class-ID: 0280
IF: wlp3s0 state: up mac: <filter>
Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Fujitsu
driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: 3000 bus-ID: 04:00.0
chip-ID: 10ec:8168 class-ID: 0200
IF: enp4s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
IF-ID-1: virbr0 state: down mac: <filter>
IF-ID-2: virbr1 state: down mac: <filter>
Bluetooth:
Device-1: Intel Bluetooth wireless interface type: USB driver: btusb v: 0.8 bus-ID: 1-8:7
chip-ID: 8087:07dc class-ID: e001
Report: bt-adapter ID: hci0 rfk-id: 10 state: up address: <filter>
Drives:
Local Storage: total: 946.17 GiB used: 83.17 GiB (8.8%)
ID-1: /dev/sda maj-min: 8:0 vendor: Samsung model: SSD 870 QVO 1TB family: based SSDs
size: 931.51 GiB block-size: physical: 512 B logical: 512 B sata: 3.3 speed: 6.0 Gb/s type: SSD
serial: <filter> rev: 1B6Q temp: 32 C scheme: GPT
SMART: yes state: enabled health: PASSED on: 105d 14h cycles: 821 written: 4.15 TiB
ID-2: /dev/sdb maj-min: 8:16 type: USB vendor: Kingston model: DataTraveler 3.0
size: 14.65 GiB block-size: physical: 512 B logical: 512 B type: N/A serial: <filter> rev: PMAP
scheme: MBR
SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure?
Partition:
ID-1: / raw-size: 922.45 GiB size: 922.45 GiB (100.00%) used: 83.17 GiB (9.0%) fs: btrfs
block-size: 4096 B dev: /dev/dm-0 maj-min: 254:0
mapped: luks-735c2a29-e901-4fc7-893a-52a88bf43878
ID-2: /boot/efi raw-size: 260 MiB size: 256 MiB (98.45%) used: 682 KiB (0.3%) fs: vfat
block-size: 512 B dev: /dev/sda1 maj-min: 8:1
ID-3: /home raw-size: 922.45 GiB size: 922.45 GiB (100.00%) used: 83.17 GiB (9.0%) fs: btrfs
block-size: 4096 B dev: /dev/dm-0 maj-min: 254:0
mapped: luks-735c2a29-e901-4fc7-893a-52a88bf43878
ID-4: /var/log raw-size: 922.45 GiB size: 922.45 GiB (100.00%) used: 83.17 GiB (9.0%)
fs: btrfs block-size: 4096 B dev: /dev/dm-0 maj-min: 254:0
mapped: luks-735c2a29-e901-4fc7-893a-52a88bf43878
ID-5: /var/tmp raw-size: 922.45 GiB size: 922.45 GiB (100.00%) used: 83.17 GiB (9.0%)
fs: btrfs block-size: 4096 B dev: /dev/dm-0 maj-min: 254:0
mapped: luks-735c2a29-e901-4fc7-893a-52a88bf43878
Swap:
Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
ID-1: swap-1 type: zram size: 7.67 GiB used: 163.1 MiB (2.1%) priority: 100 dev: /dev/zram0
ID-2: swap-2 type: partition size: 8.8 GiB used: 0 KiB (0.0%) priority: -2 dev: /dev/dm-1
maj-min: 254:1 mapped: luks-23c04b79-4698-461f-ade3-f485919f86ca
Sensors:
System Temperatures: cpu: 79.0 C pch: 64.5 C mobo: 27.8 C
Fan Speeds (RPM): N/A
Info:
Processes: 290 Uptime: 1d 6h 1m wakeups: 34 Memory: 7.67 GiB used: 3.67 GiB (47.8%)
Init: systemd v: 250 tool: systemctl Compilers: gcc: 11.2.0 clang: 13.0.1 Packages:
pacman: 1673 lib: 385 Shell: Bash v: 5.1.16 running-in: pty pts/1 inxi: 3.3.15
Garuda (2.6.1-1):
System install date:     2021-03-13
Last full system update: 2022-04-14 ↻
Is partially upgraded:   No
Relevant software:       NetworkManager
Windows dual boot:       No/Undetected
Snapshots:               Snapper
Failed units:

This seems to be a known issue with docker, see [btrfs] Docker and Subvolumes

I don't use docker so I'm not 100% clear on what's going on, but that thread contains a lot of very good info and a number of external links, as well as an apparent fix and future stopgap for the issue. It seems they are safe to delete, but the thread may detail the best-practice way to do so, as well as a method for preventing docker from littering your drive with soon-to-be-orphaned subvolumes.

1 Like

Docker creates subvolumes for your containers.

4 Likes

Btrfs and docker go well together. The whole idea of docker is containerization and now they can even separate the image layers at the filesystem level on the host.

3 Likes

I deleted all docker images and strange subvolumes disapperead.
Thanks.

It is beautiful to make a question before sleeping and to have the (right) answer at wake up. On Garuda the sun never sunsets.

3 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.