From e06f5e3cf545ca5dbde0bcd7d746b75d62508463 Mon Sep 17 00:00:00 2001 From: Steffen Ritter Date: Wed, 16 Nov 2022 14:08:41 +0100 Subject: [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. --- modules-available/systemstatus/inc/systemstatus.inc.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'modules-available/systemstatus') 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 === '') { + $wantedSource = $currentSource; + $storeUsage = $entry; + } } } return true; -- cgit v1.2.3-55-g7522