Files
webgui/plugins/dynamix/ArrayDevices.page
2017-08-20 18:20:53 +02:00

138 lines
5.7 KiB
Plaintext

Menu="Main:1"
Title="Array Devices"
Tag="database"
---
<?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.
*/
?>
<script>
var timer = null;
function display_diskio() {
if ($.cookie('diskio')===undefined) {
$('span.number').show(); $('span.diskio').hide();
} else {
$('span.diskio').show(); $('span.number').hide();
}
}
function toggle_diskio(init) {
if (!init) {
if ($.cookie('diskio')===undefined) $.cookie('diskio','diskio',{path:'/',expires:3650}); else $.removeCookie('diskio',{path:'/'});
}
if ($.cookie('diskio')===undefined) {
$('i.toggle').removeClass('fa-tachometer').addClass('fa-list');
} else {
$('i.toggle').removeClass('fa-list').addClass('fa-tachometer');
}
display_diskio();
}
function array_status() {
var diskio = $.cookie('diskio')===undefined ? 0 : 1;
$.post('/webGui/include/DeviceList.php',{path:'<?=$path?>',device:'array'},function(data) {
if (data) {$('#array_devices').html(data); display_diskio();}
<?if ($var['fsState']=='Started'):?>
<?if ($tabbed):?>
if ($('#tab1').is(':checked')) timer = setTimeout(array_status,3000);
<?else:?>
setTimeout(array_status,3000);
<?endif;?>
<?endif;?>
});
}
<?if ($var['fsState']=='Started' && $tabbed):?>
$('#tab1').bind({click:function() {clearTimeout(timer); array_status(); $('i.toggle').show('slow');}});
<?else:?>
$('#tab1').bind({click:function() {$('i.toggle').show('slow');}});
<?endif;?>
array_status();
</script>
<table class="disk_status wide">
<thead><tr><td>Device</td><td>Identification</td><td>Temp.</td><td>Reads</td><td>Writes</td><td>Errors</td><td>FS</td><td>Size</td><td>Used</td><td>Free</td><td>View</td></tr></thead>
<tbody id="array_devices">
<?
foreach ($disks as $disk):
if ($disk['type']=='Parity' or $disk['type']=='Data')
echo "<tr><td colspan='11'>&nbsp;</td></tr>";
endforeach;
if ($display['total']) echo "<tr class='tr_last'><td colspan='11'>&nbsp;</td></tr>";
?>
</tbody>
</table>
> **Colored Status Indicator** the significance of the color indicator at the beginning of each line in *Array Devices* is as follows:
>
> <img src='/webGui/images/green-on.png' class='icon'>Normal operation, device is active.
>
> <img src='/webGui/images/green-blink.png' class='icon'>Device is in standby mode (spun-down).
>
> <img src='/webGui/images/yellow-on.png' class='icon'>Device contents emulated.
>
> <img src='/webGui/images/red-on.png' class='icon'>Device is disabled, contents emulated.
>
> <img src='/webGui/images/blue-on.png' class='icon'>New device.
>
> <img src='/webGui/images/grey-off.png' class='icon'>No device present, position is empty.
>
> **Identification** is the *signature* that uniquely identifies a storage device. The signature
> includes the device model number, serial number, linux device id, and the device size.
>
> **Temp.** (temperature) is read directly from the device. You configure which units to use on
> the [Display Preferences](Settings/DisplaySettings) page. We do not read the temperature of spun-down hard
> drives since this typically causes them to spin up; instead we display the `*` symbol. We also
> display the `*` symbol for SSD and Flash devices, though sometimes these devices do report a valid
> temperature, and sometimes they return the value `0`.
>
> **Size, Used, Free** reports the total device size, used space, and remaining space for files. These
> units are also configured on the [Display Preferences](Settings/DisplaySettings) page. The
> amount of space used will be non-zero even for an empty disk due to file system overhead.
>
> *Note: for a multi-device cache pool, this data is for the entire pool as returned by btrfs.*
>
> **Reads, Writes** are a count of I/O requests sent to the device I/O drivers. These statistics may
> be cleared at any time, refer to the Array Status section below.
>
> **Errors** counts the number of *unrecoverable* errors reported by the device
> I/O drivers. Missing data due to unrecoverable array read errors is filled in on-the-fly using parity
> reconstruct (and we attempt to write this data back to the sector(s) which failed). Any unrecoverable
> write error results in *disabling* the disk.
>
> **FS** indicates the file system detected in partition 1 of the device.
>
> **View** column contains a folder icon indicating the device is *mounted*. Click the icon to
> browse the file system.
>
> If "Display array totals" is enable on the [Display Preferences](Settings/DisplaySettings) page, a
> **Total** line is included which provides a tally of the device statistics, including the average temperature
> of your devices.
>
> The Array must be Stopped in order to change Array device assignments.
>
> An unRAID array consists of a single Parity disk and a number of Data disks. The Data
> disks are exclusively used to store user data, and the Parity disk provides the redundancy necessary
> to recover from any singe disk failure.
>
> Since data is not striped across the array, the Parity disk must be as large, or larger than the largest Data
> disk. Parity should also be your highest performance drive.
>
> Each Data disk has its own file system and can be exported as a
> separate share.
>
> Click on the Device name to configure individual device settings and launch certain utilities.
<?if ($var['fsState'] == "Stopped"):?>
<div></div>
> **Slots** select the number of device slots in your server designated for Array devices.
> The minimum number of Array slots is 2, and you must have at least one device assigned to the array.
<?endif;?>