On Solaris zones, the ZFS file system Capacity from 'df -h' shows a different value than what Foglight Infrastructure Cartridge (IC) is displaying.
For example, 'df -h' shows 1% but Foglight's %Used is showing 85%.
The Foglight IC agent retrieves metrics about ZFS from the following commands:
1. zpool list
2. zfs list
3. df –g –l
The computation is based on these. Using 'df -h'is an incorrect way of retrieving the ZFS file system capacity or usage. For more information, please refer Oracle documentation here.
Example df –g –l output:
/export (rpool/export ): 131072 block size 512 frag size
1147797504 total blocks 154027671 free blocks 154027671 available 154027679 total files
154027671 free files 67174404 filesys id
zfs fstype 0x00000004 flag 255 filename length
Example zfs list output:
NAME USED AVAIL REFER MOUNTPOINTHow %Used is calculated:
spaceAvailable = 73.4 GB (ZFS list AVAIL) + 9 GB (reservedspace) = 82 GB
spaceUsed = 5.02 GB (ZFS list USED)
totalSpace = total_with_reserve* = 556 GB
*total_without_reserve = 1147797504 (blocks) X 512 (bytes/blocks) = 547 GB
total_with_reserve = 547 GB / ( 1 – 1/64) = 556 GB
reservedspace = total_with_reserve - total_without_reserve = 9 GB
%Used = spaceUsed / totalSpace * 100
= 5.02 / 556 * 100 = 1%
%Free = spaceAvailable / totalSpace *100
= 82 / 556 * 100 = 14.75%
In ZFS, the %Used and %Free above does not always equal 100%.
© 2024 Quest Software Inc. ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center