Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Group btrfs subvolume mounts #98

Open
julian-klode opened this issue Dec 10, 2020 · 3 comments
Open

Group btrfs subvolume mounts #98

julian-klode opened this issue Dec 10, 2020 · 3 comments

Comments

@julian-klode
Copy link
Contributor

julian-klode commented Dec 10, 2020

So I have multiple subvolumes mounted of my BTRFS /, to exclude them from snapshots, as you can see below. I think it would be nice to somehow group them together a bit and not print duplicated information, but like just "..." or so, to improve readability. OTOH, I'm not sure, as the list of mount point seems ordered. But maybe it makes sense to group anyway - the /var and /srv mounts below would then be slightly indented below / for example.

$ duf -hide-fs squashfs
╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ 9 local devices                                                                                                      │
├────────────────────────────┬────────┬────────┬────────┬───────────────────────────────┬───────┬──────────────────────┤
│ MOUNTED ON                 │   SIZE │   USED │  AVAIL │              USE%             │ TYPE  │ FILESYSTEM           │
├────────────────────────────┼────────┼────────┼────────┼───────────────────────────────┼───────┼──────────────────────┤
│ /                          │  31.0G │  28.3G │   2.2G │ [##################..]  91.3% │ btrfs │ /dev/ubuntu--vg/root │
│ /boot                      │ 704.5M │ 229.2M │ 424.0M │ [######..............]  32.5% │ ext4  │ /dev/nvme0n1p2       │
│ /boot/efi                  │ 511.0M │  21.1M │ 489.9M │ [....................]   4.1% │ vfat  │ /dev/nvme0n1p1       │
│ /home                      │ 170.0G │ 159.3G │  10.7G │ [##################..]  93.7% │ xfs   │ /dev/ubuntu--vg/home │
│ /mnt                       │  31.0G │  28.3G │   2.2G │ [##################..]  91.3% │ btrfs │ /dev/ubuntu--vg/root │
│ /srv/lxd                   │  30.0G │  15.7G │  13.5G │ [##########..........]  52.3% │ btrfs │ /dev/ubuntu--vg/lxd  │
│ /var/cache/apt/archives    │  31.0G │  28.3G │   2.2G │ [##################..]  91.3% │ btrfs │ /dev/ubuntu--vg/root │
│ /var/cache/squid-deb-proxy │  31.0G │  28.3G │   2.2G │ [##################..]  91.3% │ btrfs │ /dev/ubuntu--vg/root │
│ /var/log                   │  31.0G │  28.3G │   2.2G │ [##################..]  91.3% │ btrfs │ /dev/ubuntu--vg/root │

maybe like this, but with nicer arrow.

$ duf -hide-fs squashfs
╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ 9 local devices                                                                                                      │
├────────────────────────────┬────────┬────────┬────────┬───────────────────────────────┬───────┬──────────────────────┤
│ MOUNTED ON                 │   SIZE │   USED │  AVAIL │              USE%             │ TYPE  │ FILESYSTEM           │
├────────────────────────────┼────────┼────────┼────────┼───────────────────────────────┼───────┼──────────────────────┤
│ /                          │  31.0G │  28.3G │   2.2G │ [##################..]  91.3% │ btrfs │ /dev/ubuntu--vg/root │
[...]
│ ->  /var/cache/apt/archives │  ... │  ... │  ...    │  ...                                          │ ....    │ ...                             │
[...]
│ /boot                      │ 704.5M │ 229.2M │ 424.0M │ [######..............]  32.5% │ ext4  │ /dev/nvme0n1p2       │
│ /boot/efi                  │ 511.0M │  21.1M │ 489.9M │ [....................]   4.1% │ vfat  │ /dev/nvme0n1p1       │
│ /home                      │ 170.0G │ 159.3G │  10.7G │ [##################..]  93.7% │ xfs   │ /dev/ubuntu--vg/home │
│ /mnt                       │  31.0G │  28.3G │   2.2G │ [##################..]  91.3% │ btrfs │ /dev/ubuntu--vg/root │
@petaramesh
Copy link

I agree on the point that each filesystem should only be output once, even if it is mounted several times at several places, which is extremely common with BTRFS (as different subvolumes pertaining to the same filesystem, thus the same usage figures, are almost always mounted at different places).

@petaramesh
Copy link

See how redundant this can quickly become...
Screenshot_20230104_090940

@arran4
Copy link

arran4 commented Jun 27, 2024

Would be nice, also if it would group them on one line for really short mount paths when there are much longer open, ie

image

Could be /content, /home rather than just using a 'ditto mark'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants