/var on NVMe ssd is possibly wasting storage

,

Hello

I run F38 on a notebook with a separate /var partition (10GB) mounted on a NVMe ssd. It seems that somehow a lot of storage space is wasted.

GPARTED reports 10 GB in total, 5.77 GB used, 4.23 GB unused:

Disks reports similar values:

Whereas Disk Usage Analyzer reports only 1.3 GB to be used:

i also did:

[15:13:32]\[jojo@waldstadion ~]$ sudo df -hT /var
Filesystem     Type  Size  Used Avail Use% Mounted on
/dev/nvme0n1p3 ext4  9,8G  5,6G  3,8G  60% /var

How can I find what is using the approx. 5.5/5.8 GB of /var (compared to 1.3 GB that Disks reports)?

The ssd is trimmed weekly and I also did it manually today.

Thank you in advance

2 distinct issues here.

  1. You are using standard ext4 partitions which have to have a designated size and require the user to specify the partition size, which may or may not be adequate for a particular use situation.

  2. you are using gui tools to find out the status while the command line tools are more detailed and useful. Being concerned about the reported free space is valid, but since the various gui tools report things differently it can be confusing. Having disks report 1.3G used vs the actual 5.5G used is a result of disks reporting on specific subdirectories and not the entire partition.

To find out actual usage the df or df -h command gives a lot more detail.
Adding in the du command also is helpful since the latter will provide info down to individual file sizes or an overall summary with the correct options.
lsblk -f also gives a lot of useful info.

I would guess from your original question that your real concern is that /var does not appear to have adequate space for something you are trying to achieve and I can categorically state that a 10G partition for /var is far from ideal. When used as a discrete partition /var probably should be 30G or more since it contains many discrete items that may shrink and grow over time.

Fedora has not by default created a separate /var partition for many many years (except for the server version I believe). With the significant growth in size of available storage media the historical need to have /var separate from the root partition to avoid crashes caused by filling up the file system has almost disappeared and so the ‘wasted’ space caused by over-provisioning of certain file systems has been mostly eliminated.

I would actually suggest that you take steps to combine the data contained in /var file system into the root file system then remove the /var partition and add that space to the root file system. That would eliminate the apparent ‘wasted’ space as well as removing the limits to what may be done.

At least one user in the recent past reported a similar circumstance where having a dedicated /var partition of 10G size prevented upgrading his system from F38 to F39.

There are 3 different cache directories involved in file system maintenance and upgrades. (/var/cache/dnf, /var/cache/PackageKit, and /var/lib/dnf/system-upgrade) where each is used by a different process and each takes up space (sometimes a lot) and is discrete.

1 Like

Dear Jeff,

thank you for the detailed hints and explanations! As a result I think about to reconfigure /var. I used a separate partition for /var after the root directory was filled with /var somewhen in the past years.

With du I recognized that abrt was using 6 GB of /var. I cleaned up and now have 8GB for usage.
Yes are right: I am trying to upgrade from F38 to F39 :wink:.