diff --git a/CHANGES.txt b/CHANGES.txt index adbc584..7f2cc4b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,6 @@ -v3.4.79 +v3.4.80 - Bug fix for chmod failed on changes.txt +- Improved help message. v3.4.78 - Added check that script is running on Synology NAS. diff --git a/README.md b/README.md index 7b7bd78..3363bf3 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,8 @@ #### What the script does: * Optionally disable DSM's "support_memory_compatibility" to prevent non-Synology memory notifications. * 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. +* 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. * 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?)**. @@ -41,9 +43,11 @@ #### What the script does: ### Download the script -See How to download the script 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. +1. Download the latest version _Source code (zip)_ from https://github.com/007revad/Synology_HDD_db/releases + - See How to download the script for the easiest way to download the script. +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 @@ -57,12 +61,14 @@ ### Options when running the script ```YAML -s, --showedits Show edits made to _host db and db.new file(s) -n, --noupdate Prevent DSM updating the compatible drive databases - -m, --m2 Don't process M.2 drives - -f, --force Force DSM to not check drive compatibility - -r, --ram Disable memory compatibility checking (DSM 7.x only), + -r, --ram Disable memory compatibility checking (DSM 7.x only) and sets max memory to the amount of installed memory - -w, --wdda Disable WD WDDA - -e, --email Disable colored text in output scheduler emails. + -w, --wdda Disable WD Device Analytics to prevent DSM showing + 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 --autoupdate=AGE Auto update script (useful when script is scheduled) AGE is how many days old a release must be before @@ -71,7 +77,11 @@ ### Options when running the script -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 @@ -129,6 +139,7 @@ ### vendor_ids.txt | | | | | |--------------------|--------------------|----------------------|----------------------| +| | | | Jordan Crawford | | Tyler Teal | Voluntary Commerce LLC | Ez Hosting | Alec Wilhere | | Reece Lyne | Enric Escudé Santana | Yunhao Zhang | Matthias Gerhardt | | Darryl Harper | Mikescher | Matthias Pfaff | cpharada | diff --git a/syno_hdd_db.sh b/syno_hdd_db.sh index 76255fa..5aacddd 100644 --- a/syno_hdd_db.sh +++ b/syno_hdd_db.sh @@ -383,7 +383,7 @@ if ! printf "%s\n%s\n" "$tag" "$scriptver" | "extract $script-$shorttag.tar.gz!" syslog_set warn "$script failed to extract $script-$shorttag.tar.gz!" else - # Set permissions on script sh files + # Set script sh files as executable if ! chmod a+x "/tmp/$script-$shorttag/"*.sh ; then permerr=1 echo -e "${Error}ERROR${Off} Failed to set executable permissions" @@ -395,7 +395,7 @@ if ! printf "%s\n%s\n" "$tag" "$scriptver" | then copyerr=1 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" 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) 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 if ! cp -p "/tmp/$script-$shorttag/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"\ "$script-$shorttag/CHANGES.txt to:\n $scriptpath" 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" fi fi - # Delete downloaded .tar.gz file and extracted tmp files + # Delete downloaded tmp files cleanup_tmp # Notify of success (if there were no errors)