Help! sudo: unable to write to /var/lib/sudo/username/0:root: No space left on device ~ free space!

Hi there!

I’m really not sure what has happened here… I’ve had a dedicated OpenSUSE box running headless as my Plex Media Server box for a few months now, and today I decided to fire up a plex client, and it couldn’t connect. That was odd, I thought. I tried to VNC into it, and nothing… SSH worked. I SSH’d into the box, and I tried to run a sudo command and I got the following:

sudo: unable to write to /var/lib/sudo/kevinhanson/0:root: No space left on device

What confuses me is that I still have plenty of free space. Check out the results below:

username@plex-media-server:~> df -hFilesystem      Size  Used Avail Use% Mounted on
/dev/sda3        41G   23G   18G  56% /
devtmpfs        7.8G   32K  7.8G   1% /dev
tmpfs           7.8G     0  7.8G   0% /dev/shm
tmpfs           7.8G  5.6M  7.8G   1% /run
tmpfs           7.8G     0  7.8G   0% /sys/fs/cgroup
tmpfs           7.8G  5.6M  7.8G   1% /var/run
tmpfs           7.8G  5.6M  7.8G   1% /var/lock
/dev/sda4        70G  133M   69G   1% /home
/dev/sda1       164M  164K  164M   1% /boot/efi

Anyone know what the issue might be? I’m pretty confused how this happened, as I literally haven’t done anything - thanks!

Using BTRFS file system??

If so maybe snapshots have filled the machine

Sounds familiar to me too. I have the same problem on a regular basis for exactly this reason.
If so you should do

snapper list

and than

snapper delete 1-999

(or whichever you don’t need anymore).

Is there any tool that is – unlike df – able to include .snapshots and .readahead in the computation of disk space?