CachyOS / CachyOS/CachyOS-Welcome

Add `btdu` somewhere in hello, to ease maintenance for people running btrfs, given that it is the only decent way to find out which file(s) in which snapshot are hogging space

Open
#138 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Fluent
Stars
48
Forks
87
PR merge metrics
No merged PRs in 30d

Description

I think we should add `btdu` https://github.com/CyberShadow/btdu to hello probably in the tweaks section.
Given that, it is by far the best if not only option to conveniently analyze what is hogging space on the disk.

Obviously that would also mean we include `btdu` in the CachyOS repos.

It would also mean we need a little script that mounts and unmounts the btrfs root in the background for the user
something like:
```sh

# where could we get the right mount options? parce fstap?? as in what happens if the user changed away from CachyOS defaults.
# subvolid=5 will alway be the btrfs root no matter of how it was named
sudo mount --mkdir -o subvolid=5,defaults,noatime,compress=zstd,space_cache=v2,commit=120,ro /dev/nvme0n1p2 /var/cache/btrfs_root_for_btdu

sudo btdu /var/cache/btrfs_root_for_btdu

sudo umount /var/cache/btrfs_root_for_btdu

```

Related to: https://discuss.cachyos.org/t/storage-space-does-not-become-empty/15529/15
And: https://gitlab.com/btrfs-assistant/btrfs-assistant/-/issues/128

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.