mirror of
https://github.com/unraid/webgui.git
synced 2026-01-16 06:30:19 -06:00
Remove preset btrfs balance options; btrfs-raid1 is default only for initial creation of multi-device pool. DeviceInfo shows all check/balance/scrub operations but greyed out depending on arry started state.
513 lines
24 KiB
Plaintext
513 lines
24 KiB
Plaintext
Menu="Device:1"
|
||
Title="$name Settings"
|
||
Png="devicesettings.png"
|
||
---
|
||
<?PHP
|
||
/* Copyright 2005-2017, Lime Technology
|
||
* Copyright 2012-2017, Bergware International.
|
||
*
|
||
* This program is free software; you can redistribute it and/or
|
||
* modify it under the terms of the GNU General Public License version 2,
|
||
* as published by the Free Software Foundation.
|
||
*
|
||
* The above copyright notice and this permission notice shall be included in
|
||
* all copies or substantial portions of the Software.
|
||
*/
|
||
?>
|
||
<?
|
||
require_once "$docroot/webGui/include/Preselect.php";
|
||
$disk = &$disks[$name];
|
||
$events = explode('|',$disk['smEvents'] ?? $var['smEvents'] ?? $numbers);
|
||
|
||
function displayTemp($temp) {
|
||
global $display;
|
||
return $display['unit']=='F' ? round($temp*9/5)+32 : $temp;
|
||
}
|
||
?>
|
||
<script>
|
||
function doDispatch(form) {
|
||
var fields = {};
|
||
<?if ($display['unit']=='F'):?>
|
||
if (form.<?=addslashes(htmlspecialchars($name))?>_hotTemp.value>0) form.<?=addslashes(htmlspecialchars($name))?>_hotTemp.value = Math.round((form.<?=addslashes(htmlspecialchars($name))?>_hotTemp.value-32)*5/9);
|
||
if (form.<?=addslashes(htmlspecialchars($name))?>_maxTemp.value>0) form.<?=addslashes(htmlspecialchars($name))?>_maxTemp.value = Math.round((form.<?=addslashes(htmlspecialchars($name))?>_maxTemp.value-32)*5/9);
|
||
<?endif;?>
|
||
fields['#cfg'] = "/boot/config/smart-one.cfg";
|
||
$(form).find('input[name^="<?=addslashes(htmlspecialchars($name))?>_"]').each(function(){fields[$(this).attr('name')] = $(this).val(); $(this).prop('disabled',true);});
|
||
$.post('/webGui/include/Dispatcher.php',fields);
|
||
}
|
||
function prepareDeviceInfo(form) {
|
||
var events = [];
|
||
for (var i=0; i < <?=count($preselect)?>; i++) {
|
||
if (form.elements['at'+i].checked) events.push(form.elements['at'+i].value);
|
||
form.elements['at'+i].disabled = true;
|
||
}
|
||
var custom = form.smCustom.value.trim();
|
||
var custom = custom.length ? custom.split(',') : [];
|
||
for (var i=0; i < custom.length; i++) events.push(custom[i].trim());
|
||
form.smEvents.value = events.join('|');
|
||
if (form.smEvents.value == '<?=implode('|',$events)?>') form.smEvents.value = '';
|
||
if (form.smLevel.value == 1.00) form.smLevel.value = '';
|
||
}
|
||
function setGlue(form) {
|
||
var data = [{glue:'' ,more:0},
|
||
{glue:'' ,more:0},
|
||
{glue:'' ,more:0},
|
||
{glue:',',more:1,min1:0,max1:127},
|
||
{glue:'/',more:2,min1:1,max1:128,min2:1,max2:8},
|
||
{glue:'/',more:3,min1:1,max1:4,min2:1,max2:128,min3:1,max3:4},
|
||
{glue:'' ,more:0},
|
||
{glue:',',more:1,min1:0,max1:127}
|
||
];
|
||
var n = form.smType.selectedIndex > 0 ? form.smType.selectedIndex-1 : <?=isset($var['smIndex'])?$var['smIndex']:0?>;
|
||
var x = data[n]['more'];
|
||
for (var i=1; i <= x; i++) $('input[name="smPort'+i+'"]').attr('placeholder',data[n]['min'+i]+'..'+data[n]['max'+i]).show();
|
||
for (var i=x+1; i <= 3; i++) $('input[name="smPort'+i+'"]').val('').hide();
|
||
if (x > 0) {
|
||
$('#devtext').show();
|
||
$('input[name="smDevice"]').show();
|
||
$('#helptext').show();
|
||
} else {
|
||
$('#devtext').hide();
|
||
$('input[name="smDevice"]').val('').hide();
|
||
$('#helptext').hide();
|
||
}
|
||
}
|
||
$(function() {
|
||
var form = document.smart_settings;
|
||
<?if (!isset($disk['smType'])):?>
|
||
form.smType.selectedIndex = 0;
|
||
<?endif;?>
|
||
setGlue(form);
|
||
});
|
||
</script>
|
||
|
||
<form markdown="1" method="POST" action="/update.htm" target="progressFrame" onsubmit="doDispatch(this)">
|
||
Name:
|
||
: <span class='big'><?=htmlspecialchars(my_disk($name))?></span>
|
||
|
||
Partition size:
|
||
: <?=my_number($disk['size'])?> KB (K=1024)
|
||
|
||
Partition format:
|
||
: <?=$disk['format']?>
|
||
|
||
<?if ($disk['type']!="Parity"):?>
|
||
<?if ($disk['type']=="Data" || $disk['name']=="cache"):?>
|
||
Comments:
|
||
: <input type="text" name="diskComment.<?=$disk['idx'];?>" maxlength="256" value="<?=htmlspecialchars($disk['comment'])?>">
|
||
|
||
> This text will appear under the *Comments* column for the share in Windows Explorer.
|
||
> Enter anything you like, up to 256 characters.
|
||
|
||
<?endif;?>
|
||
File system status:
|
||
: <?=$disk['fsStatus']?><?if ($disk['fsError']) echo " - {$disk['fsError']}";?>
|
||
<?endif;?>
|
||
<?if ($disk['type']=="Data" || ($disk['type']=="Cache" && $var['SYS_CACHE_SLOTS']==1)):?>
|
||
<?if ($var['fsState']=="Stopped"):?>
|
||
<?$disabled = $var['mdState']=="RECON_DISK" || $var['mdState']=="SWAP_DSBL" ? "disabled" : "";?>
|
||
|
||
File system type:
|
||
: <select name="diskFsType.<?=$disk['idx'];?>" size="1" <?=$disabled?>>
|
||
<?=mk_option($disk['fsType'], "auto", "auto")?>
|
||
<?=mk_option($disk['fsType'], "btrfs", "btrfs")?>
|
||
<?=mk_option($disk['fsType'], "reiserfs", "reiserfs")?>
|
||
<?=mk_option($disk['fsType'], "xfs", "xfs")?>
|
||
</select>
|
||
<?else:?>
|
||
|
||
File system type:
|
||
: <select name="diskFsType.<?=$disk['idx'];?>" size="1" disabled>
|
||
<?=mk_option($disk['fsType'], "auto", "auto")?>
|
||
<?=mk_option($disk['fsType'], "btrfs", "btrfs")?>
|
||
<?=mk_option($disk['fsType'], "reiserfs", "reiserfs")?>
|
||
<?=mk_option($disk['fsType'], "xfs", "xfs")?>
|
||
</select> Array must be <span class="strong big">Stopped</span> to change
|
||
<?endif;?>
|
||
<?elseif ($disk['type']=="Cache" && $var['SYS_CACHE_SLOTS']>1):?>
|
||
|
||
File system type:
|
||
: <?=$disk['fsType'];?>
|
||
<?endif;?>
|
||
|
||
Spin down delay:
|
||
: <select name="diskSpindownDelay.<?=$disk['idx']?>" size="1">
|
||
<?=mk_option($disk['spindownDelay'], "-1", "Use default")?>
|
||
<?=mk_option($disk['spindownDelay'], "0", "Never")?>
|
||
<?=mk_option($disk['spindownDelay'], "15", "15 minutes")?>
|
||
<?=mk_option($disk['spindownDelay'], "30", "30 minutes")?>
|
||
<?=mk_option($disk['spindownDelay'], "45", "45 minutes")?>
|
||
<?=mk_option($disk['spindownDelay'], "1", "1 hour")?>
|
||
<?=mk_option($disk['spindownDelay'], "2", "2 hours")?>
|
||
<?=mk_option($disk['spindownDelay'], "3", "3 hours")?>
|
||
<?=mk_option($disk['spindownDelay'], "4", "4 hours")?>
|
||
<?=mk_option($disk['spindownDelay'], "5", "5 hours")?>
|
||
<?=mk_option($disk['spindownDelay'], "6", "6 hours")?>
|
||
<?=mk_option($disk['spindownDelay'], "7", "7 hours")?>
|
||
<?=mk_option($disk['spindownDelay'], "8", "8 hours")?>
|
||
<?=mk_option($disk['spindownDelay'], "9", "9 hours")?>
|
||
</select><span id="smart_selftest" class='orange-text'></span>
|
||
|
||
<?if (isset($disk['fsSize'])):?>
|
||
Warning disk utilization threshold (%):
|
||
: <input type="number" min="0" max="100" name="<?=htmlspecialchars($name)?>_warning" class="narrow" value="<?=strlen($disk['warning'])?$disk['warning']:''?>" placeholder="<?=$display['warning']?>">
|
||
|
||
> *Warning disk utilization* sets the warning threshold for this hard disk utilization. Exceeding this threshold will result in a warning notification.
|
||
>
|
||
> When the warning threshold is set equal or greater than the critical threshold, there will be only critical notifications (warnings are not existing).
|
||
>
|
||
> A value of zero will disable the warning threshold (including notifications).
|
||
|
||
Critical disk utilization threshold (%):
|
||
: <input type="number" min="0" max="100" name="<?=htmlspecialchars($name)?>_critical" class="narrow" value="<?=strlen($disk['critical'])?$disk['critical']:''?>" placeholder="<?=$display['critical']?>")>
|
||
|
||
> *Critical disk utilization* sets the critical threshold for this hard disk utilization. Exceeding this threshold will result in an alert notification.
|
||
>
|
||
> A value of zero will disable the critical threshold (including notifications).
|
||
|
||
<?endif;?>
|
||
Warning disk temperature threshold (°<?=$display['unit']?>):
|
||
: <input type="number" min="0" max="300" name="<?=htmlspecialchars($name)?>_hotTemp" class="narrow" value="<?=strlen($disk['hotTemp'])?displayTemp($disk['hotTemp']):''?>" placeholder="<?=displayTemp($display['hot'])?>">
|
||
|
||
> *Warning disk temperature* sets the warning threshold for this hard disk temperature. Exceeding this threshold will result in a warning notification.
|
||
>
|
||
> A value of zero will disable the warning threshold (including notifications).
|
||
|
||
Critical disk temperature threshold (°<?=$display['unit']?>):
|
||
: <input type="number" min="0" max="300" name="<?=htmlspecialchars($name)?>_maxTemp" class="narrow" value="<?=strlen($disk['maxTemp'])?displayTemp($disk['maxTemp']):''?>" placeholder="<?=displayTemp($display['max'])?>">
|
||
|
||
> *Critical disk temperature* sets the critical threshold for this hard disk temperature. Exceeding this threshold will result in an alert notification.
|
||
>
|
||
> A value of zero will disable the critical threshold (including notifications).
|
||
|
||
<?if (($var['spinupGroups']=="yes")&&($disk['type']!="Cache")):?>
|
||
Spinup group(s):
|
||
: <input type="text" name="diskSpinupGroup.<?=$disk['idx'];?>" maxlength="256" value="<?=$disk['spinupGroup']?>">
|
||
<?endif;?>
|
||
|
||
|
||
: <input type="submit" name="changeDisk" value="Apply"><input type="button" value="Done" onclick="done()">
|
||
</form>
|
||
|
||
<?if ($name=="cache" && $var['SYS_CACHE_SLOTS']>1):?>
|
||
<div id="title" class="nocontrol"><span class="left"><img src="/plugins/dynamix/icons/poolinformation.png" class="icon">Pool Information</span></div>
|
||
|
||
btrfs filesystem show:
|
||
: <?echo "<pre>".shell_exec("/sbin/btrfs filesystem show {$disk['uuid']}")."</pre>";?>
|
||
|
||
<?endif;?>
|
||
<?if ($disk['fsType']=="btrfs"):?>
|
||
<div id="title" class="nocontrol"><span class="left"><img src="/plugins/dynamix/icons/balancestatus.png" class="icon">Balance Status</span></div>
|
||
<form markdown="1" method="POST" action="/update.php" target="progressFrame">
|
||
<?if ($disk['fsStatus']=="Mounted"):?>
|
||
<?exec("$docroot/webGui/scripts/btrfs_balance status /mnt/{$disk['name']}", $balance_status, $retval);?>
|
||
|
||
btrfs filesystem df:
|
||
: <?echo "<pre>".shell_exec("/sbin/btrfs filesystem df /mnt/{$disk['name']}")."</pre>";?>
|
||
|
||
btrfs balance status:
|
||
: <?echo "<pre>" . implode("\n", $balance_status) . "</pre>";?>
|
||
|
||
<?if ($retval != 0):?>
|
||
<input type="hidden" name="#command" value="/webGui/scripts/btrfs_balance">
|
||
<input type="hidden" name="#arg[1]" value="start">
|
||
<input type="hidden" name="#arg[2]" value="/mnt/<?=$disk['name']?>">
|
||
|
||
|
||
: <input type="submit" value="Balance"><input type="text" name="#arg[3]" maxlength="256" value=""> Options (see Help)
|
||
|
||
> **Balance** will run the *btrfs balance* program to restripe the extents across all pool devices, for example,
|
||
> to convert the pool from raid1 to raid0 or vice-versa.
|
||
>
|
||
> Without any options specified a "full balance" is performed which will basically rewrite everything in the filesystem.
|
||
> The run time is potentially very long, depending on the filesystem size.
|
||
>
|
||
> unRAID uses these default options when creating a multiple-device pool:
|
||
>
|
||
> `-dconvert=raid1 -mconvert=raid1`
|
||
>
|
||
> For more complete documentation, please refer to the btrfs-balance [Manpage](https://btrfs.wiki.kernel.org/index.php/Manpage/btrfs-balance).
|
||
|
||
<?else:?>
|
||
<input type="hidden" name="#command" value="/webGui/scripts/btrfs_balance">
|
||
<input type="hidden" name="#arg[1]" value="cancel">
|
||
<input type="hidden" name="#arg[2]" value="/mnt/<?=$disk['name']?>">
|
||
|
||
|
||
: <input type="button" value="Refresh" onclick="refresh()"><input type="submit" value="Cancel"> *Running*
|
||
|
||
> **Cancel** will cancel the balance operation in progress.
|
||
|
||
<?endif;?>
|
||
<?else:?>
|
||
|
||
|
||
: <input type="submit" value="Balance" disabled>**Balance** is only available when array is Started.
|
||
|
||
<?endif;?>
|
||
</form>
|
||
<?endif;?>
|
||
<?if ($disk['fsType']=="btrfs"):?>
|
||
<div id="title" class="nocontrol"><span class="left"><img src="/plugins/dynamix/icons/scrubstatus.png" class="icon">Scrub Status</span></div>
|
||
<form markdown="1" method="POST" action="/update.php" target="progressFrame">
|
||
<?if ($disk['fsStatus']=="Mounted"):?>
|
||
<?exec("$docroot/webGui/scripts/btrfs_scrub status /mnt/{$disk['name']}", $scrub_status, $retval);?>
|
||
|
||
btrfs scrub status:
|
||
: <?echo "<pre>" . implode("\n", $scrub_status) . "</pre>";?>
|
||
|
||
<?if ($retval != 0):?>
|
||
<input type="hidden" name="#command" value="/webGui/scripts/btrfs_scrub">
|
||
<input type="hidden" name="#arg[1]" value="start">
|
||
<input type="hidden" name="#arg[2]" value="/mnt/<?=$disk['name']?>">
|
||
<input type="hidden" name="#arg[3]" value="-r">
|
||
|
||
|
||
: <input type="submit" value="Scrub"><label><input type="checkbox" name="#arg[3]" value=""> Repair corrupted blocks</label>
|
||
|
||
> **Scrub** runs the *btrfs scrub* program which will read all data and metadata blocks from all
|
||
> devices and verify checksums.
|
||
>
|
||
> If *Repair corrupted blocks* is checked, *btrfs scrub* will repair corrupted blocks if there’s a correct copy available.
|
||
|
||
<?else:?>
|
||
<input type="hidden" name="#command" value="/webGui/scripts/btrfs_scrub">
|
||
<input type="hidden" name="#arg[1]" value="cancel">
|
||
<input type="hidden" name="#arg[2]" value="/mnt/<?=$disk['name']?>">
|
||
|
||
|
||
: <input type="button" value="Refresh" onclick="refresh()"><input type="submit" value="Cancel"> *Running*
|
||
|
||
> **Cancel** will cancel the Scrub operation in progress.
|
||
|
||
<?endif;?>
|
||
<?else:?>
|
||
|
||
|
||
: <input type="submit" value="Scrub" disabled>**Scrub** is only available when array is Started.
|
||
|
||
<?endif;?>
|
||
</form>
|
||
<?endif?>
|
||
<?if ($disk['fsType']=="btrfs"):?>
|
||
<div id="title" class="nocontrol"><span class="left"><img src="/plugins/dynamix/icons/filesystemstatus.png" class="icon">Check Filesystem Status</span></div>
|
||
<form markdown="1" method="POST" action="/update.php" target="progressFrame">
|
||
<?if ($var['fsState']=="Started" && $var['startMode']=='Maintenance'):?>
|
||
<?exec("$docroot/webGui/scripts/btrfs_check status /dev/{$disk['deviceSb']} {$disk['id']}", $check_status, $retval);?>
|
||
|
||
btrfs check status:
|
||
: <?echo "<pre>" . implode("\n", $check_status) . "</pre>";?>
|
||
|
||
<?if ($retval != 0):?>
|
||
<input type="hidden" name="#command" value="/webGui/scripts/btrfs_check">
|
||
<input type="hidden" name="#arg[1]" value="start">
|
||
<input type="hidden" name="#arg[2]" value="/dev/<?=$disk['deviceSb']?>">
|
||
<input type="hidden" name="#arg[3]" value="<?=$disk['id']?>">
|
||
|
||
|
||
: <input type="submit" value="Check"><input type="text" name="#arg[4]" maxlength="256" value="--readonly"> Options (see Help)
|
||
|
||
> **Check** will run the *btrfs check* program to check file system integrity on the device.
|
||
>
|
||
> The *Options* field is initialized with *--readonly* which specifies check-only. If repair is needed, you should run
|
||
> a second Check pass, setting the *Options* to *--repair*; this will permit *btrfs check* to fix the file system.
|
||
>
|
||
> After starting a Check, you should Refresh to monitor progress and status. Depending on
|
||
> how large the file system is, and what errors might be present, the operation can take **a long time** to finish (hours).
|
||
> Not much info is printed in the window, but you can verify the operation is running by observing the read/write counters
|
||
> increasing for the device on the Main page.
|
||
|
||
<?else:?>
|
||
<input type="hidden" name="#command" value="/webGui/scripts/btrfs_check">
|
||
<input type="hidden" name="#arg[1]" value="cancel">
|
||
<input type="hidden" name="#arg[2]" value="/dev/<?=$disk['deviceSb']?>">
|
||
<input type="hidden" name="#arg[3]" value="<?=$disk['id']?>">
|
||
|
||
|
||
: <input type="button" value="Refresh" onclick="refresh()"><input type="submit" value="Cancel"> *Running*
|
||
|
||
> **Cancel** will cancel the Check operation in progress.
|
||
|
||
<?endif;?>
|
||
<?else:?>
|
||
|
||
|
||
: <input type="submit" value="Check" disabled>**Check** is only available when array is Started in **Maintenance** mode.
|
||
|
||
<?endif;?>
|
||
</form>
|
||
<?endif;?>
|
||
<?if ($disk['fsType']=="reiserfs"):?>
|
||
<div id="title" class="nocontrol"><span class="left"><img src="/plugins/dynamix/icons/filesystemstatus.png" class="icon">Check Filesystem Status</span></div>
|
||
<form markdown="1" method="POST" action="/update.php" target="progressFrame">
|
||
<?if ($var['fsState']=="Started" && $var['startMode']=='Maintenance'):?>
|
||
<?exec("$docroot/webGui/scripts/reiserfs_check status /dev/{$disk['deviceSb']} {$disk['id']}", $check_status, $retval);?>
|
||
|
||
reiserfsck status:
|
||
: <?echo "<pre>" . implode("\n", $check_status) . "</pre>";?>
|
||
|
||
<?if ($retval != 0):?>
|
||
<input type="hidden" name="#command" value="/webGui/scripts/reiserfs_check">
|
||
<input type="hidden" name="#arg[1]" value="start">
|
||
<input type="hidden" name="#arg[2]" value="/dev/<?=$disk['deviceSb']?>">
|
||
<input type="hidden" name="#arg[3]" value="<?=$disk['id']?>">
|
||
|
||
|
||
: <input type="submit" value="Check"><input type="text" name="#arg[4]" maxlength="256" value=""> Options (see Help)
|
||
|
||
> **Check** will run the *reiserfsck* program to check file system integrity on the device.
|
||
>
|
||
> The *Options* field may be filled in with specific options used to fix problems in the file system. Typically, you
|
||
> first run a Check pass leaving *Options* blank. Upon completion, if *reiserfsck* finds any problems, you must
|
||
> run a second Check pass, using a specific option as instructed by the first *reiserfsck* pass.
|
||
>
|
||
> After starting a Check you should Refresh to monitor progress and status. Depending on
|
||
> how large the file system is, and what errors might be present, the operation can take **a long time** to finish (hours).
|
||
> Not much info is printed in the window, but you can verify the operation is running by observing the read/write counters
|
||
> increasing for the device on the Main page.
|
||
|
||
<?else:?>
|
||
<input type="hidden" name="#command" value="/webGui/scripts/reiserfs_check">
|
||
<input type="hidden" name="#arg[1]" value="cancel">
|
||
<input type="hidden" name="#arg[2]" value="/dev/<?=$disk['deviceSb']?>">
|
||
<input type="hidden" name="#arg[3]" value="<?=$disk['id']?>">
|
||
|
||
|
||
: <input type="button" value="Refresh" onclick="refresh()"><input type="submit" value="Cancel"> *Running*
|
||
|
||
> **Cancel** will cancel the Check operation in progress.
|
||
|
||
<?endif;?>
|
||
<?else:?>
|
||
|
||
|
||
: <input type="submit" value="Check" disabled>**Check** is only available when array is Started in **Maintenance** mode.
|
||
|
||
<?endif;?>
|
||
</form>
|
||
<?endif;?>
|
||
<?if ($disk['fsType']=="xfs"):?>
|
||
<div id="title" class="nocontrol"><span class="left"><img src="/plugins/dynamix/icons/filesystemstatus.png" class="icon">Check Filesystem Status</span></div>
|
||
<form markdown="1" method="POST" action="/update.php" target="progressFrame">
|
||
<?if ($var['fsState']=="Started" && $var['startMode']=='Maintenance'):?>
|
||
<?exec("$docroot/webGui/scripts/xfs_check status /dev/{$disk['deviceSb']} {$disk['id']}", $check_status, $retval);?>
|
||
|
||
xfs_repair status:
|
||
: <?echo "<pre>" . implode("\n", $check_status) . "</pre>";?>
|
||
|
||
<?if ($retval != 0):?>
|
||
<input type="hidden" name="#command" value="/webGui/scripts/xfs_check">
|
||
<input type="hidden" name="#arg[1]" value="start">
|
||
<input type="hidden" name="#arg[2]" value="/dev/<?=$disk['deviceSb']?>">
|
||
<input type="hidden" name="#arg[3]" value="<?=$disk['id']?>">
|
||
|
||
|
||
: <input type="submit" value="Check"><input type="text" name="#arg[4]" maxlength="256" value="-n"> Options (see Help)
|
||
|
||
> **Check** will run the *xfs_repair* program to check file system integrity on the device.
|
||
>
|
||
> The *Options* field is initialized with *-n* which specifies check-only. If repair is needed, you should run
|
||
> a second Check pass, setting the *Options* blank; this will permit *xfs_repair* to fix the file system.
|
||
>
|
||
> After starting a Check, you should Refresh to monitor progress and status. Depending on
|
||
> how large the file system is, and what errors might be present, the operation can take **a long time** to finish (hours).
|
||
> Not much info is printed in the window, but you can verify the operation is running by observing the read/write counters
|
||
> increasing for the device on the Main page.
|
||
|
||
<?else:?>
|
||
<input type="hidden" name="#command" value="/webGui/scripts/xfs_check">
|
||
<input type="hidden" name="#arg[1]" value="cancel">
|
||
<input type="hidden" name="#arg[2]" value="/dev/<?=$disk['deviceSb']?>">
|
||
|
||
|
||
: <input type="button" value="Refresh" onclick="refresh()"><input type="submit" value="Cancel"> *Running*
|
||
|
||
> **Cancel** will cancel the Check operation in progress.
|
||
|
||
<?endif;?>
|
||
<?else:?>
|
||
|
||
|
||
: <input type="submit" value="Check" disabled>**Check** is only available when array is Started in **Maintenance** mode.
|
||
|
||
<?endif;?>
|
||
</form>
|
||
<?endif;?>
|
||
|
||
<div id="title"><span class="left"><img src="/webGui/icons/smartchecks.png" class="icon">SMART Settings</span></div>
|
||
|
||
<form markdown="1" name="smart_settings" method="POST" action="/update.php" target="progressFrame" onsubmit="prepareDeviceInfo(this)">
|
||
<input type="hidden" name="#file" value="/boot/config/smart-one.cfg">
|
||
<input type="hidden" name="#include" value="webGui/include/update.smart.php">
|
||
<input type="hidden" name="#section" value="<?=htmlspecialchars($name)?>">
|
||
<input type="hidden" name="smEvents" value="">
|
||
<input type="hidden" name="smGlue" value="<?=htmlspecialchars($var['smGlue'])?>">
|
||
SMART notification value:
|
||
: <select name="smSelect" size="1">
|
||
<?=mk_option($disk['smSelect'], "-1", "Use default")?>
|
||
<?=mk_option($disk['smSelect'], "0", "Raw")?>
|
||
<?=mk_option($disk['smSelect'], "1", "Normalized")?>
|
||
</select>
|
||
|
||
> SMART notifications are generated on either an increasing RAW value of the attribute, or a decreasing NORMALIZED value which reaches a predefined threshold set by the manufacturer.
|
||
>
|
||
> Each disk may have its own specific setting overruling the 'default' setting (see global SMART settings under Disk Settings).
|
||
|
||
SMART notification tolerance level:
|
||
: <select name="smLevel" size="1">
|
||
<?=mk_option($disk['smLevel'], "-1", "Use default")?>
|
||
<?=mk_option($disk['smLevel'], "1.00", "Absolute")?>
|
||
<?=mk_option($disk['smLevel'], "1.05", "5%")?>
|
||
<?=mk_option($disk['smLevel'], "1.10", "10%")?>
|
||
<?=mk_option($disk['smLevel'], "1.15", "15%")?>
|
||
<?=mk_option($disk['smLevel'], "1.20", "20%")?>
|
||
<?=mk_option($disk['smLevel'], "1.25", "25%")?>
|
||
<?=mk_option($disk['smLevel'], "1.50", "50%")?>
|
||
</select>
|
||
|
||
> A tolerance level may be given to prevent that small changes result in a notification. Setting a too high tolerance level may result in critical changes without a notification.
|
||
>
|
||
> Each disk may have its own specific setting overruling the 'default' setting (see global SMART settings under Disk Settings).
|
||
|
||
SMART controller type:
|
||
: <select name="smType" size="1" onchange="setGlue(this.form)">
|
||
<?=mk_option($disk['smType'], "-1", "Use default")?>
|
||
<?=mk_option($disk['smType'], " ", "Automatic")?>
|
||
<?=mk_option($disk['smType'], "-d ata", "ATA")?>
|
||
<?=mk_option($disk['smType'], "-d sat", "SATA")?>
|
||
<?=mk_option($disk['smType'], "-d scsi", "SCSI")?>
|
||
<?=mk_option($disk['smType'], "-d 3ware", "3Ware")?>
|
||
<?=mk_option($disk['smType'], "-d areca", "Areca")?>
|
||
<?=mk_option($disk['smType'], "-d hpt", "HighPoint")?>
|
||
<?=mk_option($disk['smType'], "-d marvell", "Marvell")?>
|
||
<?=mk_option($disk['smType'], "-d megaraid", "MegaRAID")?>
|
||
</select>
|
||
<input type="text" name="smPort1" maxlength="3" value="<?=$disk['smPort1']?>" style="display:none;width:32px">
|
||
<input type="text" name="smPort2" maxlength="3" value="<?=$disk['smPort2']?>" style="display:none;width:32px">
|
||
<input type="text" name="smPort3" maxlength="3" value="<?=$disk['smPort3']?>" style="display:none;width:32px"><span id="devtext" style="display:none;font-weight:bold">/dev/</span>
|
||
<input type="text" name="smDevice" value="<?=isset($disk['smDevice'])?$disk['smDevice']:''?>" style="display:none;width:32px" placeholder="<?=htmlspecialchars($disk['device'])?>"><span id="helptext" style="display:none;font-style:italic">enter disk index and device name as applicable to your controller</span>
|
||
|
||
> By default automatic controller selection is done by smartctl to read the SMART information. Certain controllers however need specific settings for smartctl to work.
|
||
> Use this setting to select your controller type and fill-in the specific disk index and device name for your situation. Use the manufacturer's documentation to find the relevant information.
|
||
>
|
||
> Each disk may have its own specific setting overruling the 'default' setting (see global SMART settings under Disk Settings).
|
||
|
||
SMART attribute notifications:
|
||
: <input type="text" name="smCustom" value="<?=isset($disk['smCustom'])?$disk['smCustom']:$var['smCustom']?>" class="narrow">Custom attributes (use comma to separate numbers)
|
||
|
||
<?for ($x = 0; $x < count($preselect); $x++):?>
|
||
|
||
: <input type="checkbox" name="at<?=$x?>" value="<?=$preselect[$x]['code']?>"<?=in_array($preselect[$x]['code'],$events)?' checked':''?>><span style="display:inline-block;width:136px"><?=$preselect[$x]['code']?></span><?=$preselect[$x]['text']?>
|
||
<?endfor;?>
|
||
|
||
> The user can enable or disable notifications for the given SMART attributes. It is recommended to keep the default, which is ALL selected attributes,
|
||
> when certain attributes are not present on your hard disk or do not provide the correct information, these may be excluded.
|
||
> In addition custom SMART attributes can be entered to generate notifications. Be careful in this selection,
|
||
> it may cause an avalance of notifcations if inappropriate SMART attributes are chosen.
|
||
>
|
||
> Each disk may have its own specific setting overruling the 'default' setting (see global SMART settings under Disk Settings).
|
||
|
||
<input type="submit" name="#default" value="Default">
|
||
: <input type="submit" name="#apply" value="Apply"><input type="button" value="Done" onclick="done()">
|
||
</form>
|