summaryrefslogtreecommitdiffstats
path: root/modules-available/systemstatus
diff options
context:
space:
mode:
authorSteffen Ritter2022-11-16 14:08:41 +0100
committerSteffen Ritter2022-11-16 14:08:41 +0100
commite06f5e3cf545ca5dbde0bcd7d746b75d62508463 (patch)
tree5b0dca0c6fd63742554c7f87bf054feac562c715 /modules-available/systemstatus
parent[systemstatus] Show small info icon for used filesystem (diff)
downloadslx-admin-e06f5e3cf545ca5dbde0bcd7d746b75d62508463.tar.gz
slx-admin-e06f5e3cf545ca5dbde0bcd7d746b75d62508463.tar.xz
slx-admin-e06f5e3cf545ca5dbde0bcd7d746b75d62508463.zip
[systemstatus] Handle disk size for local mounts on vm store
If something different is mounted on CONFIG_VMSTORE_DIR as expected by the slx-admin configuration we normally show a warning, that something went wrong in retrieving the disk capacity. This seems reasonable if the vm-store is a nfs or cifs share. But if internal storage is wanted it's more likely that someone just mounted a bigger/seccond hdd over the directory. In this case we skip the warning and just show the correct (free) capacity.
Diffstat (limited to 'modules-available/systemstatus')
-rw-r--r--modules-available/systemstatus/inc/systemstatus.inc.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/modules-available/systemstatus/inc/systemstatus.inc.php b/modules-available/systemstatus/inc/systemstatus.inc.php
index f6d18801..36b4ef36 100644
--- a/modules-available/systemstatus/inc/systemstatus.inc.php
+++ b/modules-available/systemstatus/inc/systemstatus.inc.php
@@ -45,6 +45,13 @@ class SystemStatus
// Record what's mounted at destination, regardless of config, to indicate something is wrong
if ($entry['mountPoint'] === CONFIG_VMSTORE_DIR) {
$currentSource = $entry['fileSystem'];
+
+ // If internal/local storage is used but there is a mount on CONFIG_VMSTORE_DIR,
+ // we assume it's on purpose like a second hdd and use that
+ if ($wantedSource === '<local>') {
+ $wantedSource = $currentSource;
+ $storeUsage = $entry;
+ }
}
}
return true;