Regularly Running Outa Disk Space

I need some help troubleshooting low disk space. I am deleting snapshots like crazy I have a 500GB drive, which should be plenty, but updates keep failing due to low disk space on root BTRFS partition. Plenty of space on /home but unfortunately this is XFS:

dl -h

Filesystem      Size  Used Avail Use% Mounted on                                                                                                                                                                                                                                
devtmpfs        7.8G     0  7.8G   0% /dev                                                                                                                                                                                                                                      
tmpfs           7.8G   11M  7.8G   1% /dev/shm                                                                                                                                                                                                                                  
tmpfs           7.8G  1.8M  7.8G   1% /run                                                                                                                                                                                                                                      
tmpfs           7.8G     0  7.8G   0% /sys/fs/cgroup                                                                                                                                                                                                                            
/dev/sda3        69G   62G  5.6G  92% /                                                                                                                                                                                                                                         
/dev/sda1       156M  4.6M  152M   3% /boot/efi                                                                                                                                                                                                                                 
/dev/sda3        69G   62G  5.6G  92% /var/lib/pgsql                                                                                                                                                                                                                            
/dev/sda3        69G   62G  5.6G  92% /tmp                                                                                                                                                                                                                                      
/dev/sda4       393G   62G  332G  16% /home                                                                                                                                                                                                                                     
/dev/sda3        69G   62G  5.6G  92% /var/lib/machines                                                                                                                                                                                                                         
/dev/sda3        69G   62G  5.6G  92% /boot/grub2/i386-pc                                                                                                                                                                                                                       
/dev/sda3        69G   62G  5.6G  92% /var/cache                                                                                                                                                                                                                                
/dev/sda3        69G   62G  5.6G  92% /var/spool                                                                                                                                                                                                                                
/dev/sda3        69G   62G  5.6G  92% /var/lib/mariadb                                                                                                                                                                                                                          
/dev/sda3        69G   62G  5.6G  92% /usr/local                                                                                                                                                                                                                                
/dev/sda3        69G   62G  5.6G  92% /var/lib/libvirt/images                                                                                                                                                                                                                   
/dev/sda3        69G   62G  5.6G  92% /opt                                                                                                                                                                                                                                      
/dev/sda3        69G   62G  5.6G  92% /var/crash                                                                                                                                                                                                                                
/dev/sda3        69G   62G  5.6G  92% /var/lib/mysql                                                                                                                                                                                                                            
/dev/sda3        69G   62G  5.6G  92% /var/tmp                                                                                                                                                                                                                                  
/dev/sda3        69G   62G  5.6G  92% /var/log
/dev/sda3        69G   62G  5.6G  92% /srv
/dev/sda3        69G   62G  5.6G  92% /boot/grub2/x86_64-efi
/dev/sda3        69G   62G  5.6G  92% /var/opt
/dev/sda3        69G   62G  5.6G  92% /.snapshots
/dev/sda3        69G   62G  5.6G  92% /var/lib/mailman
/dev/sda3        69G   62G  5.6G  92% /var/lib/named
tmpfs           1.6G   28K  1.6G   1% /run/user/1000


I don’t really have any advice.

I tried “btrfs” with Tumbleweed. And I decided that I didn’t like it. This was for other reasons, not a shortage of space.

So I reinstalled with “ext4” in a 40G file system. It is doing fine with updates. Never a problem with space.

My real reason for not liking “btrfs” – I just cannot see myself ever wanting to recover an older snapshot. I prefer a reinstall in such circumstances.

As you probably have found out yourself, it is on /dev/sda3, which is mounted on /.
It is shown as being at 92%. Thus almost full. And that has nothing to do with snapshots, as snapshots are not included here. Indeed 62G is extraordinary for a / (as long as you have a separate /home).

The dumb work is now (as root) to do

cd /
du -sh * 2>/dev/null

It will show you all the directories in / with their sizes.
Then look for the one that is excessive in size (requires a bit of knowledge about what is about “normal”). Let us assume it is /var. Then

cd var
du -sh * 2>/dev/null

Repeat this until you find a directory with a lot of files that should not be there.

BTW, have you set the system to clean /tmp and /var/tmp at boot?

BTW

df -h

is IMHO better then that dl -h (even never heard of the dl command).

Nothing looks particularly massive apart from home, but should not home be separate from root?!?

 2.8M    bin
74M     boot
0       dev
23M     etc
63G     home
616M    lib
14M     lib64
0       mnt
333M    opt
0       proc
0       root
1.6M    run
12M     sbin
0       selinux
1.4M    srv
0       sys
25M     tmp
7.0G    usr
2.5G    var


I do, however, have a 40GB VM located:

/var/lib/libvirt/images/generic.qcow2

I assume this remains hidden & not tally? In which case, how to I move KVM virtual instance to /home?

Hi
That depends if you excluded this from being part of the snapshot…

