CyberShadow / btdu

sampling disk usage profiler for btrfs
GNU General Public License v2.0
422 stars 6 forks source link

no way to see the subvolume? #3

Closed bbrendon closed 3 years ago

bbrendon commented 3 years ago

Sorry, I'm no btrfs expert but it seems the way my btrfs is mounted, I can't use this program?

root@s:/tmp# mount|grep btr
/dev/sda1 on / type btrfs (rw,relatime,ssd,space_cache,subvolid=257,subvol=/rootsubvol)
/dev/sda1 on /var/lib/docker/btrfs type btrfs (rw,relatime,ssd,space_cache,subvolid=257,subvol=/rootsubvol)
root@s:/tmp#

root@s:/tmp# btrfs subv list /|grep -v docker
ID 257 gen 462716 top level 5 path rootsubvol
ID 374 gen 459325 top level 257 path srv/monica
ID 375 gen 172293 top level 374 path srv/monica/.snapshot-2020-11-16-163135
root@s:/tmp# ./btdu-static-x86_64 rootsubvol
Fatal error: open (No such file or directory)
root@s:/tmp# ./btdu-static-x86_64 /rootsubvol
Fatal error: open (No such file or directory)
root@s:/tmp#
CyberShadow commented 3 years ago

Your / (root filesystem, i.e. where the distribution is installed) is located on the /rootsubvol subvolume, which is not the btrfs root subvolume. The btrfs root subvolume would be subvolid=5,subvol=/.

# mkdir /btrfs-root
# mount -o subvol=/ /dev/sda1 /btrfs-root
# btdu /btrfs-root
bbrendon commented 3 years ago

Thanks! 👍🏻