0

I am running OpenSuse (Tumbleweed) in VMWare (I'm not sure it's relevant but mentioning it anyway), and I'm facing a very strange problem that I can't figure out where the main disk has 41 GB in use even though the root file system only has 7.6 GB worth of files. I have no idea what's taking up those extra 33 GB of disk space.

I have ran sudo ncdu -rc / and it shows 7.6 GB of disk use in total (the vast majority of it under /usr). However, df reports 41 GB usage on /dev/sda2:

Filesystem     1K-blocks     Used Available Use% Mounted on
devtmpfs         8146088        0   8146088   0% /dev
tmpfs            8157580        0   8157580   0% /dev/shm
tmpfs            3263036     1768   3261268   1% /run
/dev/sda2      102750208 41230104  60816680  41% /
/dev/sda2      102750208 41230104  60816680  41% /.snapshots
/dev/sda2      102750208 41230104  60816680  41% /boot/grub2/i386-pc
/dev/sda2      102750208 41230104  60816680  41% /tmp
/dev/sda2      102750208 41230104  60816680  41% /root
/dev/sda2      102750208 41230104  60816680  41% /boot/grub2/x86_64-efi
/dev/sda2      102750208 41230104  60816680  41% /var
/dev/sda2      102750208 41230104  60816680  41% /opt
/dev/sda2      102750208 41230104  60816680  41% /srv
/dev/sda2      102750208 41230104  60816680  41% /usr/local
/dev/sda2      102750208 41230104  60816680  41% /home
tmpfs            1631516       40   1631476   1% /run/user/1000

This doesn't seem to be a false number because the VMWare directory where the guest system is located is indeed that big.

Any idea what could be causing this, how to find out, and how to solve it?

(If it happened to be relevant, the filesystem is btrfs.)

Edit:

I checked the btrfs snapshots with snapper, and there was only about 2 GB worth of them, not even close to the 33 GB. For the sake of it I deleted most of them, leaving about 2 MB worth of them. Disk usage is still 32 GB, which means about 25 GB of data that I can't see anywhere.

I tried running btrfs fi balance and it gave an error:

ERROR: error during balancing '/': Input/output error
There may be more info in syslog - try dmesg | tail

dmesg wasn't very helpful.

What is taking the 25 GB of disk space?

2
  • 2
    BTRFS snapshots can be probable reason – Madhubala Jun 16 at 18:10
  • Ditto. Compare this question. Especially what my answer there says: "The main conclusion is you should mount the root of your Btrfs filesystem somewhere, with subvol=/ option. This way you gain access to the filesystem in its entirety." – Kamil Maciorowski Jun 16 at 18:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.