Normally you configure /etc/snapper/configs/root to set the snapshots taken, then run the cronjobs in /etc/cron.daily/suse.de-snapper and /etc/cron.weekly/btrfs-balance (if it’s not there ensure btrfsmaintenance package is installed (or force a re-install).

Since it’s Tumbleweed, sometimes updates happen quickly and before some cronjobs run. I normally run the manually, esp after big updates (after I have rebooted! and tested, so don’t have to roll anything back).

To see what usage is like use;


btrfs filesystem usage /

Not seeing any greedy files with either command, unless I’m missing something?!?

Overall:
    Device size:                  68.00GiB
    Device allocated:             68.00GiB
    Device unallocated:            1.00MiB
    Device missing:                  0.00B
    Used:                         61.87GiB
    Free (estimated):              5.56GiB      (min: 5.56GiB)
    Data ratio:                       1.00
    Metadata ratio:                   1.00
    Global reserve:               54.81MiB      (used: 0.00B)

Data,single: Size:66.97GiB, Used:61.41GiB
   /dev/sda3      66.97GiB

Metadata,single: Size:1.00GiB, Used:465.16MiB
   /dev/sda3       1.00GiB

System,single: Size:32.00MiB, Used:16.00KiB
   /dev/sda3      32.00MiB

Unallocated:
   /dev/sda3       1.00MiB


Hi
What about;


snapper list

Reallocated VM storage pool to /home, no dice.


Type   | #   | Pre # | Date                         | User | Cleanup | Description  | Userdata      
-------+-----+-------+------------------------------+------+---------+--------------+--------------
single | 0   |       |                              | root |         | current      |               
single | 198 |       | Wed 08 Feb 2017 02:52:42 GMT | root |         |              |               
pre    | 518 |       | Fri 02 Jun 2017 18:48:01 BST | root | number  | zypp(zypper) | important=yes
pre    | 519 |       | Fri 02 Jun 2017 18:56:59 BST | root | number  | yast snapper |               
pre    | 521 |       | Fri 02 Jun 2017 19:05:37 BST | root | number  | zypp(zypper) | important=no  
post   | 522 | 521   | Fri 02 Jun 2017 19:07:01 BST | root | number  |              | important=no  
pre    | 523 |       | Fri 02 Jun 2017 22:46:08 BST | root | number  | zypp(zypper) | important=no  
post   | 524 | 523   | Fri 02 Jun 2017 22:46:30 BST | root | number  |              | important=no 


Hi
So have you run the btrfs-balance cronjob?

Maintenance package installed but;

 **linux-ihrj:~ #** btrfs-balance
If 'btrfs-balance' is not a typo you can use command-not-found to lookup the package that contains it, like this:
    cnf btrfs-balance
**linux-ihrj:~ #** /etc/cron.weekly/btrfs-balance
-bash: /etc/cron.weekly/btrfs-balance: No such file or directory


I get the feeling I should try an in place upgrade.

Hi
Just force the re-install of it (as indicated in earlier post :wink: )

Learn something every day!

(I really wish I’d pay attention!?!) :shame:

Success is sweet!!!

You Rule!!!

Mad love!!!

Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        7.8G     0  7.8G   0% /dev
tmpfs           7.8G   15M  7.8G   1% /dev/shm
tmpfs           7.8G  1.8M  7.8G   1% /run
tmpfs           7.8G     0  7.8G   0% /sys/fs/cgroup
/dev/sda3        69G   14G   55G  20% /
/dev/sda3        69G   14G   55G  20% /var/log
/dev/sda1       156M  4.6M  152M   3% /boot/efi
/dev/sda3        69G   14G   55G  20% /var/lib/named
/dev/sda4       393G   64G  330G  17% /home
/dev/sda3        69G   14G   55G  20% /var/crash
/dev/sda3        69G   14G   55G  20% /var/tmp
/dev/sda3        69G   14G   55G  20% /var/lib/machines
/dev/sda3        69G   14G   55G  20% /boot/grub2/x86_64-efi
/dev/sda3        69G   14G   55G  20% /var/lib/mailman
/dev/sda3        69G   14G   55G  20% /tmp
/dev/sda3        69G   14G   55G  20% /boot/grub2/i386-pc
/dev/sda3        69G   14G   55G  20% /var/lib/pgsql
/dev/sda3        69G   14G   55G  20% /var/cache
/dev/sda3        69G   14G   55G  20% /var/spool
/dev/sda3        69G   14G   55G  20% /var/lib/libvirt/images
/dev/sda3        69G   14G   55G  20% /usr/local
/dev/sda3        69G   14G   55G  20% /.snapshots
/dev/sda3        69G   14G   55G  20% /var/lib/mariadb
/dev/sda3        69G   14G   55G  20% /opt
/dev/sda3        69G   14G   55G  20% /srv
/dev/sda3        69G   14G   55G  20% /var/opt
/dev/sda3        69G   14G   55G  20% /var/lib/mysql
tmpfs           1.6G   36K  1.6G   1% /run/user/1000



++++9000 likes, ty from #2018, silly btrfs…