From 01bfd50d410e3d16b89e83435e84e105221dfa5b Mon Sep 17 00:00:00 2001 From: Cody Cook Date: Tue, 2 Oct 2018 10:37:01 -0700 Subject: [PATCH] Update README.md for 6.9.4 --- README.md | 51 ++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 36 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 68c422f..d456d23 100644 --- a/README.md +++ b/README.md @@ -5,24 +5,23 @@ This script finds shares that were accidentally broken in the UI and fixes it. ### Prerequisites -* You need to be on ReadyNAS OS 6.8 or newer. This script containts configuration file data for 6.8 that may or may not work with older versions. +* You need to be on ReadyNAS OS 6.9.4 or newer. This script containts configuration file data for 6.9.4 that may or may not work with older versions. * Either the ReadyNAS needs internet access or you need to copy/paste the data into a file on the NAS via SSH. ** For internet access, ensure you can reach the internet and DNS is working properly. * This does not work in `Tech Support mode`. You must be in `Normal mode` and `readynasd` needs to be running. -### Installing +### Running -#### Network-enabled ReadyNAS +#### Network-enabled ReadyNAS (Automatic) To quickly resolve the shares and LUNs not showing in the UI, you can copy/paste the following command into a terminal and the script will automatically run. - ``` root@readynasos:#/ curl -s https://gitlab.codycook.us/readynas-scripts/share_lun_ui_fix.sh/raw/master/share_lun_ui_fix.sh | bash ``` Refresh the UI and the shares should be restored. -#### Internet-disabled ReadyNAS +#### Internet-disabled ReadyNAS (Manual) * Download the contents of [https://gitlab.codycook.us/readynas-scripts/share_lun_ui_fix.sh/raw/master/share_lun_ui_fix.sh](https://gitlab.codycook.us/readynas-scripts/share_lun_ui_fix.sh/raw/master/share_lun_ui_fix.sh) * Copy the data into your clipboard. * In the ReadyNAS terminal, type: `vi /root/share_lun_ui_fix.sh` @@ -36,15 +35,39 @@ If this script fails or produces an error, please run the following command and ``` root@readynasos:#/ curl -s https://gitlab.codycook.us/readynas-scripts/share_lun_ui_fix.sh/raw/master/share_lun_ui_fix.sh | bash -x ``` - +or if you used the manual process, +``` +root@readynasos:#/ bash -x /root/share_lun_ui_fix.sh +``` ## Sample Output ### Standard Output ``` -root@rr2312:/vol2# curl -s https://gitlab.codycook.us/readynas-scripts/share_lun_ui_fix.sh/raw/master/share_lun_ui_fix.sh | bash +root@rn524x:~# curl -s https://gitlab.codycook.us/readynas-scripts/share_lun_ui_fix.sh/raw/master/share_lun_ui_fix.sh | bash =============================== -Share and iSCSI Rebuild v6.8.0 +Share and iSCSI Rebuild v6.9.4 =============================== +NOTE: This version of readynasd creates share backups in /var/backups/shares. + When possible, you should try and restore a valid backup config from this directory. + This share config gets rebuilt every time readynasd restarts. Because of this, we'll make a backup of the existing share backups before proceeding. +Generating backup config...... done! Backup complete! +============================================= +====== Listing Available Share Backups ====== +============================================= +total 1.3M +drwxr-x--- 1 root root 144 Oct 2 04:20 . +drwxr-xr-x 1 root root 866 Oct 2 10:31 .. +-rw-r--r-- 1 root root 750K Oct 2 04:20 shares.tar.0 +-rw-r--r-- 1 root root 124K Oct 1 04:20 shares.tar.1.gz +-rw-r--r-- 1 root root 124K Sep 30 04:20 shares.tar.2.gz +-rw-r--r-- 1 root root 124K Sep 29 04:20 shares.tar.3.gz +-rw-r--r-- 1 root root 124K Sep 28 04:20 shares.tar.4.gz +============================================= +See the last modified dates and determine if you can restore from that config or not instead of using this script. +It is best to pick a date before the shares disappeared from readynasd. +============================================= +If you want to cancel and manually restore from one of these configs, CTRL-C now... +Otherwise, continuing in 10... 9... 8... 7... 6... 5... 4... 3... 2... 1... 0... Querying readynasd for list of volumes... 4 volume(s) found. Beginning in 3... 2... 1... @@ -52,11 +75,9 @@ Beginning in 3... 2... 1... === All right! Time to go! === =============================== = Investigating volume /vol1... -= Objects found: fromharry/ home -== Reviewing fromharry/ -=== Found share at /vol1/fromharry/... recreating share configs.... done with /vol1/fromharry/. -== Reviewing home -=== Found share at /vol1/home... recreating share configs.... done with /vol1/home. += Objects found: fromharry +== Reviewing fromharry +=== Found share at /vol1/fromharry... recreating share configs.... done with /vol1/fromharry. = done with /vol1 = Investigating volume /vol2... = Objects found: luntest @@ -74,7 +95,7 @@ No shares or LUNs found. *** Restarting readynasd to finish changes... *** ================================================= | Completed share creation! We were able to | -| rebuild 3 shares and 1 LUNs. | +| rebuild 2 shares and 1 LUNs. | ================================================= -root@rr2312:/vol2# +root@rn524x:~# ```