| **_(Started)_=((_var($var,'startMode')=='Maintenance')?' - _(Maintenance Mode)_':'')?>** |
|
**_(Stop)_** _(will take the array off-line)_. |
if (_var($var,'fsNumUnmountable',0) > 0):?>
**=_('Unmountable disk'.(_var($var,'fsNumUnmountable',0) == 1 ? '' : 's').' present')?>:**
$cache = [];
foreach ($disks as $disk) if (substr(_var($disk,'fsStatus'),0,11) == 'Unmountable' || in_array(pool_name(_var($disk,'name')),$cache)) {
if (strlen(_var($disk,'id'))) echo "".my_disk(_var($disk,'name'))." • ".my_id(_var($disk,'id'))." ("._var($disk,'device').") ";
if (in_array(_var($disk,'name'),$pools)) $cache[] = $disk['name'];
}
?> | |
**_(Format)_** _(will create a file system in all **Unmountable** disks)_.
_(Yes, I want to do this)_
|
endif;
$action = preg_split('/\s+/',_var($var,'mdResyncAction'));
if (!$spot):
if ($action[0] == "recon"):
$resync = resync($action[1]);
?> | | **=_('Sync')?>** =_("will start **$resync**")?>. |
elseif ($action[0]=="clear"):?>
| | **_(Clear)_** _(will start **Disk-Clear** of new data disk(s))_. |
else:
if ($action[0] == "check" && count($action) > 1):?>
| _(Parity is valid)_. | | **_(Check)_** _(will start **Parity-Check**)_. onclick="$.cookie('one','tab1')">(_(Schedule)_)
_(Write corrections to parity)_ |
elseif ($action[0] == "check"):?>
| | **_(Check)_** _(will start **Read-Check** of all array disks)_. |
endif;?>
if (!$poolsOnly):?>
| |
[$date, $duration, $speed, $status, $error, $action, $size] = last_parity_log();
if (_var($var,'sbSyncExit',0) != 0):?>
=sprintf(_('Last check incomplete on **%s**'),_(my_time(_var($var,'sbSynced2',0)).day_count(_var($var,'sbSynced2',0)),0))?>
_(Error code)_: =my_error(_var($var,'sbSyncExit'))?>
=print_error(_var($var,'sbSyncErrs',0))?> |
elseif (_var($var,'sbSynced',0) == 0):
if ($status == 0):?>
=sprintf(_('Last checked on **%s**'),_(my_time($date).day_count($date),0))?>
_(Duration)_: =my_check($duration,$speed)?>
=print_error($error)?> |
else:?>
=sprintf(_('Last check incomplete on **%s**'),_(my_time($date).day_count($date),0))?>
_(Error code)_: =my_error($status)?>
=print_error($error)?> |
endif;
elseif (_var($var,'sbSynced2',0)==0):
if ($status == 0):?>
=sprintf(_('Last checked on **%s**'),_(my_time(_var($var,'sbSynced',0)).day_count(_var($var,'sbSynced',0)),0))?>
_(Duration)_: =my_check($duration,$speed)?>
=print_error($error)?> |
else:?>
=sprintf(_('Last check incomplete on **%s**'),_(my_time(_var($var,'sbSynced',0)).day_count(_var($var,'sbSynced',0)),0))?>
_(Error code)_: =my_error($status)?>
=print_error($error)?> |
endif;
else:?>
=sprintf(_('Last check completed on **%s**'),_(my_time(_var($var,'sbSynced2',0)).day_count(_var($var,'sbSynced2',0)),0))?>
_(Duration)_: =my_check($duration,$speed)?>
=print_error(_var($var,'sbSyncErrs',0))?> |
endif;
endif; // end check for poolsOnly
endif;
else:
if ($action[0] == "recon"):
$resync = resync($action[1]);
?> | =_("$resync in progress")?>. |
value="_(Pause)_" onclick="pauseParity(this.form)" value="_(Resume)_" onclick="resumeParity(this.form)" disabled>
|
**=_('Pause')?>** =_("will pause $resync")?>.**=_('Resume')?>** =_("will resume $resync")?>. **=_('Cancel')?>** =_("will stop $resync")?>.
_(WARNING: canceling may leave the array unprotected)_! |
elseif ($action[0] == "clear"):?>
| _(Disk-Clear in progress)_. |
value="_(Pause)_" onclick="pauseParity(this.form)" value="_(Resume)_" onclick="resumeParity(this.form)" disabled>
|
**_(Pause)_** _(will pause Disk-Clear)_.**_(Resume)_** _(will resume Disk-Clear)_. **_(Cancel)_** _(will stop Disk-Clear)_. |
elseif ($action[0] == "check" && count($action) > 1):?>
| _(Parity-Check in progress)_. |
value="_(Pause)_" onclick="pauseParity(this.form)" value="_(Resume)_" onclick="resumeParity(this.form)" disabled>
|
**_(Pause)_** _(will pause Parity-Check)_.**_(Resume)_** _(will resume Parity-Check)_. **_(Cancel)_** _(will stop Parity-Check)_. |
elseif ($action[0] == "check"):?>
| _(Read-Check in progress)_. |
value="_(Pause)_" onclick="pauseParity(this.form)" value="_(Resume)_" onclick="resumeParity(this.form)" disabled>
|
**_(Pause)_** _(will pause Read-Check)_.**_(Resume)_** _(will resume Read-Check)_. **_(Cancel)_** _(will stop Read-Check)_. |
endif;
$stamps = '/var/tmp/stamps.ini';
$synced = file_exists($stamps) ? explode(',',file_get_contents($stamps)) : [];
$sbSynced = array_shift($synced) ?: _var($var,'sbSynced');
$sbUpdate = _var($var,'mdResyncDt') ? $sbSynced : _var($var,'sbUpdated');?>
| |
=sprintf(_('Current operation %s on **%s**'),(_var($var,'mdResyncDt')?_('started'):_('paused')),_(my_time($sbUpdate).day_count($sbUpdate),0))?> |
| _(Total size)_: | | |
| _(Elapsed time)_: | | |
| _(Current position)_: | | |
| _(Estimated speed)_: | | |
| _(Estimated finish)_: | | |
if ($action[0] == "check"):?>
if (count($action) > 1):?>
| =_var($var,'mdResyncCorr') == 0 ? _('Sync errors detected') : _('Sync errors corrected')?>: | | |
else:?>
| =_var($var,'mdResyncCorr') == 0 ? _('Read errors detected') : _('Read errors corrected')?>: | | |
endif;
endif;
endif;
break;
case "Starting":?>
| **_(Starting)_...** | | |
| | |
break;
case "Formatting":?>
| **_(Started, formatting)_...** | | |
| | |
break;
case "Copying":?>
| **_(Starting, copying)_... ** | | |
| |
=sprintf(_('Current operation %s on **%s**'),_('started'),_(my_time(_var($var,'sbUpdated',0)).day_count(_var($var,'sbSynced',0)),0))?> |
break;
case "Clearing":?>
| **_(Started, clearing)_... ** | | |
| |
=sprintf(_('Current operation %s on **%s**'),_('started'),_(my_time(_var($var,'sbUpdated',0)).day_count(_var($var,'sbSynced',0)),0))?> |
break;
case "Stopping":?>
| **_(Stopping)_...** | | |
break;
case "Stopped":
if (_var($var,'configValid') == "error"):?>
| **_(Stopped)_.** | |
_(Invalid, missing or expired)_ _(registration key)_. |
elseif (_var($var,'configValid') == "invalid"):?>
| **_(Stopped)_.** | |
_(Too many attached devices. Please consider upgrading your)_ _(registration key)_. |
elseif (_var($var,'configValid') == "ineligible"):?>
| **_(Stopped)_.** | |
_(Ineligible to run this version of Unraid OS. Please consider extending your)_ _(registration key)_. |
elseif (_var($var,'configValid') == "nokeyserver"):?>
| **_(Stopped)_.** | |
_(Cannot contact key-server. Please check your)_ _(network settings)_. |
elseif (_var($var,'configValid') == "withdrawn"):?>
| **_(Stopped)_.** | |
_(This Unraid OS release has been withdrawn and may no longer be used. Please)_ _(update)_ _(your server)_. |
else:
switch (_var($var,'mdState')):
case "STARTED":
?> | **_(Stopped)_**. _(Configuration valid)_. | |
**_(Start)_** _(will bring the array on-line)_. |
maintenance_mode();
check_encryption();
break;
case "STOPPED":
$action = explode(' ',_var($var,'mdResyncAction'));
if ($action[0] == "recon"):
$resync = resync($action[1]);
?> | **_(Stopped)_**. _(Configuration valid)_. | |
**=_('Start')?>** =_("will bring the array on-line and start **$resync**")?>. |
elseif ($action[0] == "clear"):?>
| **_(Stopped)_**. _(New data disk(s) detected)_. | |
**_(Start)_** _(will bring the array on-line and start **Disk-Clear** of new data disk(s))_. |
elseif (_var($var,'sbClean') != "yes" && $action[0] == "check" && count($action) > 1):?>
| **_(Stopped)_**. _(Unclean shutdown detected)_. | |
**_(Start)_** _(will bring the array on-line and start **Parity-Check**)_.
_(Write corrections to parity)_ |
elseif (_var($var,'sbClean') != "yes" && $action[0] == "check"):?>
| **_(Stopped)_**. _(Unclean shutdown detected)_. | |
**_(Start)_** _(will bring the array on-line)_. |
elseif (missing_cache()):?>
| **_(Stopped)_**. _(Missing pool disk)_. | |
**_(Start)_** _(will remove the missing pool disk and then bring the array on-line)_.
_(Yes, I want to do this)_ |
else:?>
| **_(Stopped)_**. _(Configuration valid)_. | |
**_(Start)_** _(will bring the array on-line)_. |
endif;
maintenance_mode();
check_encryption();
break;
case "NEW_ARRAY":
if (strpos(_var($disks['parity'],'status'),"DISK_NP") === 0 && strpos(_var($disks['parity2'],'status'),"DISK_NP") === 0):?>
| **_(Stopped)_**. _(Configuration valid)_. | |
**_(Start)_** _(will record all disk information and bring the array on-line)_.
_(The array will be immediately available, but **unprotected** since *parity* has not been assigned)_. |
else:?>
| **_(Stopped)_**. _(Configuration valid)_. | |
**_(Start)_** _(will record all disk information, bring the array on-line, and start Parity-Sync)_.
_(The array will be immediately available, but **unprotected** until Parity-Sync completes)_.
_(Parity is already valid)_. |
endif;
maintenance_mode();
check_encryption();
break;
case "DISABLE_DISK":?>
| **_(Stopped)_**. _(Missing disk)_. | |
**_(Start)_** _(will disable the missing disk and then bring the array on-line. Install a replacement disk as soon as possible)_.
_(Yes, I want to do this)_ |
maintenance_mode();
check_encryption();
break;
case "RECON_DISK":?>
| **_(Stopped)_**. _(Replacement disk installed)_. | |
**_(Start)_** _(will start **Parity-Sync** and/or **Data-Rebuild**)_. |
maintenance_mode();
check_encryption();
break;
case "SWAP_DSBL":
if (_var($var,'fsCopyPrcnt') == "100"):?>
| **_(Stopped)_**. _(Upgrading disk/swapping parity)_. | |
**_(Start)_** _(will expand the file system of the data disk (if possible); then bring the array on-line and start Data-Rebuild)_. |
maintenance_mode();
check_encryption();
else:?>
| **_(Stopped)_**. _(Upgrading disk/swapping parity)_. | |
**_(Copy)_** _(will copy the parity information to the new *parity* disk)_.
_(Once copy completes, the array may be Started, to initiate Data-Rebuild of the disabled disk)_.
_(Yes, I want to do this)_ |
endif;
break;
case "ERROR:INVALID_EXPANSION":?>
| **_(Stopped)_**. _(Invalid expansion)_. | |
_(You may not add new disk(s) and also remove existing disk(s))_. |
break;
case "ERROR:NEW_DISK_TOO_SMALL":?>
| **_(Stopped)_**. _(Replacement disk is too small)_. | |
_(The replacement disk must be as big or bigger than the original)_. |
break;
case "ERROR:PARITY_NOT_BIGGEST":?>
| **_(Stopped)_**. _(Disk in parity slot is not biggest)_. | |
_(If this is a new array, move the largest disk into the *parity* slot)_.
_(If you are adding a new disk or replacing a disabled disk, try Parity-Swap)_. |
break;
case "ERROR:TOO_MANY_MISSING_DISKS":?>
| **_(Stopped)_**. _(Invalid configuration)_. | |
_(Too many wrong and/or missing disks)_! |
break;
case "ERROR:NO_DATA_DISKS":?>
| **_(Stopped)_**. _(No data disks)_. | |
_(No array data disks have been assigned)_! |
break;
case "ERROR:NO_DEVICES":?>
| **_(Stopped)_**. _(No devices)_. | |
_(No array devices have been assigned)_! |
break;
endswitch;
endif;
endswitch;?>
| |