Yum free space detected differently to df and zfs list

On a LXD server using a 15G ZFS storage pool, when I create a CentOS container and then use yum to install a lot of packages, it often fails due to insufficient disk space, similar to the following:

Install  4 Packages (+689 Dependent packages)

Total download size: 1.0 G
Installed size: 3.0 G
Downloading packages:

Error Summary
Disk Requirements:
  At least 1514MB more space needed on the / filesystem.

But on the same container if I run df it reports plenty of space available:

[root@cen7aus106default ~]# df -h /
Filesystem                            Size  Used Avail Use% Mounted on
default/containers/cen7aus106default   13G  1.5G   11G  12% /

On the host the zfs list also shows plenty of free space:

$ zpool list
default  14.9G  3.76G  11.1G         -    40%    25%  1.00x  ONLINE  -

Does anyone know what might explain this discrepancy?

That’s pretty weird, kinda feels like a yum bug unless it’s looking for space in another mount point than / somehow?

Thanks. I’m guessing it’s this https://github.com/rpm-software-management/rpm/commit/cefe4f6d30812e3dbed90afe3a83967aee1d3d8d

I got the error with CentOS 7 which has rpm version 4.11.3. When I tried again using CentOS 8 which has 4.14.3, the same transaction did not get the error. The above rpm fix was in rpm version 4.14.0-rc1. An rpm bug that has been resolved. :grinning: