diff --git a/html/pages/device/health/storage.inc.php b/html/pages/device/health/storage.inc.php
index 0f8fe2babf..e9c69150ee 100644
--- a/html/pages/device/health/storage.inc.php
+++ b/html/pages/device/health/storage.inc.php
@@ -18,9 +18,9 @@ while($drive = mysql_fetch_array($query)) {
if(is_integer($row/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }
- $total = $drive['storage_size'] * $drive['storage_units'];
- $used = $drive['storage_used'] * $drive['storage_units'];
- $free = $total - $drive['storage_used'] * $drive['storage_units'];
+ $total = $drive['storage_size'];
+ $used = $drive['storage_used'];
+ $free = $drive['storage_free'];
$perc = round($drive['storage_perc'], 0);
$used = formatStorage($used);
$total = formatStorage($total);
diff --git a/includes/polling/storage.inc.php b/includes/polling/storage.inc.php
index 1130f47070..9190e91041 100755
--- a/includes/polling/storage.inc.php
+++ b/includes/polling/storage.inc.php
@@ -12,8 +12,8 @@ while($storage = mysql_fetch_array($storage_data)) {
if (!is_file($storage_rrd)) {
rrdtool_create($storage_rrd, "--step 300 \
- DS:used:GAUGE:600:-273:100000000000 \
- DS:free:GAUGE:600:-273:100000000000 \
+ DS:used:GAUGE:600:0:U \
+ DS:free:GAUGE:600:0:U \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
diff --git a/includes/rrdtool.inc.php b/includes/rrdtool.inc.php
index a676a5e20b..3c201a9415 100644
--- a/includes/rrdtool.inc.php
+++ b/includes/rrdtool.inc.php
@@ -33,7 +33,7 @@ function rrdtool_lastupdate($rrdfile, $rrdupdate)
function rrdtool($command, $file, $options)
{
global $config; global $debug;
- if ($config['debug']) { echo($config['rrdtool'] . " $command $file $options \n"); }
+ if ($debug) { echo($config['rrdtool'] . " $command $file $options \n"); }
return shell_exec($config['rrdtool'] . " $command $file $options");
}