From 8dd7d7051e4326b39ee24178f8d2b9a7d930c91e Mon Sep 17 00:00:00 2001 From: Dave Russell <39733752+007revad@users.noreply.github.com> Date: Sat, 27 Jan 2024 07:05:39 +1100 Subject: [PATCH 1/3] Update CHANGES.txt --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index ab25054..e9502f3 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,10 @@ +v3.4.83 +- Fix for drives that exist in the drive database already but have "compatibility not_support". + - Affected drives were showing as "Incompatible" in storage manager. + v3.4.82 - Fix for drives that exist in the drive database already but have "compatibility unverified". Issue #224 + - Affected drives were showing as "Unverified" in storage manager. v3.4.81 - Bug fix for false "This script is NOT running on a Synology NAS!" if uname is installed from Entware. Issue #218 From 8f603457a90a5165de75a06b2b3ead15e563517e Mon Sep 17 00:00:00 2001 From: Dave Russell <39733752+007revad@users.noreply.github.com> Date: Sat, 27 Jan 2024 07:05:55 +1100 Subject: [PATCH 2/3] Update syno_hdd_db.sh v3.4.83 - Fix for drives that exist in the drive database already but have "compatibility not_support". - Affected drives were showing as "Incompatible" in storage manager. --- syno_hdd_db.sh | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/syno_hdd_db.sh b/syno_hdd_db.sh index 4819451..a65d735 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.82" +scriptver="v3.4.83" script=Synology_HDD_db repo="007revad/Synology_HDD_db" scriptname=syno_hdd_db @@ -62,11 +62,13 @@ Options: -n, --noupdate Prevent DSM updating the compatible drive databases -r, --ram Disable memory compatibility checking (DSM 7.x only) and sets max memory to the amount of installed memory + -f, --force Force DSM to not check drive compatibility + Do not use this option unless absolutely needed + -i, --incompatible Change incompatible drives to supported + Do not use this option unless absolutely needed -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) @@ -96,7 +98,7 @@ args=("$@") # Check for flags with getopt if options="$(getopt -o abcdefghijklmnopqrstuvwxyz0123456789 -l \ - restore,showedits,noupdate,nodbupdate,m2,force,ram,wdda,immutable,email,autoupdate:,help,version,debug \ + restore,showedits,noupdate,nodbupdate,m2,force,incompatible,ram,wdda,email,autoupdate:,help,version,debug \ -- "$@")"; then eval set -- "$options" while true; do @@ -117,6 +119,9 @@ if options="$(getopt -o abcdefghijklmnopqrstuvwxyz0123456789 -l \ -f|--force) # Disable "support_disk_compatibility" force=yes ;; + -i|--incompatible) # Change incompatible drives to supported + incompatible=yes + ;; -r|--ram) # Disable "support_memory_compatibility" ram=yes ;; @@ -1168,6 +1173,16 @@ updatedb(){ echo -e "Edited unverified drives in ${Cyan}$(basename -- "$2")${Off}" >&2 fi fi + + # Edit existing drives in db with compatibility:not_support + if [[ $incompatible == "yes" ]]; then + if grep 'not_support' "$2" >/dev/null; then + sed -i 's/not_support/support/g' "$2" + if ! grep 'not_support' "$2" >/dev/null; then + echo -e "Edited incompatible drives in ${Cyan}$(basename -- "$2")${Off}" >&2 + fi + fi + fi elif [[ $dbtype -eq "6" ]]; then if grep "$hdmodel" "$2" >/dev/null; then echo -e "${Yellow}$hdmodel${Off} already exists in ${Cyan}$(basename -- "$2")${Off}" >&2 From 555454899c53eb01c26751153ba789d7e2ef1c9e Mon Sep 17 00:00:00 2001 From: Dave Russell <39733752+007revad@users.noreply.github.com> Date: Sat, 27 Jan 2024 07:08:05 +1100 Subject: [PATCH 3/3] Update README.md - Fix for drives that exist in the drive database already but have "compatibility not_support". - Affected drives were showing as "Incompatible" in storage manager. --- README.md | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 0bc45dc..bea079f 100644 --- a/README.md +++ b/README.md @@ -58,22 +58,24 @@ ### Options when running the script There are optional flags you can use 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. + -s, --showedits Show edits made to _host db and db.new file(s) + -n, --noupdate Prevent DSM updating the compatible drive databases -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 + -f, --force Force DSM to not check drive compatibility + Do not use this option unless absolutely needed + -i, --incompatible Change incompatible drives to supported + Do not use this option unless absolutely needed -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). + a false warning for WD drives that are 3 years old + DSM 7.2.1 already has WDDA disabled + -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. - -h, --help Show this help message. - -v, --version Show the script version. + auto-updating. AGE must be a number: 0 or greater + -h, --help Show this help message + -v, --version Show the script version ``` **Notes:**