Seeing two cases of when the container’s profile drive size which is backed by a ZFS pool is reporting a different size in the container:
Scenario 1:
Most of the time the container’s drive size reported by df -h
is correct, however after changing the size multiple times, df -h
reports either a slightly higher or lower value than what the container’s profile is set to. However resizing the container back to it’s original 10GB causes it to report the correct 10GB value inside the container.
Scenario 2:
I also have a container that was launched with 500GB drive, but is reporting only 467GB in the container. This container however has never been resized and is reporting a wrong value from the beginning.
Running 4.11/stable
Any clarification is appreciated, thank you!
Example of resizes showing wrong values:
Launch container with 10GB
root@test5:~# df -h
Filesystem Size Used Avail Use% Mounted on
pool0/containers/test5 10G 633M 9.4G 7% /
Resize container to 20GB
root@test5:~# df -h
Filesystem Size Used Avail Use% Mounted on
pool0/containers/test5 20G 633M 19G 4% /
Resize container to 5GB (shows slightly wrong value)
root@test5:~# df -h
Filesystem Size Used Avail Use% Mounted on
pool0/containers/test5 5.3G 633M 4.7G 12% /
Resize container to 3GB (shows .5GB more)
root@test5:~# df -h
Filesystem Size Used Avail Use% Mounted on
pool0/containers/test5 3.5G 633M 2.8G 19% /
Here are the ZFS properties for the container’s dataset after some of those changes.
root@box01:~$ zfs get all pool0/containers/test5 | grep quota
pool0/containers/test5 quota 2.79G local
pool0/containers/test5 refquota none
root@box01:~$ zfs get all pool0/containers/test5 | grep quota
pool0/containers/test5 quota 9.31G local
pool0/containers/test5 refquota none
Example of container that was not resized but shows wrong value from the beginning:
Launched container with 500GB and it has never been resized but showing lower value.
root@app01:~# df -h
Filesystem Size Used Avail Use% Mounted on
pool0/containers/app01 467G 2.5G 464G 1% /
In the above cause though it’s actually matching what is set on the ZFS quota:
zfs get all pool0/containers/app01 | grep quota
pool0/containers/app01 quota 466G local
pool0/containers/app01 refquota none