BTRFS Assistant - Call for testing

In order to make the btrfs/snapper functionality more accessible, we are breaking it out from Garuda Assistant into it's own application.

In addition, some changes and new features:

  • Tabs are no longer hidden behind checkboxes because there is more room for tabs
  • The window is no longer forcibly centered
  • The dependency on pacman was removed
  • BTRFS balance is now run in the background
  • The application now runs as root since it needs root for almost everything with btrfs and snapper
  • Support for restoring snapshots with nested subvolumes under them has been added
  • The much requested feature to restore the snapshot even if the subvolume is mounted has been implemented

Of course, these changes mean we need a new round of testing! Especially those last 2 changes.

If anyone wants to test, btrfs-assistant-git is in both the AUR and chaotic-aur.

One thing I should mention is that if you boot off a snapshot, both Garuda Assistant and BTRFS Assistant are going to ask you to restore the snapshot. This is due to the fact that since this application isn't live yet, the functionality hasn't been removed from Garuda Assistant yet.

As always, thanks for the assistance and feedback!

16 Likes

Nice.
A nice additional feature to add would be to display how much space the snapshots are consuming. From my quick and lazy research recently it's not "hard" to find but if it can be integrated into the gui, that would be an exceptionally nice feature (though would take quite some effort to integrate into gui).

2 Likes

I feel like I looked at that when I first started. I don't think it was hard but it was expensive. If you had a good number of snapshots it took a long time to calculate.

2 Likes

This may be redundant, but may want to specify "NOT chaotic-aur", to ensure no confusion.

I updated the first post.

2 Likes

I stated that because there is a chaotic-aur package, but assumed AUR because that's from dragonfire (and you said AUR not chaotic). :woman_shrugging:

From a quick playthrough, assuming that theming and integration into Garuda Welcome will be done post-testing....

  • Restoration and snapper settings changes all worked for @root & @home
  • Tried to balance Btrfs even though not needed and that aborted immediately, which I guess it should :thinking:
  • Deletion of restore backup subvolumes worked.

Console output (FWIW):

[🔴] × sudo btrfs-assistant
[sudo] password for peanut:
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
QMetaObject::connectSlotsByName: Connecting slot on_comboBox_btrfsdevice_activated() with the first of the following compatible signals: ("activated(int)", "activated(QString)")
QMetaObject::connectSlotsByName: No matching signal for on_checkBox_show_subvolume_clicked(bool)
QMetaObject::connectSlotsByName: Connecting slot on_comboBox_snapper_configs_activated() with the first of the following compatible signals: ("activated(int)", "activated(QString)")
QMetaObject::connectSlotsByName: Connecting slot on_comboBox_snapper_config_settings_activated() with the first of the following compatible signals: ("activated(int)", "activated(QString)")
QMetaObject::connectSlotsByName: No matching signal for on_checkBox_snapper_advanced_clicked(bool)

Inxi (FWIW):

System:    Kernel: 5.15.5-zen1-1-zen x86_64 bits: 64 compiler: gcc v: 11.1.0
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen root=UUID=f1c070a2-4316-4873-90ae-2dcdf4f9b56b
rw [email protected] quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0
systemd.unified_cgroup_hierarchy=1 resume=UUID=9b66f294-4ae1-447b-8997-8d80b96dbac4 loglevel=3
Desktop: KDE Plasma 5.23.3 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: MSI model: Z97 GAMING 5 (MS-7917) v: 1.0 serial: <superuser required>
UEFI: American Megatrends v: 1.13 date: 02/16/2016
CPU:       Info: Quad Core model: Intel Core i7-4790K bits: 64 type: MT MCP arch: Haswell family: 6
model-id: 3C (60) stepping: 3 microcode: 28 cache: L1: 256 KiB L2: 1024 KiB L3: 8 MiB
flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 64002
Speed: 4400 MHz min/max: 800/4400 MHz Core speeds (MHz): 1: 4377 2: 4264 3: 4400 4: 4331
5: 4402 6: 3614 7: 4372 8: 4094
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: Full generic retpoline, IBPB: conditional, IBRS_FW, STIBP: conditional, RSB filling
Type: srbds mitigation: Microcode
Type: tsx_async_abort status: Not affected
Graphics:  Device-1: AMD Hawaii XT / Grenada XT [Radeon R9 290X/390X] vendor: ASUSTeK driver: radeon
v: kernel alternate: amdgpu bus-ID: 01:00.0 chip-ID: 1002:67b0 class-ID: 0300
Display: x11 server: X.Org 1.21.1.1 compositor: kwin_x11 driver: loaded: ati,radeon
unloaded: modesetting alternate: fbdev,vesa display-ID: :0 screens: 1
Screen-1: 0 s-res: 3840x1080 s-dpi: 96 s-size: 1016x285mm (40.0x11.2") s-diag: 1055mm (41.5")
Monitor-1: DVI-0 res: 1920x1080 hz: 60 dpi: 92 size: 531x299mm (20.9x11.8") diag: 609mm (24")
Monitor-2: DVI-1 res: 1920x1080 hz: 60 dpi: 92 size: 531x299mm (20.9x11.8") diag: 609mm (24")
OpenGL: renderer: AMD HAWAII (DRM 2.50.0 5.15.5-zen1-1-zen LLVM 13.0.0) v: 4.5 Mesa 21.2.5
direct render: Yes
Audio:     Device-1: Intel 9 Series Family HD Audio vendor: Micro-Star MSI driver: snd_hda_intel v: kernel
bus-ID: 00:1b.0 chip-ID: 8086:8ca0 class-ID: 0403
Device-2: AMD Hawaii HDMI Audio [Radeon R9 290/290X / 390/390X] vendor: ASUSTeK
driver: snd_hda_intel v: kernel bus-ID: 01:00.1 chip-ID: 1002:aac8 class-ID: 0403
Sound Server-1: ALSA v: k5.15.5-zen1-1-zen running: yes
Sound Server-2: JACK v: 1.9.19 running: no
Sound Server-3: PulseAudio v: 15.0 running: no
Sound Server-4: PipeWire v: 0.3.40 running: yes
Network:   Device-1: Qualcomm Atheros Killer E220x Gigabit Ethernet vendor: Micro-Star MSI driver: alx
v: kernel port: d000 bus-ID: 04:00.0 chip-ID: 1969:e091 class-ID: 0200
IF: enp4s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Drives:    Local Storage: total: 607.36 GiB used: 226.01 GiB (37.2%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung model: SSD 970 EVO 500GB size: 465.76 GiB
block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
rev: 2B2QEXE7 temp: 33.9 C scheme: GPT
ID-2: /dev/sda maj-min: 8:0 type: USB vendor: Gigabyte model: GP-GSTFS31120GN size: 111.79 GiB
block-size: physical: 4096 B logical: 512 B type: N/A serial: <filter> rev: 0509 scheme: GPT
ID-3: /dev/sdb maj-min: 8:16 type: USB vendor: SanDisk model: Cruzer Glide size: 29.81 GiB
block-size: physical: 512 B logical: 512 B type: N/A serial: <filter> rev: 1.00 scheme: MBR
SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure?
Partition: ID-1: / raw-size: 431.03 GiB size: 431.03 GiB (100.00%) used: 226.01 GiB (52.4%) fs: btrfs
dev: /dev/nvme0n1p2 maj-min: 259:2
ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%) used: 576 KiB (0.2%) fs: vfat
dev: /dev/nvme0n1p1 maj-min: 259:1
ID-3: /home raw-size: 431.03 GiB size: 431.03 GiB (100.00%) used: 226.01 GiB (52.4%) fs: btrfs
dev: /dev/nvme0n1p2 maj-min: 259:2
ID-4: /var/log raw-size: 431.03 GiB size: 431.03 GiB (100.00%) used: 226.01 GiB (52.4%)
fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
ID-5: /var/tmp raw-size: 431.03 GiB size: 431.03 GiB (100.00%) used: 226.01 GiB (52.4%)
fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
Swap:      Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
ID-1: swap-1 type: partition size: 34.44 GiB used: 0 KiB (0.0%) priority: -2
dev: /dev/nvme0n1p3 maj-min: 259:3
ID-2: swap-2 type: zram size: 31.3 GiB used: 1.2 MiB (0.0%) priority: 100 dev: /dev/zram0
Sensors:   System Temperatures: cpu: 39.0 C mobo: 35.0 C gpu: radeon temp: 45.0 C
Fan Speeds (RPM): cpu: 401 fan-1: 0 fan-3: 0 fan-4: 402 fan-5: 389
Info:      Processes: 271 Uptime: 26m wakeups: 0 Memory: 31.3 GiB used: 4.62 GiB (14.8%) Init: systemd
v: 249 tool: systemctl Compilers: gcc: 11.1.0 clang: 13.0.0 Packages: pacman: 1375 lib: 355
Shell: fish v: 3.3.1 default: Bash v: 5.1.12 running-in: konsole inxi: 3.3.09
2 Likes

