From da04de6e319be7bd1e0799337ef2663e69667d54 Mon Sep 17 00:00:00 2001 From: Tom Mortensen Date: Tue, 7 Nov 2017 11:40:42 -0800 Subject: [PATCH] Handle encryption configuration corner cases. --- plugins/dynamix/ArrayOperation.page | 282 +++++++++++++--------------- plugins/dynamix/DeviceInfo.page | 2 - 2 files changed, 133 insertions(+), 151 deletions(-) diff --git a/plugins/dynamix/ArrayOperation.page b/plugins/dynamix/ArrayOperation.page index 5f57670da..74c7851c6 100644 --- a/plugins/dynamix/ArrayOperation.page +++ b/plugins/dynamix/ArrayOperation.page @@ -15,17 +15,121 @@ Tag="snowflake-o" */ ?> Encryption status:$status"; + echo "Encryption input:"; + echo ""; + echo "Passphrase:show passphrase"; + echo "Retype passphrase:"; + echo "Keyfile:"; +} +?> + +"; echo ""; @@ -50,7 +154,6 @@ td.gap{padding-left:26px!important} -
+ @@ -330,88 +352,58 @@ $(function(){ switch ($var['mdState']): case "STOPPED": if (strstr($var['mdResyncAction'],"recon")):?> - + - + - + - + - + - - - - - - - - - + if (strpos($disks['parity']['status'],"DISK_NP")===0 && strpos($disks['parity2']['status'],"DISK_NP")===0):?> + - + - - - - - - - - - - + - + - + - - - @@ -477,17 +461,17 @@ $(function(){
Stopped. Configuration valid.>
Stopped. Configuration valid. Start will bring the array on-line and start Parity-Sync and/or Data-Rebuild.
Stopped. New data disk(s) detected.>
Stopped. New data disk(s) detected. Start will bring the array on-line and start Clearing new data disk(s).
Stopped. Unclean shutdown detected.>
Stopped. Unclean shutdown detected. Start will bring the array on-line.
Stopped. Unclean shutdown detected.>
Stopped. Unclean shutdown detected. Start will bring the array on-line and start Parity-Check.
Write corrections to parity
Stopped. Configuration valid.>
Stopped. Configuration valid. Start will bring the array on-line.
Encryption status:
Encryption input:
Passphrase:show passphrase
Stopped. Configuration valid.
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.
Stopped. Configuration valid.
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.
Stopped. Found new disk.
-".my_disk($disk['name'])." • ".my_id($disk['id'])." (".$disk['device'].")";?>
Start will record the new disk information and bring the expanded array on-line.
Stopped. Found new erased disk.
-".my_disk($disk['name'])." • ".my_id($disk['id'])." (".$disk['device'].")";?>
Start will record the new disk information and bring the expanded array on-line. -
Yes I want to do this
Stopped. Found new disk.
-".my_disk($disk['name'])." • ".my_id($disk['id'])." (".$disk['device'].")";?>
Clear will completely clear (set to zero) the new disk. -
Once clear completes, the array may be Started, expanding the array to include the new disk. -
Caution: any data on the new disk will be erased! -
If you want to preserve the data on the new disk, reset the array configuration and rebuild parity instead. -
Yes I want to do this
Stopped. Missing 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
Stopped. Replacement disk installed.
Stopped. Replacement disk installed. Start will start Parity-Sync and/or Data-Rebuild. -
Yes I want to do this
Stopped. Upgrading disk/swapping parity.
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. -
Yes I want to do this
Stopped. Upgrading disk/swapping parity. Copy will copy the parity information to the new parity disk. @@ -419,14 +411,6 @@ $(function(){
Yes I want to do this
Stopped. Two or more disks are wrong.
-".my_disk($disk['name'])." • ".my_id($disk['id'])." (".$disk['device'].")";?>
Start will just record the new disk positions and bring the array on-line. -
We recommend you start a Parity-Check afterwards just to be safe. -
Yes I want to do this
Stopped. Invalid expansion. You may not add new disk(s) and also remove existing disk(s).
+
-
Delete will delete the encryption keyfile, device encryption remains functional. +
Delete will delete the encryption keyfile.
Yes I want to do this
-
@@ -566,7 +550,7 @@ if (isset($display['sleep'])) @include $display['sleep']; > Once you have assigned all of your hard drives, refer to the Array Status section below > and Start the array. - +
> #### Encryption input > diff --git a/plugins/dynamix/DeviceInfo.page b/plugins/dynamix/DeviceInfo.page index 63a5698c3..c630d8e50 100644 --- a/plugins/dynamix/DeviceInfo.page +++ b/plugins/dynamix/DeviceInfo.page @@ -202,8 +202,6 @@ File system type: > Enter the desired file system type. Changing the file system type of a device will permit you to reformat > that device using the new file system. Be aware that **all existing data on the device will be lost**. -> -> The encrypted file system types may only be selected when an [encryption key](/Settings/EncryptionSettings) is present. 1):?> File system type: