Hi, I added a drive to a pool, and I feel like I should have more capacity than I currently have.
I had four 10TB drives, so 9.1TiB drives, set up in RAIDZ2. I added a 12.73 TiB drive to expand the pool, and TrueNAS is reporting that I have 21.9 TiB usable capacity. I understand that I am not going to get the full space of the larger drive, but I expected to have around 27 TiB of space?
Am I just misunderstanding how much space I should have?
I think your case is related to this drama with expansion.
Long story short – you probably have your space. But reporting of free/total space is now screwed.
Do a sudo zpool list if you want to confirm that the space has been added.
The space is mis-reported in TrueNAS for 3 reasons:
TrueNAS UI uses zfs stats rather than zpool stats when reporting pool usage.
During expansion, the original files are all moved based on the original data:redundancy ratio i.e. for a 4x Z2, 2 data blocks and 2 redundancy blocks - whilst new files will be written 3 data blocks and 2 redundancy blocks. So an old file with 24KB of data will use 3x 4 blocks = 12 blocks, whilst the same file written anew will use 2x 5 blocks = 10 blocks which is c. 16% less space.
There is a bug / feature in the ZFS expansion whereby (AFAIK) it reports free space based on the old redundancy ratio rather than the new redundancy ratio i.e. it reports free space as 16% too low.
P.S. Drives are sold in TB = 10^12, but Linux/ZFS/TrueNAS report them in TiB = 2^40 - and 1TB = c. 0.9TiB.
You can keep using the pool. As it fills in, reported available space will decrease. After filling in 10 TiB in these reported 9.4 TiB you’ll still have some (wrong) free space…
Space is there, it will just never be reported correctly.