check-disk-space icon indicating copy to clipboard operation
check-disk-space copied to clipboard

Wrong output when checking a ZFS pool

Open AnixPasBesoin opened this issue 1 year ago • 3 comments

When checking the size of a ZFS pool, checkDiskSpace('/my-zfs-pool') is always indicating a 100% disk usage.

Is this a known limitation?

AnixPasBesoin avatar Aug 01 '22 17:08 AnixPasBesoin

My code is based on df, it seems like df is wrong about any ZFS size :/

Alex-D avatar Aug 02 '22 18:08 Alex-D

Actually df --output=avail,size,target | grep '/my-zfs-pool' produces the right output (when ran from the cli), I am not sure how it's leveraged here though :)

AnixPasBesoin avatar Aug 03 '22 00:08 AnixPasBesoin

Here is the code used on UNIX-like platforms: https://github.com/Alex-D/check-disk-space/blob/d678b42e13facb8bf0803e5b410c78fde4f056ff/src/index.ts#L156-L162

Alex-D avatar Aug 06 '22 18:08 Alex-D

Please, give me your OS, version, and the output of: df -Pk -- /my-zfs-pool

I did not have a ZFS pool setup, and I did not have the time to get one ready.

Then, I will check if I can do anything :)

Alex-D avatar May 21 '23 13:05 Alex-D