Menu="Device:1" Title="$name _(Settings)_" Tag="hdd-o" --- 0 ? $sheets[$i-1] : $sheets[$end]; $next = $i<$end ? $sheets[$i+1] : $sheets[0]; $text = isPool($name) ? _('This will ERASE content of ALL devices in the pool') : _('This will ERASE ALL device content'); function sanitize(&$val) { $data = explode('.',str_replace([' ',','],['','.'],$val)); $last = array_pop($data); $val = count($data) ? implode($data).".$last" : $last; $val = preg_replace('/[^0-9.]/','',$val); } function presetSpace($val) { global $disk,$display; if (!$val or strcasecmp($val,'NaN')==0) return; sanitize($val); $size = _var($disk,'fsSize',0); $size = $size>0 ? round(100*$val/$size,1) : 0; $units = ['KB','MB','GB','TB','PB','EB','ZB','YB']; $base = $val>0 ? floor(log($val,1000)) : 0; $size = round($val/pow(1000,$base),1); $unit = _var($units,$base); [$dot,$comma] = str_split(_var($display,'number','.,')); return $size>0 ? number_format($size,$size-floor($size)?1:0,$dot,$comma).' '.$unit : ''; } function fsSize() { global $disks,$pools; $fsSize = []; foreach ($pools as $pool) $fsSize[] = '"'.$pool.'":"'._var($disks[$pool],'fsSize',0).'"'; return implode(',',$fsSize); } function fsType($type) { global $disk; return strpos(_var($disk,'fsType'),$type)!==false; } function diskStatus($status) { global $disk; return strpos(_var($disk,'status'),$status)!==false; } function diskType(...$types) { global $disk; $pass = false; foreach ($types as $type) $pass |= _var($disk,'type')==$type; return $pass; } function makeList($list) { return implode(',',array_map('escapestring',$list)); } function sharename($share) { return basename($share,'.cfg'); } function makeTemp(&$disk, $zone) { global $display; switch ($zone) { case 'hot': $nvme = 'wctemp'; break; case 'max': $nvme = 'cctemp'; break; } return _var($disk,'transport')=='nvme' ? get_nvme_info(_var($disk,'device'),$nvme) : (_var($disk,'rotational',1)==0 && $display["{$zone}ssd"]>=0 ? $display["{$zone}ssd"] : $display[$zone]); } function maintenance_mode() { global $var; return _var($var,'fsState')=="Started" && _var($var,'startMode')=="Maintenance" && _var($disk,'luksState',0)<=1; } function isPool($name) { global $pools; return in_array($name,$pools); } ?> "> ">
_(Name)_: : _(Name)_: : _(Identification)_: : _(No device)_ _(Identification)_: :  () _(Comments)_: : :info_comments_help: _(Partition size)_: : KB (K=1024) _(Partition format)_: : _(Spinup group(s))_: : _(Spin down delay)_: : _(File system status)_: :   _(File system type)_: : style="display:none"> _(ReiserFS is deprecated, please use another file system)_! :info_file_system_help: 1):?> _(File system type)_: : _(File system type)_: : _(File system type)_: : _(File system type)_: : _(Enable user share assignment)_: : :info_share_assignment_help: _(Minimum free space)_: : disabled> _(Calculated free space value)_ :info_free_space_help: _(Warning disk utilization threshold)_ (%): : :info_warning_utilization_help: _(Critical disk utilization threshold)_ (%): : :info_critical_utilization_help:   : > > >_(Unassign **ALL** devices to delete this pool)_
_(Balance Status)_
_(btrfs filesystem df)_: : ".shell_exec("/sbin/btrfs filesystem df /mnt/$tag").""?> _(btrfs balance status)_: : ".implode("\n", $balance_status).""?>   :  _(Current usage ratio)_: % --- 0 && $usage <= 50) ? "_(Full Balance recommended)_" : "_(No Balance required)_"?>   : 1):?> *_(Perform full balance)_* :info_btrfs_balance_help:   : :info_balance_cancel_help:   : "._('Balance')." "._('is only available when array is Started') : sprintf(_('See %s Settings'),ucfirst(prefix($tag)))?>

_(Balance schedule)_: : _(Day of the week)_: : _(Day of the month)_: : _(Time of the day)_: : : _(Block group usage)_ (%): :   :
_(Scrub Status)_
_(btrfs scrub status)_: : ".implode("\n", $scrub_status).""?>   : :info_btrfs_scrub_help:   : :info_scrub_cancel_help:   : "._('Scrub')." "._('is only available when array is Started') : sprintf(_('See %s Settings'),ucfirst(prefix($tag)))?>

_(Scrub schedule)_: : _(Day of the week)_: : _(Day of the month)_: : _(Time of the day)_: : :   :
_(Check Filesystem Status)_
_(btrfs check status)_: : ".implode("\n", $check_status).""?>   : _(Options (see Help))_ :info_btrfs_check_help:   : *_(Running)_* :info_check_cancel_help:   : **_(Check)_** _(is only available when array is Started in **Maintenance** mode)_.   : .
_(Pool Status)_
_(zfs pool status)_: :
  : :info_zfs_scrub_help:   : :info_scrub_cancel_help:   : "._('Scrub')." "._('is only available when array is Started') : sprintf(_('See %s Settings'),ucfirst(prefix($tag)))?>

_(Scrub schedule)_: : _(Day of the week)_: : _(Day of the month)_: : _(Time of the day)_: : :   :
_(Check Filesystem Status)_
_(reiserfsck status)_: : ".implode("\n", $check_status).""?>   : _(Options (see Help))_ :info_reiserfs_check_help:   : *_(Running)_* :info_reiserfs_cancel_help:   : **_(Check)_** _(is only available when array is Started in **Maintenance** mode)_.
_(Check Filesystem Status)_
_(xfs_repair status)_: : ".implode("\n", $check_status).""?>   : _(Options (see Help))_ :info_xfs_check_help:   : *_(Running)_* :info_xfs_cancel_help:   : **_(Check)_** _(is only available when array is Started in **Maintenance** mode)_.
_(SMART Settings)_
_(Warning disk temperature threshold)_ (°): _(Warning NVME temperature threshold)_ (°): _(Warning SSD temperature threshold)_ (°): : :info_warning_temp_help: _(Critical disk temperature threshold)_ (°): _(Critical NVME temperature threshold)_ (°): _(Critical SSD temperature threshold)_ (°): : :info_critical_temp_help: _(SMART notification value)_: : :info_smart_notifications_help: _(SMART notification tolerance level)_: : :info_tolerance_level_help: _(SMART controller type)_: : /dev/ _(enter disk index and device name as applicable to your controller)_ :info_controller_type_help: _(SMART attribute notifications)_: : _(Custom attributes (use comma to separate numbers))_   : >_(Attribute)_ = :info_attribute_notifications_help: :
'>