BTRFS Assistant - Balance recommended not resolved

The inxi -Faz

System:
Kernel: 5.16.1-zen1-1-zen x86_64 bits: 64 compiler: gcc v: 11.1.0
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
root=UUID=e7e27c36-1a2d-44f2-a91a-133cd96ac9a0 rw rootflags=subvol=@
quiet
cryptdevice=UUID=cdec8ce4-ee6e-48c7-969c-b735ee912ac7:luks-cdec8ce4-ee6e-48c7-969c-b735ee912ac7
root=/dev/mapper/luks-cdec8ce4-ee6e-48c7-969c-b735ee912ac7 splash
rd.udev.log_priority=3 vt.global_cursor_default=0
resume=/dev/mapper/luks-8915ab05-25f9-424e-bcc5-6701ff3355d2 loglevel=3
Desktop: KDE Plasma 5.23.5 tk: Qt 5.15.2 info: latte-dock wm: kwin_x11
vt: 1 dm: SDDM Distro: Garuda Linux base: Arch Linux
Machine:
Type: Desktop Mobo: Micro-Star model: X370 GAMING M7 ACK (MS-7A35) v: 1.0
serial: <superuser required> UEFI: American Megatrends v: 1.D0
date: 01/22/2019
CPU:
Info: model: AMD Ryzen 7 1700X bits: 64 type: MT MCP arch: Zen
family: 0x17 (23) model-id: 1 stepping: 1 microcode: 0x8001137
Topology: cpus: 1x cores: 8 tpc: 2 threads: 16 smt: enabled cache:
L1: 768 KiB desc: d-8x32 KiB; i-8x64 KiB L2: 4 MiB desc: 8x512 KiB
L3: 16 MiB desc: 2x8 MiB
Speed (MHz): avg: 3350 high: 3499 min/max: 2200/3400 boost: enabled
scaling: driver: acpi-cpufreq governor: performance cores: 1: 3398 2: 3457
3: 3481 4: 3497 5: 2836 6: 3492 7: 3282 8: 3082 9: 3253 10: 3418 11: 3491
12: 3499 13: 3160 14: 3434 15: 3466 16: 3359 bogomips: 108788
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Vulnerabilities:
Type: itlb_multihit status: Not affected
Type: l1tf status: Not affected
Type: mds status: Not affected
Type: meltdown status: Not affected
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: Full AMD retpoline, IBPB: conditional,
STIBP: disabled, RSB filling
Type: srbds status: Not affected
Type: tsx_async_abort status: Not affected
Graphics:
Device-1: NVIDIA GP102 [GeForce GTX 1080 Ti] driver: nvidia v: 495.46
alternate: nouveau,nvidia_drm bus-ID: 26:00.0 chip-ID: 10de:1b06
class-ID: 0300
Device-2: Anker PowerConf C300 type: USB driver: snd-usb-audio,uvcvideo
bus-ID: 1-9.1:15 chip-ID: 291a:3361 class-ID: 0e02 serial: <filter>
Display: x11 server: X.Org 1.21.1.3 compositor: kwin_x11 driver:
loaded: nvidia unloaded: modesetting alternate: fbdev,nouveau,nv,vesa
display-ID: :0 screens: 1
Screen-1: 0 s-res: 5120x1440 s-dpi: 108 s-size: 1204x342mm (47.4x13.5")
s-diag: 1252mm (49.3")
Monitor-1: DP-2 res: 2560x1440 dpi: 93 size: 697x393mm (27.4x15.5")
diag: 800mm (31.5")
Monitor-2: DP-4 res: 2560x1440 dpi: 109 size: 598x336mm (23.5x13.2")
diag: 686mm (27")
OpenGL: renderer: NVIDIA GeForce GTX 1080 Ti/PCIe/SSE2
v: 4.6.0 NVIDIA 495.46 direct render: Yes
Audio:
Device-1: NVIDIA GP102 HDMI Audio driver: snd_hda_intel v: kernel
bus-ID: 26:00.1 chip-ID: 10de:10ef class-ID: 0403
Device-2: AMD Family 17h HD Audio vendor: Micro-Star MSI
driver: snd_hda_intel v: kernel bus-ID: 28:00.3 chip-ID: 1022:1457
class-ID: 0403
Device-3: Anker PowerConf C300 type: USB driver: snd-usb-audio,uvcvideo
bus-ID: 1-9.1:15 chip-ID: 291a:3361 class-ID: 0e02 serial: <filter>
Sound Server-1: ALSA v: k5.16.1-zen1-1-zen running: yes
Sound Server-2: PulseAudio v: 15.0 running: no
Sound Server-3: PipeWire v: 0.3.43 running: yes
Network:
Device-1: Qualcomm Atheros Killer E2500 Gigabit Ethernet
vendor: Micro-Star MSI driver: alx v: kernel port: f000 bus-ID: 20:00.0
chip-ID: 1969:e0b1 class-ID: 0200
IF: eno1 state: up speed: 1000 Mbps duplex: full mac: <filter>
Device-2: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter
vendor: Rivet Networks Killer Wireless-n/a/ac 1535 driver: ath10k_pci
v: kernel bus-ID: 21:00.0 chip-ID: 168c:003e class-ID: 0280
IF: wlp33s0 state: down mac: <filter>
Device-3: Realtek RTL8153 Gigabit Ethernet Adapter type: USB
driver: r8152 bus-ID: 2-1.4:3 chip-ID: 0bda:8153 class-ID: 0000
serial: <filter>
IF: enp3s0f0u1u4 state: down mac: <filter>
IF-ID-1: docker0 state: down mac: <filter>
Bluetooth:
Device-1: Qualcomm Atheros QCA61x4 Bluetooth 4.0 type: USB driver: btusb
v: 0.8 bus-ID: 1-13:14 chip-ID: 0cf3:e300 class-ID: e001
Report: bt-adapter ID: hci0 rfk-id: 0 state: down
bt-service: enabled,running rfk-block: hardware: no software: yes
address: <filter>
Drives:
Local Storage: total: 3.64 TiB used: 77.04 GiB (2.1%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/nvme0n1 maj-min: 259:4 vendor: Samsung model: SSD 960 EVO 1TB
size: 931.51 GiB block-size: physical: 512 B logical: 512 B
speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter> rev: 2B7QCXE7
temp: 35.9 C scheme: GPT
ID-2: /dev/nvme1n1 maj-min: 259:0 vendor: Crucial model: CT1000P1SSD8
size: 931.51 GiB block-size: physical: 512 B logical: 512 B
speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter> rev: P3CR020
temp: 44.9 C scheme: GPT
ID-3: /dev/sda maj-min: 8:0 vendor: Seagate model: ST1000DX002-2DV162
size: 931.51 GiB block-size: physical: 4096 B logical: 512 B
speed: 6.0 Gb/s type: HDD rpm: 7200 serial: <filter> rev: CC41
scheme: GPT
ID-4: /dev/sdb maj-min: 8:16 vendor: Western Digital
model: WD10EADS-00L5B1 size: 931.51 GiB block-size: physical: 512 B
logical: 512 B speed: 3.0 Gb/s type: N/A serial: <filter> rev: 1A01
scheme: MBR
Partition:
ID-1: / raw-size: 914.02 GiB size: 914.02 GiB (100.00%)
used: 77.03 GiB (8.4%) fs: btrfs dev: /dev/dm-0 maj-min: 254:0
mapped: luks-cdec8ce4-ee6e-48c7-969c-b735ee912ac7
ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
used: 720 KiB (0.2%) fs: vfat dev: /dev/nvme1n1p1 maj-min: 259:1
ID-3: /home raw-size: 914.02 GiB size: 914.02 GiB (100.00%)
used: 77.03 GiB (8.4%) fs: btrfs dev: /dev/dm-0 maj-min: 254:0
mapped: luks-cdec8ce4-ee6e-48c7-969c-b735ee912ac7
ID-4: /var/log raw-size: 914.02 GiB size: 914.02 GiB (100.00%)
used: 77.03 GiB (8.4%) fs: btrfs dev: /dev/dm-0 maj-min: 254:0
mapped: luks-cdec8ce4-ee6e-48c7-969c-b735ee912ac7
ID-5: /var/tmp raw-size: 914.02 GiB size: 914.02 GiB (100.00%)
used: 77.03 GiB (8.4%) fs: btrfs dev: /dev/dm-0 maj-min: 254:0
mapped: luks-cdec8ce4-ee6e-48c7-969c-b735ee912ac7
Swap:
Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
ID-1: swap-1 type: zram size: 15.63 GiB used: 1.57 GiB (10.0%)
priority: 100 dev: /dev/zram0
ID-2: swap-2 type: partition size: 17.19 GiB used: 0 KiB (0.0%)
priority: -2 dev: /dev/dm-1 maj-min: 254:1
mapped: luks-8915ab05-25f9-424e-bcc5-6701ff3355d2
Sensors:
System Temperatures: cpu: 43.0 C mobo: N/A gpu: nvidia temp: 37 C
Fan Speeds (RPM): N/A gpu: nvidia fan: 22%
Info:
Processes: 490 Uptime: 8h 8m wakeups: 0 Memory: 15.63 GiB
used: 8.08 GiB (51.7%) Init: systemd v: 250 tool: systemctl Compilers:
gcc: 11.1.0 Packages: pacman: 1918 lib: 537 Shell: fish v: 3.3.1
default: Bash v: 5.1.16 running-in: konsole inxi: 3.3.12

When starting the BTRFS Assistant I get this picture:

Alt Text for Picture

Internal Filesystem Statistics
Data: 82%
Metadata: 60%
System: 0%
Balance recommended. Click here (arrow pointing right to the button) ----> Start Full balance

When pressing the button it tells me to check the service so I do:

systemctl status btrfs-balance.service
â—‹ btrfs-balance.service - Balance block groups on a btrfs filesystem
Loaded: loaded (/usr/lib/systemd/system/btrfs-balance.service; static)
Active: inactive (dead) since Fri 2022-01-21 17:38:26 CET; 2s ago
TriggeredBy: â—Ź btrfs-balance.timer
Docs: man:btrfs-balance
Process: 205555 ExecStart=/usr/share/btrfsmaintenance/btrfs-balance.sh (code=exited, status=0/SUCCESS)
Main PID: 205555 (code=exited, status=0/SUCCESS)
CPU: 881ms

Jan 21 17:38:25 eha-linux systemd[1]: Started Balance block groups on a btrfs filesystem.
Jan 21 17:38:26 eha-linux systemd[1]: btrfs-balance.service: Deactivated successfully.

journalctl -fu btrfs-balance.service

Jan 21 17:38:25 eha-linux systemd[1]: Started Balance block groups on a btrfs filesystem.
Jan 21 17:38:26 eha-linux systemd[1]: btrfs-balance.service: Deactivated successfully.

Hmm so I did not miss any logs.

What am I missing here? :thinking:
(I did not test the old - reboot - solution yet..)


PS: You have lots of free space, did you overbuy?
Why are you mocking me! :smiley: The system is quite fresh and I know I normally have around 500GB+ of Data after I have cloned all my repos for work.

2 Likes

Basically, btrfs-balance is running in 1 second. That either means there is nothing to balance or btrfs-balance is broken somehow.

If it is the former, that means the logic that btrfs-assistant is using to determine if a balance is needed is flawed.

If you click “Refresh BTRFS Data” does it change anything?

If not, I will take a look at that when I get a bit of free time. In the meantime, I wouldn’t worry about it overly.

Yes. :wink:

4 Likes

Pre Click:

Information:
Filesystem Size: 914.019 GiB
Allocated: 05.0703 GiB
Used: 77.1288
Free (Estimated) 835.263 GiB

Post Click + Refresh BTRFS Data:

Delta:
Used: 77.1304 GiB
Free (Estimated): 835.261

:man_shrugging:

I meant does it change the recommendation to balance, I am guessing "No" :grinning:

2 Likes

No it does not :slight_smile:
I will take a look at the script if I am done with work for today.

It looks like it takes Used/Size and if the result < 85% it prints that message.

So first you mock me and now you troll me? :wink:

image

Alt

Penguin from Madagascar saying noted while writing down something on a notepad with a pen.
More details: Kowalski "Noted" | Know Your Meme

4 Likes

I think I might know what the issue is.

That button is running the btrfs balance service from btrfsmaintenance. By default, it is only balancing /, not the whole filesystem. To test this, you could edit /etc/default/btrfsmaintenance and change BTRFS_SCRUB_MOUNTPOINTS to:

BTRFS_SCRUB_MOUNTPOINTS="auto"

Then try running the balance command again.

I am currently working on a version with a more complete integration with Btrfs maintenance which should be ready for testing soon™.

8 Likes

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