From a998859ffc624cce9264f8be8c51bcda2e2ccc3e Mon Sep 17 00:00:00 2001 From: Dave Russell <39733752+007revad@users.noreply.github.com> Date: Fri, 12 Jan 2024 21:57:47 +1100 Subject: [PATCH 1/7] Update syno_hdd_db.sh --- syno_hdd_db.sh | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/syno_hdd_db.sh b/syno_hdd_db.sh index aa3d342..6b2cb7b 100644 --- a/syno_hdd_db.sh +++ b/syno_hdd_db.sh @@ -381,7 +381,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" @@ -393,7 +393,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 @@ -420,6 +420,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"; @@ -428,17 +435,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) From 031453a8864eed38503cfabe6093fce5b3926604 Mon Sep 17 00:00:00 2001 From: Dave Russell <39733752+007revad@users.noreply.github.com> Date: Fri, 12 Jan 2024 21:58:15 +1100 Subject: [PATCH 2/7] Update syno_hdd_db.sh --- syno_hdd_db.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syno_hdd_db.sh b/syno_hdd_db.sh index 6b2cb7b..5ad478e 100644 --- a/syno_hdd_db.sh +++ b/syno_hdd_db.sh @@ -27,7 +27,7 @@ # Now warns if script is located on an M.2 volume. -scriptver="v3.4.79" +scriptver="v3.4.80" script=Synology_HDD_db repo="007revad/Synology_HDD_db" scriptname=syno_hdd_db From 6c1495be0ac5cc716d7384eb21a72d01c62c475e Mon Sep 17 00:00:00 2001 From: Dave Russell <39733752+007revad@users.noreply.github.com> Date: Sun, 14 Jan 2024 08:19:59 +1100 Subject: [PATCH 3/7] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 7b7bd78..3e03ff1 100644 --- a/README.md +++ b/README.md @@ -129,6 +129,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 | From 70eb92b3670021b135db546c7eddf70ab2ac7af9 Mon Sep 17 00:00:00 2001 From: Dave Russell <39733752+007revad@users.noreply.github.com> Date: Mon, 15 Jan 2024 15:35:08 +1100 Subject: [PATCH 4/7] Update README.md --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3e03ff1..88661d1 100644 --- a/README.md +++ b/README.md @@ -41,9 +41,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 From 076388b20dce53fbce89134bb800ad30e9dec6af Mon Sep 17 00:00:00 2001 From: Dave Russell <39733752+007revad@users.noreply.github.com> Date: Mon, 15 Jan 2024 16:20:03 +1100 Subject: [PATCH 5/7] Update README.md --- README.md | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 88661d1..138db0d 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?)**. @@ -59,21 +61,27 @@ ### 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 - auto-updating. AGE must be a number: 0 or greater + AGE is how many days old a release must be before. + auto-updating. AGE must be a number: 0 or greater. -h, --help Show this help message -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 From 911f1f03a1e665c3b1b78c11605c8568e2d67564 Mon Sep 17 00:00:00 2001 From: Dave Russell <39733752+007revad@users.noreply.github.com> Date: Mon, 15 Jan 2024 16:36:14 +1100 Subject: [PATCH 6/7] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 138db0d..3363bf3 100644 --- a/README.md +++ b/README.md @@ -65,14 +65,14 @@ ### Options when running the script and sets max memory to the amount of installed memory -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. + 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. - auto-updating. AGE must be a number: 0 or greater. + AGE is how many days old a release must be before + auto-updating. AGE must be a number: 0 or greater -h, --help Show this help message -v, --version Show the script version ``` From 2c8613b256f04108467abc7f802f7b9230221ed5 Mon Sep 17 00:00:00 2001 From: Dave Russell <39733752+007revad@users.noreply.github.com> Date: Mon, 15 Jan 2024 16:40:30 +1100 Subject: [PATCH 7/7] Update CHANGES.txt --- CHANGES.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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.