Browse Source

Merge pull request #213 from 007revad/develop

Develop
pull/218/head v3.4.80
Dave Russell 2 years ago
committed by GitHub
parent
commit
bbbc25cab2
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      CHANGES.txt
  2. 29
      README.md
  3. 19
      syno_hdd_db.sh

3
CHANGES.txt

@ -1,5 +1,6 @@
v3.4.79 v3.4.80
- Bug fix for chmod failed on changes.txt - Bug fix for chmod failed on changes.txt
- Improved help message.
v3.4.78 v3.4.78
- Added check that script is running on Synology NAS. - Added check that script is running on Synology NAS.

29
README.md

@ -29,6 +29,8 @@ #### What the script does:
* Optionally disable DSM's "support_memory_compatibility" to prevent <a href=images/ram_warning.png/>non-Synology memory notifications</a>. * Optionally disable DSM's "support_memory_compatibility" to prevent <a href=images/ram_warning.png/>non-Synology memory notifications</a>.
* Optionally edits max supported memory to match the amount of memory installed, if installed memory is greater than the current max memory setting. * Optionally edits max supported memory to match the amount of memory installed, if installed memory is greater than the current max memory setting.
* DSM only uses the max memory setting when calculating the reserved RAM area size for SSD caches. * DSM only uses the max memory setting when calculating the reserved RAM area size for SSD caches.
* Optionally disables Western Digital Device Analytics (aka WDDA) to prevent DSM showing a [warning for WD drives that are 3 years old](https://arstechnica.com/gadgets/2023/06/clearly-predatory-western-digital-sparks-panic-anger-for-age-shaming-hdds).
* DSM 7.2.1 already has WDDA disabled.
* Enables M2D20, M2D18, M2D17 and E10M20-T1 if present on Synology NAS that don't officially support them. * Enables M2D20, M2D18, M2D17 and E10M20-T1 if present on Synology NAS that don't officially support them.
* Checks that M.2 volume support is enabled (on models that have M.2 slots or PCIe slots). * Checks that M.2 volume support is enabled (on models that have M.2 slots or PCIe slots).
* Enables creating M.2 storage pools and volumes from within Storage Manager **(newer models only?)**. * Enables creating M.2 storage pools and volumes from within Storage Manager **(newer models only?)**.
@ -41,9 +43,11 @@ #### What the script does:
### Download the script ### Download the script
See <a href=images/how_to_download.png/>How to download the script</a> for the easiest way to download the script. 1. Download the latest version _Source code (zip)_ from https://github.com/007revad/Synology_HDD_db/releases
- See <a href=images/how_to_download.png/>How to download the script</a> for the easiest way to download the script.
Do ***NOT*** save the script to a M.2 volume. The M.2 volume won't be available until after the script has run. 2. Save the download zip file to a folder on the Synology.
- Do ***NOT*** save the script to a M.2 volume. The M.2 volume may not be available until after the script has run.
3. Unzip the zip file.
### When to run the script ### When to run the script
@ -57,12 +61,14 @@ ### Options when running the script <a name="options"></a>
```YAML ```YAML
-s, --showedits Show edits made to <model>_host db and db.new file(s) -s, --showedits Show edits made to <model>_host db and db.new file(s)
-n, --noupdate Prevent DSM updating the compatible drive databases -n, --noupdate Prevent DSM updating the compatible drive databases
-m, --m2 Don't process M.2 drives -r, --ram Disable memory compatibility checking (DSM 7.x only)
-f, --force Force DSM to not check drive compatibility
-r, --ram Disable memory compatibility checking (DSM 7.x only),
and sets max memory to the amount of installed memory and sets max memory to the amount of installed memory
-w, --wdda Disable WD WDDA -w, --wdda Disable WD Device Analytics to prevent DSM showing
-e, --email Disable colored text in output scheduler emails. a false warning for WD drives that are 3 years old
DSM 7.2.1 already has WDDA disabled
-f, --force Force DSM to not check drive compatibility
Do not use this option unless absolutely needed.
-e, --email Disable colored text in output scheduler emails
--restore Undo all changes made by the script --restore Undo all changes made by the script
--autoupdate=AGE Auto update script (useful when script is scheduled) --autoupdate=AGE Auto update script (useful when script is scheduled)
AGE is how many days old a release must be before AGE is how many days old a release must be before
@ -71,7 +77,11 @@ ### Options when running the script <a name="options"></a>
-v, --version Show the script version -v, --version Show the script version
``` ```
**Note:** If you have some Synology drives and want to update their firmware run the script **without** --noupdate or -n then do the drive database update from Storage Manager and finally run the script again with your preferred options. **Notes:**
- The -f or --force option is only needed if for some reason your drives still show as unsupported in storage manager.
- Only use this option as last resort.
- Using this option will prevent data deduplication from being available, and prevent firmware updates on Synology brand drives.
- If you have some Synology drives and want to update their firmware run the script **without** --noupdate or -n then do the drive database update from Storage Manager and finally run the script again with your preferred options.
### Scheduling the script in Synology's Task Scheduler ### Scheduling the script in Synology's Task Scheduler
@ -129,6 +139,7 @@ ### vendor_ids.txt
| | | | | | | | | |
|--------------------|--------------------|----------------------|----------------------| |--------------------|--------------------|----------------------|----------------------|
| | | | Jordan Crawford |
| Tyler Teal | Voluntary Commerce LLC | Ez Hosting | Alec Wilhere | | Tyler Teal | Voluntary Commerce LLC | Ez Hosting | Alec Wilhere |
| Reece Lyne | Enric Escudé Santana | Yunhao Zhang | Matthias Gerhardt | | Reece Lyne | Enric Escudé Santana | Yunhao Zhang | Matthias Gerhardt |
| Darryl Harper | Mikescher | Matthias Pfaff | cpharada | | Darryl Harper | Mikescher | Matthias Pfaff | cpharada |

19
syno_hdd_db.sh

@ -383,7 +383,7 @@ if ! printf "%s\n%s\n" "$tag" "$scriptver" |
"extract $script-$shorttag.tar.gz!" "extract $script-$shorttag.tar.gz!"
syslog_set warn "$script failed to extract $script-$shorttag.tar.gz!" syslog_set warn "$script failed to extract $script-$shorttag.tar.gz!"
else else
# Set permissions on script sh files # Set script sh files as executable
if ! chmod a+x "/tmp/$script-$shorttag/"*.sh ; then if ! chmod a+x "/tmp/$script-$shorttag/"*.sh ; then
permerr=1 permerr=1
echo -e "${Error}ERROR${Off} Failed to set executable permissions" echo -e "${Error}ERROR${Off} Failed to set executable permissions"
@ -395,7 +395,7 @@ if ! printf "%s\n%s\n" "$tag" "$scriptver" |
then then
copyerr=1 copyerr=1
echo -e "${Error}ERROR${Off} Failed to copy"\ echo -e "${Error}ERROR${Off} Failed to copy"\
"$script-$shorttag .sh file(s) to:\n $scriptpath" "$script-$shorttag sh file(s) to:\n $scriptpath/${scriptfile}"
syslog_set warn "$script failed to copy $tag to script location" syslog_set warn "$script failed to copy $tag to script location"
fi fi
@ -422,6 +422,13 @@ if ! printf "%s\n%s\n" "$tag" "$scriptver" |
# Copy new CHANGES.txt file to script location (if script on a volume) # Copy new CHANGES.txt file to script location (if script on a volume)
if [[ $scriptpath =~ /volume* ]]; then if [[ $scriptpath =~ /volume* ]]; then
# Set permissions on CHANGES.txt
if ! chmod 664 "/tmp/$script-$shorttag/CHANGES.txt"; then
permerr=1
echo -e "${Error}ERROR${Off} Failed to set permissions on:"
echo "$scriptpath/CHANGES.txt"
fi
# Copy new CHANGES.txt file to script location # Copy new CHANGES.txt file to script location
if ! cp -p "/tmp/$script-$shorttag/CHANGES.txt"\ if ! cp -p "/tmp/$script-$shorttag/CHANGES.txt"\
"${scriptpath}/${scriptname}_CHANGES.txt"; "${scriptpath}/${scriptname}_CHANGES.txt";
@ -430,17 +437,11 @@ if ! printf "%s\n%s\n" "$tag" "$scriptver" |
echo -e "${Error}ERROR${Off} Failed to copy"\ echo -e "${Error}ERROR${Off} Failed to copy"\
"$script-$shorttag/CHANGES.txt to:\n $scriptpath" "$script-$shorttag/CHANGES.txt to:\n $scriptpath"
else else
# Set permissions on CHANGES.txt
if ! chmod 664 "$scriptpath/${scriptname}_CHANGES.txt"; then
if [[ $autoupdate != "yes" ]]; then permerr=1; fi
echo -e "${Error}ERROR${Off} Failed to set permissions on:"
echo "$scriptpath/CHANGES.txt"
fi
changestxt=" and changes.txt" changestxt=" and changes.txt"
fi fi
fi fi
# Delete downloaded .tar.gz file and extracted tmp files # Delete downloaded tmp files
cleanup_tmp cleanup_tmp
# Notify of success (if there were no errors) # Notify of success (if there were no errors)

Loading…
Cancel
Save