Merge pull request #1765 from dlandon/master

Xfs check not detecting file issues; remove subpools from share edit.
This commit is contained in:
tom mortensen
2024-06-30 08:53:01 -07:00
committed by GitHub
2 changed files with 13 additions and 0 deletions

View File

@@ -45,6 +45,14 @@ if ($name == "") {
/* If the configuration is pools only, then no array disks are available. */
$poolsOnly = ((int)$var['SYS_ARRAY_SLOTS'] <= 2) ? true : false;
/* Remove subpools from the array of pools. */
$pools = array_filter($pools, function($pool) {
return !isSubpool($pool);
});
@file_put_contents("/tmp/pools", json_encode($pools, JSON_PRETTY_PRINT));
/* Check for non existent pool device. */
if ($share['cachePool'] && !in_array($share['cachePool'], $pools)) {
$poolDefined = false;

View File

@@ -21,6 +21,11 @@ case "$1" in
/sbin/xfs_repair $4 $2 &> /var/lib/xfs/check.status.$3 &
pid=$!
echo $pid > /var/lib/xfs/check.pid.$3
# Capture the exit code once xfs_repair completes
{
wait $pid
echo $? > /var/lib/xfs/check.status.$3.exit
} &
exit 0
;;
'status')