This script finds shares that were accidentally broken in the UI and fixes it.
|
||
---|---|---|
README.md | ||
share_lun_ui_fix.sh |
Share/LUN UI Fix Script
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.
- 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 inNormal mode
andreadynasd
needs to be running.
Installing
Network-enabled ReadyNAS
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
- Download the contents of 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
- Push
i
to enter insert mode, then right click into the console. This will paste your clipboard (in most cases). Only click once. - Push
esc
and then type:wq
then hit enter. - Type
chmod +x /root/share_lun_ui_fix.sh
then type/root/share_lun_ui_fix.sh
- The script will run.
Acquiring debug information
If this script fails or produces an error, please run the following command and submit an issue.
root@readynasos:#/ curl -s https://gitlab.codycook.us/readynas-scripts/share_lun_ui_fix.sh/raw/master/share_lun_ui_fix.sh | bash -x
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
===============================
Share and iSCSI Rebuild v6.8.0
===============================
Querying readynasd for list of volumes...
4 volume(s) found.
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.
= done with /vol1
= Investigating volume /vol2...
= Objects found: luntest
== Reviewing luntest
=== Found LUN at /vol2/luntest... recreating iSCSI configs.... done with /vol2/luntest.
= done with /vol2
= Investigating volume /vol3...
No shares or LUNs found.
= done with /vol3
= Investigating volume /vol4...
= Objects found: outrunner
== Reviewing outrunner
=== Found share at /vol4/outrunner... recreating share configs.... done with /vol4/outrunner.
= done with /vol4
*** Restarting readynasd to finish changes... ***
=================================================
| Completed share creation! We were able to |
| rebuild 3 shares and 1 LUNs. |
=================================================
root@rr2312:/vol2#