mirror of
https://github.com/unraid/webgui.git
synced 2026-04-26 04:11:12 -05:00
Add BTRFS file system checking and notifications
Suppress possible errors
This commit is contained in:
@@ -240,14 +240,14 @@ foreach ($disks as $disk) {
|
||||
$item = 'pool';
|
||||
if ($name=='cache' && $disk['fsType']=='btrfs') {
|
||||
$attr = 'missing';
|
||||
if (exec("/sbin/btrfs filesystem show {$disk['uuid']}|grep -c 'missing'")>0) {
|
||||
if (exec("/sbin/btrfs filesystem show {$disk['uuid']} 2>/dev/null|grep -c 'missing'")>0) {
|
||||
if (empty($saved[$item][$attr])) {
|
||||
exec("$notify -e \"unRAID $text message\" -s \"Warning [$server] - Cache pool BTRFS missing device(s)\" -d \"$info\" -i \"warning\"");
|
||||
$saved[$item][$attr] = 1;
|
||||
}
|
||||
} elseif (isset($saved[$item][$attr])) unset($saved[$item][$attr]);
|
||||
$attr = 'profile';
|
||||
if (exec("/sbin/btrfs filesystem df /mnt/cache|grep -c '^Data'")>1) {
|
||||
if (exec("/sbin/btrfs filesystem df /mnt/cache 2>/dev/null|grep -c '^Data'")>1) {
|
||||
if (empty($saved[$item][$attr])) {
|
||||
exec("$notify -e \"unRAID $text message\" -s \"Warning [$server] - Cache pool BTRFS too many profiles\" -d \"$info\" -i \"warning\"");
|
||||
$saved[$item][$attr] = 1;
|
||||
|
||||
Reference in New Issue
Block a user