Oh, well there wasn't a few hours ago :slight_smile:

In that case, it should be fine to use that as well.

Ooh....I forgot I changed that. It now starts a service and does the balance in the background.

I meant to add a messagebox to let the user know it was running. Apparently I didn't. I will fix that in the morning.

Thanks for finding that!

5 Likes

This is why you should use QThread and event based Qt
:P

1 Like

The only thing i can find is the start full balance fails and the theming ie darkmode
other than that :smiley:

I would definitely make that call async if it was to be implemented. However, even async, waiting over a minute for a grid to fully populate seems unacceptable to me in an application like this.

It probably isn't failing, it has been moved to the background. That was what we were discussing above. I need to add a notification about what is happening there.

Since it is now running as root, it is getting root's theming.

4 Likes

Well... better than nothing I suppose. :thinking:

A new version is available with 4 small changes:

  • The window is no longer forcibly centered
  • The dependency on pacman was removed
  • There is now a messagebox letting you know about the balance running in the background
  • The balance is now actually run in the background
4 Likes

Just testing now
Not sure if it is worth adding a message box to say when clicked balance is not required :wink:

If you run a balance and there isn't much to do it will still run but it won't take long.

1 Like

I'm uncertain that this is related to testing this, but mentioning in case and maybe others can check there systems...

I was looking at my snapshots last night and noticed that I had a lot more than I should have, the cleanup didn't seem like it had run since around the time I was testing this btrfs assistant.
All the services were as they should be and cleanup said it had run and was due to run but :woman_shrugging:
I decided I had it set to have too many anyway and wondered if tweaking/saving the setting would resolve and ... cleanup has now cleared previous snapshots to where it should have done.

Whether this was a cross-over issue or it was fiddling around to test the application, I dunno, maybe other's can check and verify or counter my findings.

I wonder if before changing the setting, cleanup was disabled in the config. If it is disabled in the config, even if the timer is running it won't do anything.

Either way, I don't think that would be related to this application because it doesn't touch those settings on install. Only if you go into the screen and make changes.

I did go in and make changes, I was testing the app :stuck_out_tongue_winking_eye:

Cleanup was set to yes.

Was very similar to what this person's showing.

His setup looks normal to me. I don't see anything wrong.

1 Like

Yea, I realized when I saw the last time his ran.

Mine had hourlys going back 3ish days, but system hadn't missed a cleanup timer.
I dunno, it's fine since I resaved settings. I only mentioned here because "testing" and "thought" he was having similar issue.
Apologies for the (hopefully) false alarm and thanks for the help. :kissing_heart:

Ok so I just installed this to check it out, and I really like that it is its own application now and such, but I noticed unlike Garuda assistant it does not ask for a password. This seems like a pretty powerful tool to not need to ask for root privilege and instead just have it automatically.