Understanding ZFS Disk Utilisation and available space
I am hopeful the following will help someone scratch their head a little less in trying to understand the info returned by zfs.
I set up a pool using 4 2TB SATA disks.
|
|
The total size displayed here is the total size of the 4 disks. The maths works as 4*2TB = 8TB = ~7.25TiB
RAIDZ2 is like RAID6 and it uses two disks for parity. Thus, I would expect to have ~4TB or 3.63TiB of available space. I haven’t been able to find this number displayed anywhere.
However, you can find the amount of disk space still available using the following command.
|
|
The value of 2.19T is the amount of unallocated space available in the pool. To verify this, you can run
# zfs get all rpool
NAME PROPERTY VALUE SOURCE
rpool type filesystem -
rpool creation Fri Aug 4 20:39 2017 -
rpool used 1.21T -
rpool available 2.19T -
...
If we add the two numbers here, 1.21T + 2.19T = 3.4T.
5% of disk space is reserved, so 3.63 * 0.95 = 3.4T
et voila