forked from unraid/webgui
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathArrayDevices.page
More file actions
145 lines (141 loc) · 6.27 KB
/
ArrayDevices.page
File metadata and controls
145 lines (141 loc) · 6.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
Menu="Main:1"
Title="Array Devices"
Tag="database"
---
<?PHP
/* Copyright 2005-2018, Lime Technology
* Copyright 2012-2018, 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>
function toggle_state(device,name,action) {
var event = null;
var button = null;
if (name) {
if (name.match(/^(parity|disk)/)!==null) event = 'array_status';
else if (name.match(/^cache/)!==null) event = 'cache_status';
else if (name.match(/^flash/)!==null) event = 'boot_status';
else event = 'open_status';
$('#dev-'+name).removeClass('fa-sort-up fa-sort-down').addClass('fa-refresh fa-spin');
} else if (device!='Clear') {
$('[id^="dev-"]').removeClass('fa-sort-up fa-sort-down').addClass('fa-refresh fa-spin');
button = '[id^=button-]';
}
pauseEvents(event);
$.post('/webGui/include/ToggleState.php',{device:device,name:name,action:action,state:'<?=$var['mdState']?>',csrf:'<?=$var['csrf_token']?>'},function(){resumeEvents(event,500);if (button) $(button).prop('disabled',false);});
}
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'):?>
timers.array_status = setTimeout(array_status,3000);
<?endif;?>
});
}
<?if ($var['fsState']=='Started'):?>
$('#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'> </td></tr>";
endforeach;
if ($display['total']) echo "<tr class='tr_last'><td colspan='11'> </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:
>
> <i class='fa fa-circle orb green-orb'></i>Normal operation, device is active.
>
> <i class='fa fa-circle orb grey-orb'></i>Device is in standby mode (spun-down).
>
> <i class='fa fa-warning orb yellow-orb'></i>Device contents emulated.
>
> <i class='fa fa-times orb red-orb'></i>Device is disabled, contents emulated.
>
> <i class='fa fa-square orb blue-orb'></i>New device.
>
> <i class='fa fa-square orb grey-orb'></i>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;?>