looking to resize tmpfs filesystems

I have just upgraded to Leap 42.3 (42.1 → 42.2 → 42.3). Running in a virtual machine (VMWare Workstation, Windows 10 host) with 12GB RAM, 60 GB disk.

I am gettting tight on disk space and feel as though have too much allocated to tmpfs filesystems that is unused. If I am reading ‘df’ output correctly, I have close to 24GB allocated to /dev, /dev/shm, /run, and /sys/fs/cgroup. I don’t think I should shrink /devshm, but I would like to shrink the size of /run, /sys/fs/cgroup, and /dev.

I am probably not understanding how disk space is being counted, though, as my /dev/sda2 says the disk is 58GB with 55GB used. Are the tmpfs filesystems part of the the 55GB?

Below is the output of ‘df’ as well as my /etc/fstab. Any help (or correcting perspective) is appreciated.

Thank you,

Randy Smith

victor:/ # df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 5.9G 4.0K 5.9G 1% /dev
tmpfs 5.9G 4.4M 5.9G 1% /dev/shm
tmpfs 5.9G 2.3M 5.9G 1% /run
tmpfs 5.9G 0 5.9G 0% /sys/fs/cgroup
/dev/sda2 58G 55G 2.0G 97% /
/dev/sda2 58G 55G 2.0G 97% /tmp
/dev/sda2 58G 55G 2.0G 97% /var/lib/named
/dev/sda2 58G 55G 2.0G 97% /usr/local
/dev/sda2 58G 55G 2.0G 97% /.snapshots
/dev/sda2 58G 55G 2.0G 97% /var/spool
/dev/sda2 58G 55G 2.0G 97% /opt
/dev/sda2 58G 55G 2.0G 97% /boot/grub2/i386-pc
/dev/sda2 58G 55G 2.0G 97% /srv
/dev/sda2 58G 55G 2.0G 97% /var/lib/machines
/dev/sda2 58G 55G 2.0G 97% /boot/grub2/x86_64-efi
/dev/sda2 58G 55G 2.0G 97% /var/lib/mariadb
/dev/sda2 58G 55G 2.0G 97% /var/log
/dev/sda2 58G 55G 2.0G 97% /var/lib/mailman
/dev/sda2 58G 55G 2.0G 97% /home
/dev/sda2 58G 55G 2.0G 97% /var/crash
/dev/sda2 58G 55G 2.0G 97% /var/lib/pgsql
/dev/sda2 58G 55G 2.0G 97% /var/tmp
/dev/sda2 58G 55G 2.0G 97% /var/lib/mysql
/dev/sda2 58G 55G 2.0G 97% /var/opt
/dev/sda2 58G 55G 2.0G 97% /var/lib/libvirt/images
vmhgfs-fuse 466G 379G 87G 82% /mnt/hgfs
tmpfs 1.2G 0 1.2G 0% /run/user/484
tmpfs 1.2G 16K 1.2G 1% /run/user/1000

victor:/ # cat /etc/fstab
UUID=82e53816-1759-4d9e-bf4a-1bfe7491309c swap swap defaults 0 0
UUID=9ffda066-93b1-4add-a40f-e9d72e2fd095 / btrfs defaults 0 0
UUID=9ffda066-93b1-4add-a40f-e9d72e2fd095 /boot/grub2/i386-pc btrfs subvol=@/boot/grub2/i386-pc 0 0
UUID=9ffda066-93b1-4add-a40f-e9d72e2fd095 /boot/grub2/x86_64-efi btrfs subvol=@/boot/grub2/x86_64-efi 0 0
UUID=9ffda066-93b1-4add-a40f-e9d72e2fd095 /home btrfs subvol=@/home 0 0
UUID=9ffda066-93b1-4add-a40f-e9d72e2fd095 /opt btrfs subvol=@/opt 0 0
UUID=9ffda066-93b1-4add-a40f-e9d72e2fd095 /srv btrfs subvol=@/srv 0 0
UUID=9ffda066-93b1-4add-a40f-e9d72e2fd095 /tmp btrfs subvol=@/tmp 0 0
UUID=9ffda066-93b1-4add-a40f-e9d72e2fd095 /usr/local btrfs subvol=@/usr/local 0 0
UUID=9ffda066-93b1-4add-a40f-e9d72e2fd095 /var/crash btrfs subvol=@/var/crash 0 0
UUID=9ffda066-93b1-4add-a40f-e9d72e2fd095 /var/lib/libvirt/images btrfs subvol=@/var/lib/libvirt/images 0 0
UUID=9ffda066-93b1-4add-a40f-e9d72e2fd095 /var/lib/mailman btrfs subvol=@/var/lib/mailman 0 0
UUID=9ffda066-93b1-4add-a40f-e9d72e2fd095 /var/lib/mariadb btrfs subvol=@/var/lib/mariadb 0 0
UUID=9ffda066-93b1-4add-a40f-e9d72e2fd095 /var/lib/mysql btrfs subvol=@/var/lib/mysql 0 0
UUID=9ffda066-93b1-4add-a40f-e9d72e2fd095 /var/lib/named btrfs subvol=@/var/lib/named 0 0
UUID=9ffda066-93b1-4add-a40f-e9d72e2fd095 /var/lib/pgsql btrfs subvol=@/var/lib/pgsql 0 0
UUID=9ffda066-93b1-4add-a40f-e9d72e2fd095 /var/log btrfs subvol=@/var/log 0 0
UUID=9ffda066-93b1-4add-a40f-e9d72e2fd095 /var/opt btrfs subvol=@/var/opt 0 0
UUID=9ffda066-93b1-4add-a40f-e9d72e2fd095 /var/spool btrfs subvol=@/var/spool 0 0
UUID=9ffda066-93b1-4add-a40f-e9d72e2fd095 /var/tmp btrfs subvol=@/var/tmp 0 0
UUID=9ffda066-93b1-4add-a40f-e9d72e2fd095 /.snapshots btrfs subvol=@/.snapshots 0 0
UUID=9ffda066-93b1-4add-a40f-e9d72e2fd095 /var/lib/machines btrfs subvol=@/var/lib/machines 0 0

You have 7MB tmpfs in use and it’s temporarily until you reboot (tmpfs is an in-memory temporary filesystem - think of it like a RAM disk)

Most likely your space is being consumed by snapshots, please run;
sudo snapper list

And delete some old ones (sudo snapper delete x or sudo snapper delete x-x to delete multiple ones, where x is a number)

To begin with, tmpfs file systems are file sytems stored in RAM. They do not occupy any space on mass storage devices.

Hi
You need to clean up snapper snapshots and look at the snapper configuration, then once that’s done, run the btrfs maintenance cronjobs to clean up disk space.

Thank you for the responses all.

I am not sure why I hadn’t connected that the tmpfs drives are in RAM. I should have; thank you for pointing that out.

I have gone through the snapper config and cleaned up old snapshots and that has given me some disk space back. I will investigate how to manually run the btrfs clean jobs next.

Cheers,

Randy Smith