mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-04-11 21:29:29 +02:00
fix: accurate ZFS used space calculation for #3175
This commit is contained in:
parent
6f040732b5
commit
9f0f7caec0
@ -423,8 +423,8 @@ if [ "$1" = "status" ]; then
|
||||
hddUsedInfo="${datadrive} & ${storageDrive}"
|
||||
elif [ "${isZFS}" -gt 0 ]; then
|
||||
# ZFS calculations
|
||||
hdd_used_space=$(zpool list -H | awk '{print $3}')
|
||||
hdd_used_ratio=$((100 * ${hdd_used_space::-1} / hddGigaBytes))
|
||||
hdd_used_space=$(($(zpool list -pH | awk '{print $3}')/1024/1024/1024))
|
||||
hdd_used_ratio=$((100 * hdd_used_space / hddGigaBytes))
|
||||
hdd_data_free1Kblocks=$(($(zpool list -pH | awk '{print $4}') / 1024))
|
||||
hddUsedInfo="${hdd_used_space} (${hdd_used_ratio}%)"
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user