| **_(Started)_=(($var['startMode']=='Maintenance')?' - _(Maintenance Mode)_':'')?>** |
|
**_(Stop)_** _(will take the array off-line)_. |
if ($var['fsNumUnmountable']>0):?>
**=_('Unmountable disk'.($var['fsNumUnmountable']==1?'':'s').' present')?>:**
$cache = [];
foreach ($disks as $disk) if (substr($disk['fsStatus']??'',0,11)=='Unmountable' || in_array(prefix($disk['name']),$cache)) {
if (isset($disk['id'])) echo "".my_disk($disk['name'])." • ".my_id($disk['id'])." (".$disk['device'].") ";
if (in_array($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['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;?>
| |
[$date,$duration,$speed,$status,$error,$action,$size] = last_parity_log();
if ($var['sbSyncExit']!=0):?>
=sprintf(_('Last check incomplete on **%s**'),_(my_time($var['sbSynced2']).day_count($var['sbSynced2']),0))?>
_(Error code)_: =my_error($var['sbSyncExit'])?>
=print_error($var['sbSyncErrs'])?> |
elseif ($var['sbSynced']==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['sbSynced2']==0):
if ($status==0):?>
=sprintf(_('Last checked on **%s**'),_(my_time($var['sbSynced']).day_count($var['sbSynced']),0))?>
_(Duration)_: =my_check($duration,$speed)?>
=print_error($error)?> |
else:?>
=sprintf(_('Last check incomplete on **%s**'),_(my_time($var['sbSynced']).day_count($var['sbSynced']),0))?>
_(Error code)_: =my_error($status)?>
=print_error($error)?> |
endif;
else:?>
=sprintf(_('Last check completed on **%s**'),_(my_time($var['sbSynced2']).day_count($var['sbSynced2']),0))?>
_(Duration)_: =my_check($duration,$speed)?>
=print_error($var['sbSyncErrs'])?> |
endif;
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['sbSynced'];
$sbUpdate = $var['mdResyncDt'] ? $sbSynced : $var['sbUpdated'];?>
| |
=sprintf(_('Current operation %s on **%s**'),($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['mdResyncCorr']==0 ? _('Sync errors detected') : _('Sync errors corrected')?>: | | |
else:?>
| =$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['sbUpdated']).day_count($var['sbSynced']),0))?> |
break;
case "Clearing":?>
| **_(Started, clearing)_... ** | | |
| |
=sprintf(_('Current operation %s on **%s**'),_('started'),_(my_time($var['sbUpdated']).day_count($var['sbSynced']),0))?> |
break;
case "Stopping":?>
| **_(Stopping)_...** | | |
break;
case "Stopped":
if ($var['configValid']=="error"):?>
| **_(Stopped)_.** | |
_(Invalid, missing or expired)_ _(registration key)_. |
elseif ($var['configValid']=="invalid"):?>
| **_(Stopped)_.** | |
_(Too many attached devices. Please consider upgrading your)_ _(registration key)_. |
elseif ($var['configValid']=="nokeyserver"):?>
| **_(Stopped)_.** | |
_(Cannot contact key-server. Please check your)_ _(network settings)_. |
elseif ($var['configValid']=="withdrawn"):?>
| **_(Stopped)_.** | |
_(This Unraid OS release has been withdrawn and may no longer be used. Please)_ _(update)_ _(your server)_. |
else:
switch ($var['mdState']):
case "STOPPED":
$action = explode(' ',$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['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['sbClean']!="yes" && $action[0]=="check"):?>
| **_(Stopped)_**. _(Unclean shutdown detected)_. | |
**_(Start)_** _(will bring the array on-line)_. |
elseif (missing_cache()):?>
| **_(Stopped)_**. _(Missing Cache disk)_. | |
**_(Start)_** _(will remove the missing cache 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($disks['parity']['status'],"DISK_NP")===0 && strpos($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['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;
endswitch;
endif;
endswitch;?>
| |