I was running into a problem where my file systems were running out of space. I knew I had some spare space – but where was it?
The command
produced output like
COLIN.ZFS.ZOWE.CONFIG (R/W COMP): 1943183 K free out of total 2975040
COLIN.ZFS.ZOWE33.CONFIG (R/W COMP): 7327 K free out of total 421920
COLIN.OPENSSL.ZFS2 (R/W COMP): 2407159 K free out of total 7200000
ZFS.S0W1.SYSTEM (R/W COMP): 1263 K free out of total 1440
ZFS.Z31B.CNJ (R/O COMP): 80605 K free out of total 648000
ZFS.S0W1.WEB (R/W COMP): 9839 K free out of total 10080
You can sort it to give the largest space at the bottom.
- -n means treat the value as a number
- -k 4,4 means sort by the 4th field.
zfsadm aggrinfo |sort -n -k4,4
Gave
ZFS.Z31B.VERSION (R/W COMP): 33 K free out of total 3823200
ZFS.Z31B.ZEDC (R/O COMP): 367 K free out of total 1440
...
COLIN.OPENSSL.ZFS2 (R/W COMP): 2407159 K free out of total 7200000
COLIN.ZOPEN.ZFS (R/W COMP): 2446835 K free out of total 6144480