From 9e7f5f618cf44ed55eb7d2644658896ea65b43fd Mon Sep 17 00:00:00 2001
From: 007revad <39733752+007revad@users.noreply.github.com>
Date: Sat, 7 Mar 2026 09:10:53 +1100
Subject: [PATCH 01/70] Update my-other-scripts.md
---
my-other-scripts.md | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/my-other-scripts.md b/my-other-scripts.md
index 9466f6f..4b4643c 100644
--- a/my-other-scripts.md
+++ b/my-other-scripts.md
@@ -5,6 +5,7 @@ ## All my scripts, tools and guides
#### Contents
- [Plex](#plex)
+- [Asustor scripts](#asustor)
- [Synology docker](#synology-docker)
- [Synology recovery](#synology-recovery)
- [Other Synology scripts](#other-synology-scripts)
@@ -15,6 +16,14 @@ #### Contents
***
+### Asustor
+
+- **Asustor_SMART_info**
+ - Show Asustor smart health and attributes. Can also email you when important values change.
+
+- **Asustor_Plex_Backup**
+ - Backup your Asustor's Plex Media Server settings and database.
+
### Plex
- **Synology_Plex_Backup**
@@ -92,7 +101,7 @@ ### Other Synology scripts
- Get and log Synology NAS CPU temperature via SSH.
- **Synology_SMART_info**
- - Show Synology smart test progress or smart health and attributes.
+ - Show Synology smart health and attributes. Can also email you when important values change.
- **Synology_Cleanup_Coredumps**
- Cleanup memory core dumps from crashed processes.
@@ -108,6 +117,9 @@ ### Other Synology scripts
- **Synology_created_date**
- Script to show you the created year and month of your Synology NAS or expansion unit.
+
+ - **Restore_RS3621_Fan_Speed**
+ - Script to restore RS3621xs+ and RS3621RPxs Quiet mode and Cool mode fan speeds back to how it was before DSM 7.3.2.
[Back to Contents](#contents)
From 3172b2e36026b9a8091c148e6ed218d18b29a438 Mon Sep 17 00:00:00 2001
From: 007revad <39733752+007revad@users.noreply.github.com>
Date: Mon, 9 Mar 2026 20:37:49 +1100
Subject: [PATCH 02/70] Update my-other-scripts.md
---
my-other-scripts.md | 86 ++++++++++++++++++++++-----------------------
1 file changed, 43 insertions(+), 43 deletions(-)
diff --git a/my-other-scripts.md b/my-other-scripts.md
index 4b4643c..4a2f4ae 100644
--- a/my-other-scripts.md
+++ b/my-other-scripts.md
@@ -18,25 +18,25 @@ #### Contents
### Asustor
-- **Asustor_SMART_info**
+- **Asustor SMART info**
- Show Asustor smart health and attributes. Can also email you when important values change.
-- **Asustor_Plex_Backup**
+- **Asustor Plex Backup**
- Backup your Asustor's Plex Media Server settings and database.
### Plex
-- **Synology_Plex_Backup**
+- **Synology Plex Backup**
- A script to backup Plex to a tgz file foror DSM 7 and DSM 6.
- Works for Plex Synology package and Plex in docker.
-- **Asustor_Plex_Backup**
+- **Asustor Plex Backup**
- Backup your Asustor's Plex Media Server settings and database.
-- **Linux_Plex_Backup**
+- **Linux Plex Backup**
- Backup your Linux Plex Media Server's settings and database.
-- **Plex_Server_Sync**
+- **Plex Server Sync**
- Sync your main Plex server database & metadata to a backup Plex server.
- Works for Synology, Asustor, Linux and supports Plex package or Plex in docker.
@@ -44,120 +44,120 @@ ### Plex
### Synology docker
-- **Synology_Docker_export**
+- **Synology Docker export**
- Export all Synology Container Manager or Docker containers' settings as json files to your docker shared folder.
-- **Synology_ContainerManager_IPv6**
+- **Synology Container Manager IPv6**
- Enable IPv6 for Container Manager's bridge network.
-- **ContainerManager_for_all_armv8**
+- **Container Manager for all armv8**
- Script to install Container Manager on a RS819, DS119j, DS418, DS418j, DS218, DS218play or DS118.
-- **Docker_Autocompose**
+- **Docker Auto compose**
- Create .yml files from your docker existing containers.
-- **Synology_docker_cleanup**
+- **Synology docker cleanup**
- Remove orphan docker btrfs subvolumes and images in Synology DSM 7 and DSM 6.
[Back to Contents](#contents)
### Synology recovery
-- **Synology_DSM_reinstall**
+- **Synology DSM reinstall**
- Easily re-install the same DSM version without losing any data or settings.
-- **Synology_Recover_Data**
+- **Synology Recover Data**
- A script to make it easy to recover your data from your Synology's drives using a computer.
- **Synology clear drive error**
- Clear drive critical errors so DSM will let you use the drive.
-- **Synology_DSM_Telnet_Password**
+- **Synology DSM Telnet Password**
- Synology DSM Recovery Telnet Password of the Day generator.
-- **Syno_DSM_Extractor_GUI**
+- **Syno DSM Extractor GUI**
- Windows GUI for extracting Synology DSM 7 pat files and spk package files.
-- **Synoboot_backup**
+- **Synoboot backup**
- Back up synoboot after each DSM update so you can recover from a corrupt USBDOM.
[Back to Contents](#contents)
### Other Synology scripts
-- **Synology_app_mover**
+- **Synology app mover**
- Easily move Synology packages from one volume to another volume.
-- **Video_Station_for_DSM_722**
+- **Video Station for DSM 722**
- Script to install Video Station in DSM 7.2.2
-- **SS_Motion_Detection**
+- **SS Motion Detection**
- Installs previous Surveillance Station and Advanced Media Extensions versions so motion detection and HEVC are supported.
-- **Synology_Config_Backup**
+- **Synology Config Backup**
- Backup and export your Synology DSM configuration.
-- **Synology_CPU_temperature**
+- **Synology CPU temperature**
- Get and log Synology NAS CPU temperature via SSH.
-- **Synology_SMART_info**
- - Show Synology smart health and attributes. Can also email you when important values change.
+- **Synology SMART info**
+ - Show Synology smart test progress or smart health and attributes. Can also email you when important values change.
-- **Synology_Cleanup_Coredumps**
+- **Synology Cleanup Coredumps**
- Cleanup memory core dumps from crashed processes.
-- **Synology_toggle_reset_button**
+- **Synology toggle reset button**
- Script to disable or enable the reset button and show current setting.
-- **Synology_Download_Station_Chrome_Extension**
+- **Synology Download Station Chrome Extension**
- Download Station Chrome Extension.
-- **Seagate_lowCurrentSpinup**
+- **Seagate low Current Spinup**
- This script avoids the need to buy and install a higher wattage power supply when using multiple large Seagate SATA HDDs.
-- **Synology_created_date**
+- **Synology created date**
- Script to show you the created year and month of your Synology NAS or expansion unit.
- - **Restore_RS3621_Fan_Speed**
+ - **Restore RS3621 Fan Speed**
- Script to restore RS3621xs+ and RS3621RPxs Quiet mode and Cool mode fan speeds back to how it was before DSM 7.3.2.
[Back to Contents](#contents)
### Synology hardware restrictions
-- **Synology_HDD_db**
+- **Synology HDD db**
- Add your SATA or SAS HDDs and SSDs plus SATA and NVMe M.2 drives to your Synology's compatible drive databases, including your Synology M.2 PCIe card and Expansion Unit databases.
-- **Synology_enable_M2_volume**
+- **Synology enable M2 volume**
- Enable creating volumes with non-Synology M.2 drives.
- Enable Health Info for non-Synology NVMe drives (not in DSM 7.2.1 or later).
-- **Synology_M2_volume**
+- **Synology M2 volume**
- Easily create an M.2 volume on Synology NAS.
-- **Synology_enable_M2_card**
+- **Synology enable M2 card**
- Enable Synology M.2 PCIe cards in Synology NAS that don't officially support them.
-- **Synology_enable_eunit**
+- **Synology enable eunit**
- Enable an unsupported Synology eSATA Expansion Unit models.
-- **Synology_enable_Deduplication**
+- **Synology enable Deduplication**
- Enable deduplication with non-Synology SSDs and unsupported NAS models.
-- **Synology_SHR_switch**
+- **Synology SHR switch**
- Easily switch between SHR and RAID Groups, or enable RAID F1.
-- **Synology_enable_sequential_IO**
+- **Synology enable sequential IO**
- Enables sequential I/O for your SSD caches, like DSM 6 had.
-- **Synology_Information_Wiki**
+- **Synology Information Wiki**
- Information about Synology hardware.
[Back to Contents](#contents)
### 2025 plus models
-- **Transcode_for_x25**
+- **Transcode for x25**
- Installs the modules needed for Plex or Jellyfin hardware transcoding in DS425+ and DS225+.
- **2025 series or later Plus models**
@@ -173,23 +173,23 @@ ### 2025 plus models
### How To Guides
-- **Synology_SSH_key_setup**
+- **Synology SSH key setup**
- How to setup SSH key authentication for your Synology.
[Back to Contents](#contents)
### Synology dev
-- **Download_Synology_Archive**
+- **Download Synology Archive**
- Download all or part of the Synology archive.
-- **Syno_DSM_Extractor_GUI**
+- **Syno DSM Extractor GUI**
- Windows GUI for extracting Synology DSM 7 pat files and spk package files.
- **ScriptNotify**
- DSM 7 package to allow your scripts to send DSM notifications.
-- **DTC_GUI_for_Windows**
+- **DTC GUI for Windows**
- GUI for DTC.exe for Windows.
[Back to Contents](#contents)
From 2c558a6889db269bc594d91f4d6ad7d56886e479 Mon Sep 17 00:00:00 2001
From: 007revad <39733752+007revad@users.noreply.github.com>
Date: Sat, 21 Mar 2026 10:26:48 +1100
Subject: [PATCH 03/70] Update my-other-scripts.md
---
my-other-scripts.md | 3 +++
1 file changed, 3 insertions(+)
diff --git a/my-other-scripts.md b/my-other-scripts.md
index 4a2f4ae..2884144 100644
--- a/my-other-scripts.md
+++ b/my-other-scripts.md
@@ -85,6 +85,9 @@ ### Synology recovery
### Other Synology scripts
+- **Synology Ookla Speedtest**
+ - Synology package to install Ookla Speedtest and run it in a GUI.
+
- **Synology app mover**
- Easily move Synology packages from one volume to another volume.
From 50e7370d52f560f2a95d0c340df3669d3bf92381 Mon Sep 17 00:00:00 2001
From: 007revad <39733752+007revad@users.noreply.github.com>
Date: Tue, 24 Mar 2026 20:18:36 +1100
Subject: [PATCH 04/70] Update my-other-scripts.md
---
my-other-scripts.md | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/my-other-scripts.md b/my-other-scripts.md
index 2884144..238b769 100644
--- a/my-other-scripts.md
+++ b/my-other-scripts.md
@@ -18,6 +18,9 @@ #### Contents
### Asustor
+- **Asustor Ookla Speedtest**
+ - Asustor package to install Ookla Speedtest and run it in a GUI.
+
- **Asustor SMART info**
- Show Asustor smart health and attributes. Can also email you when important values change.
@@ -121,7 +124,7 @@ ### Other Synology scripts
- **Synology created date**
- Script to show you the created year and month of your Synology NAS or expansion unit.
- - **Restore RS3621 Fan Speed**
+- **Restore RS3621 Fan Speed**
- Script to restore RS3621xs+ and RS3621RPxs Quiet mode and Cool mode fan speeds back to how it was before DSM 7.3.2.
[Back to Contents](#contents)
From 3ffc092bc6ebfac7432a7fce07c2832d6ba378f8 Mon Sep 17 00:00:00 2001
From: Dave Russell <39733752+007revad@users.noreply.github.com>
Date: Mon, 30 Mar 2026 12:16:49 +1100
Subject: [PATCH 05/70] Sync my-other-scripts.md from 007revad.github.io
---
my-other-scripts.md | 56 +++++++++++++++++++++++++++++++++------------
1 file changed, 42 insertions(+), 14 deletions(-)
diff --git a/my-other-scripts.md b/my-other-scripts.md
index 238b769..97c386f 100644
--- a/my-other-scripts.md
+++ b/my-other-scripts.md
@@ -1,31 +1,37 @@
-## All my scripts, tools and guides
+## All my scripts, packages, tools and guides
#### Contents
+- [Speed testing](#speed-testing)
- [Plex](#plex)
-- [Asustor scripts](#asustor)
+- [Asustor scripts and packages](#asustor-and-packages)
- [Synology docker](#synology-docker)
- [Synology recovery](#synology-recovery)
-- [Other Synology scripts](#other-synology-scripts)
+- [Other Synology scripts and packages](#other-synology-scripts-and-packages)
- [Synology hardware restrictions](#synology-hardware-restrictions)
-- [2025 plus models](#2025-plus-models)
+- [Synology 2025 plus models](#synology-2025-plus-models)
- [How To Guides](#how-to-guides)
- [Synology dev](#synology-dev)
***
-### Asustor
+### Speed Testing
+
+- **Synology Ookla Speedtest**
+ - Synology DSM 7 package to install Ookla Speedtest and run it in a GUI to test your internet speed.
+
+- **Synology Open Speedtest**
+ - Synology DSM 7 package to install OpenSpeedtest and run it in a GUI to test your LAN speed.
- **Asustor Ookla Speedtest**
- - Asustor package to install Ookla Speedtest and run it in a GUI.
+ - Asustor ADM 5 package to install Ookla Speedtest and run it in a GUI to test your internet speed.
-- **Asustor SMART info**
- - Show Asustor smart health and attributes. Can also email you when important values change.
+- **Asustor Open Speedtest**
+ - Asustor ADM 5 package to install OpenSpeedtest and run it in a GUI to test your LAN speed.
-- **Asustor Plex Backup**
- - Backup your Asustor's Plex Media Server settings and database.
+ [Back to Contents](#contents)
### Plex
@@ -43,6 +49,25 @@ ### Plex
- Sync your main Plex server database & metadata to a backup Plex server.
- Works for Synology, Asustor, Linux and supports Plex package or Plex in docker.
+- **Transcode for x25**
+ - Installs the modules needed for Plex or Jellyfin hardware transcoding on Synology DS425+ and DS225+.
+
+ [Back to Contents](#contents)
+
+### Asustor
+
+- **Asustor Ookla Speedtest**
+ - Asustor ADM 5 package to install Ookla Speedtest and run it in a GUI to test your internet speed.
+
+- **Asustor Open Speedtest**
+ - Asustor ADM 5 package to install OpenSpeedtest and run it in a GUI to test your LAN speed.
+
+- **Asustor SMART info**
+ - Show Asustor smart health and attributes. Can also email you when important values change.
+
+- **Asustor Plex Backup**
+ - Backup your Asustor's Plex Media Server settings and database.
+
[Back to Contents](#contents)
### Synology docker
@@ -86,10 +111,13 @@ ### Synology recovery
[Back to Contents](#contents)
-### Other Synology scripts
+### Other Synology scripts and packages
- **Synology Ookla Speedtest**
- - Synology package to install Ookla Speedtest and run it in a GUI.
+ - Synology DSM 7 package to install Ookla Speedtest and run it in a GUI to test your internet speed.
+
+- **Synology Open Speedtest**
+ - Synology DSM 7 package to install OpenSpeedtest and run it in a GUI to test your LAN speed.
- **Synology app mover**
- Easily move Synology packages from one volume to another volume.
@@ -161,10 +189,10 @@ ### Synology hardware restrictions
[Back to Contents](#contents)
-### 2025 plus models
+### Synology 2025 plus models
- **Transcode for x25**
- - Installs the modules needed for Plex or Jellyfin hardware transcoding in DS425+ and DS225+.
+ - Installs the modules needed for Plex or Jellyfin hardware transcoding on Synology DS425+ and DS225+.
- **2025 series or later Plus models**
- Unverified 3rd party drive limitations and unofficial solutions.
From 8bed2207ec35b12e37d1822cd84f31cee6b43c30 Mon Sep 17 00:00:00 2001
From: Dave Russell <39733752+007revad@users.noreply.github.com>
Date: Mon, 30 Mar 2026 13:55:13 +1100
Subject: [PATCH 06/70] Sync my-other-scripts.md from 007revad.github.io
From 07bb5d3da587f88bb0393f7a007755d34f20a802 Mon Sep 17 00:00:00 2001
From: Dave Russell <39733752+007revad@users.noreply.github.com>
Date: Mon, 30 Mar 2026 19:10:07 +1100
Subject: [PATCH 07/70] Sync my-other-scripts.md from 007revad.github.io
From 1cb9e7cc6b1b2b1b3e9095e4d57d67196db2aba6 Mon Sep 17 00:00:00 2001
From: Dave Russell <39733752+007revad@users.noreply.github.com>
Date: Mon, 30 Mar 2026 19:21:14 +1100
Subject: [PATCH 08/70] Sync my-other-scripts.md from 007revad.github.io
From 107c103f61067e1bc7222ce964e05580517f41a4 Mon Sep 17 00:00:00 2001
From: Dave Russell <39733752+007revad@users.noreply.github.com>
Date: Tue, 31 Mar 2026 18:43:31 +1100
Subject: [PATCH 09/70] Sync my-other-scripts.md from 007revad.github.io
---
my-other-scripts.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/my-other-scripts.md b/my-other-scripts.md
index 97c386f..4017b10 100644
--- a/my-other-scripts.md
+++ b/my-other-scripts.md
@@ -6,7 +6,7 @@ ## All my scripts, packages, tools and guides
#### Contents
- [Speed testing](#speed-testing)
- [Plex](#plex)
-- [Asustor scripts and packages](#asustor-and-packages)
+- [Asustor scripts and packages](#asustor)
- [Synology docker](#synology-docker)
- [Synology recovery](#synology-recovery)
- [Other Synology scripts and packages](#other-synology-scripts-and-packages)
From f82bba2f0e50703f907a452cb2b44ddc45630db0 Mon Sep 17 00:00:00 2001
From: Dave Russell <39733752+007revad@users.noreply.github.com>
Date: Sun, 5 Apr 2026 14:05:28 +1000
Subject: [PATCH 10/70] Sync my-other-scripts.md from 007revad.github.io
---
my-other-scripts.md | 3 +++
1 file changed, 3 insertions(+)
diff --git a/my-other-scripts.md b/my-other-scripts.md
index 4017b10..7b13df1 100644
--- a/my-other-scripts.md
+++ b/my-other-scripts.md
@@ -28,6 +28,9 @@ ### Speed Testing
- **Asustor Ookla Speedtest**
- Asustor ADM 5 package to install Ookla Speedtest and run it in a GUI to test your internet speed.
+- **Asustor LibraSpeed Speedtest**
+ - Asustor ADM 5 package to install LibraSpeed Speedtest and run it in a GUI to test your LAN speed.
+
- **Asustor Open Speedtest**
- Asustor ADM 5 package to install OpenSpeedtest and run it in a GUI to test your LAN speed.
From 8a477fbb2cf9d35a022c53be6f96b5ae70756dea Mon Sep 17 00:00:00 2001
From: Dave Russell <39733752+007revad@users.noreply.github.com>
Date: Sun, 5 Apr 2026 22:01:33 +1000
Subject: [PATCH 11/70] Sync my-other-scripts.md from 007revad.github.io
---
my-other-scripts.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/my-other-scripts.md b/my-other-scripts.md
index 7b13df1..b0e028b 100644
--- a/my-other-scripts.md
+++ b/my-other-scripts.md
@@ -28,8 +28,8 @@ ### Speed Testing
- **Asustor Ookla Speedtest**
- Asustor ADM 5 package to install Ookla Speedtest and run it in a GUI to test your internet speed.
-- **Asustor LibraSpeed Speedtest**
- - Asustor ADM 5 package to install LibraSpeed Speedtest and run it in a GUI to test your LAN speed.
+- **Asustor LibreSpeed Speedtest**
+ - Asustor ADM 5 package to install LibreSpeed Speedtest and run it in a GUI to test your LAN speed.
- **Asustor Open Speedtest**
- Asustor ADM 5 package to install OpenSpeedtest and run it in a GUI to test your LAN speed.
From 2629d1efa10e30461b802e7c8ca2874a9cf34a1d Mon Sep 17 00:00:00 2001
From: Dave Russell <39733752+007revad@users.noreply.github.com>
Date: Sun, 19 Apr 2026 21:57:32 +1000
Subject: [PATCH 12/70] Bug fix for 1 bay NAS without LVM
---
syno_hdd_db.sh | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/syno_hdd_db.sh b/syno_hdd_db.sh
index 14086d3..b9fa073 100644
--- a/syno_hdd_db.sh
+++ b/syno_hdd_db.sh
@@ -29,7 +29,7 @@
# /var/packages/StorageManager/target/ui/storage_panel.js
-scriptver="v3.6.124"
+scriptver="v3.6.125"
script=Synology_HDD_db
repo="007revad/Synology_HDD_db"
scriptname=syno_hdd_db
@@ -630,11 +630,13 @@ get_script_vol() {
vol_name=$(df --output=source "/$script_root" | sed 1d) # sed 1d = delete first line
fi
}
-get_script_vol # sets $vol_name to /dev/whatever
-if grep -qE "^${vol_name#/dev/} .+ nvme" /proc/mdstat; then
- ding
- echo -e "\n${Yellow}WARNING${Off} Don't store this script on an NVMe volume!"
- exit 3
+if which lvm >/dev/null; then
+ get_script_vol # sets $vol_name to /dev/whatever
+ if grep -qE "^${vol_name#/dev/} .+ nvme" /proc/mdstat; then
+ ding
+ echo -e "\n${Yellow}WARNING${Off} Don't store this script on an NVMe volume!"
+ exit 3
+ fi
fi
From e8496028e71881c2be277917d43de03eced826b5 Mon Sep 17 00:00:00 2001
From: Dave Russell <39733752+007revad@users.noreply.github.com>
Date: Sun, 19 Apr 2026 21:59:21 +1000
Subject: [PATCH 13/70] Update CHANGES.txt for version 3.6.125
Added version 3.6.125 with a bug fix for missing lvs and pvs errors for 1 bay NAS.
---
CHANGES.txt | 3 +++
1 file changed, 3 insertions(+)
diff --git a/CHANGES.txt b/CHANGES.txt
index fe91b64..ca3793f 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,6 @@
+v3.6.125
+- Bug fix for missing lvs and pvs errors for 1 bay NAS (that don't have LVM).
+
v3.6.124
- Bug fix for script trying to set write_mostly on SATA M.2 drives. Issue #567
- Bug fix for script trying to use nvme command to get SATA M.2 drives' vendor id. Issue #567
From d296f1ba90517effaef188204a52944b27f0336a Mon Sep 17 00:00:00 2001
From: Dave Russell <39733752+007revad@users.noreply.github.com>
Date: Mon, 20 Apr 2026 21:00:35 +1000
Subject: [PATCH 14/70] Sync my-other-scripts.md from 007revad.github.io
---
my-other-scripts.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/my-other-scripts.md b/my-other-scripts.md
index b0e028b..af5c91d 100644
--- a/my-other-scripts.md
+++ b/my-other-scripts.md
@@ -54,6 +54,7 @@ ### Plex
- **Transcode for x25**
- Installs the modules needed for Plex or Jellyfin hardware transcoding on Synology DS425+ and DS225+.
+ - Available as a package and a script.
[Back to Contents](#contents)
From 36ab0a12ebd51e645da3b587f495e781994e206b Mon Sep 17 00:00:00 2001
From: Dave Russell <39733752+007revad@users.noreply.github.com>
Date: Mon, 20 Apr 2026 21:04:12 +1000
Subject: [PATCH 15/70] Sync my-other-scripts.md from 007revad.github.io
---
my-other-scripts.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/my-other-scripts.md b/my-other-scripts.md
index af5c91d..a298f08 100644
--- a/my-other-scripts.md
+++ b/my-other-scripts.md
@@ -197,6 +197,7 @@ ### Synology 2025 plus models
- **Transcode for x25**
- Installs the modules needed for Plex or Jellyfin hardware transcoding on Synology DS425+ and DS225+.
+ - Available as a package and a script.
- **2025 series or later Plus models**
- Unverified 3rd party drive limitations and unofficial solutions.
From 684fef5501574ddf3a91d25d7ab31c1f52b266d0 Mon Sep 17 00:00:00 2001
From: Dave Russell <39733752+007revad@users.noreply.github.com>
Date: Fri, 24 Apr 2026 15:26:54 +1000
Subject: [PATCH 16/70] Sync my-other-scripts.md from 007revad.github.io
---
my-other-scripts.md | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/my-other-scripts.md b/my-other-scripts.md
index a298f08..eda52ed 100644
--- a/my-other-scripts.md
+++ b/my-other-scripts.md
@@ -4,6 +4,7 @@ ## All my scripts, packages, tools and guides
#### Contents
+- [Synology Package Source](#synology-package-source)
- [Speed testing](#speed-testing)
- [Plex](#plex)
- [Asustor scripts and packages](#asustor)
@@ -17,10 +18,15 @@ #### Contents
***
+### Synology Package Source
+
+- **Synology Package Source**
+ - Synology Package Source adds DSM packages that are available from GitHub to Package Center so users can easily install packages from various GitHub developers and Package Center can update the packages when newer versions are released.
+
### Speed Testing
- **Synology Ookla Speedtest**
- - Synology DSM 7 package to install Ookla Speedtest and run it in a GUI to test your internet speed.
+ - Synology Package Source to add to Package Center so you can install popular packages from GitHub developers.
- **Synology Open Speedtest**
- Synology DSM 7 package to install OpenSpeedtest and run it in a GUI to test your LAN speed.
From fc18071433efaea61477c02e4be04ed7c2c41e1d Mon Sep 17 00:00:00 2001
From: Dave Russell <39733752+007revad@users.noreply.github.com>
Date: Sat, 25 Apr 2026 08:07:55 +1000
Subject: [PATCH 17/70] Sync my-other-scripts.md from 007revad.github.io
---
my-other-scripts.md | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/my-other-scripts.md b/my-other-scripts.md
index eda52ed..dd4d701 100644
--- a/my-other-scripts.md
+++ b/my-other-scripts.md
@@ -26,7 +26,10 @@ ### Synology Package Source
### Speed Testing
- **Synology Ookla Speedtest**
- - Synology Package Source to add to Package Center so you can install popular packages from GitHub developers.
+ - Synology DSM 7 package to install Ookla Speedtest and run it in a GUI to test your Internet speed.
+
+- **Synology Libre Speedtest**
+ - Synology DSM 7 package to install Libre Speedtest and run it in a GUI to test your LAN speed.
- **Synology Open Speedtest**
- Synology DSM 7 package to install OpenSpeedtest and run it in a GUI to test your LAN speed.
From 66eb0278a373dd36e5cb83f6774ade2457962fbe Mon Sep 17 00:00:00 2001
From: Dave Russell <39733752+007revad@users.noreply.github.com>
Date: Sat, 16 May 2026 11:51:35 +1000
Subject: [PATCH 18/70] Sync my-other-scripts.md from 007revad.github.io
---
my-other-scripts.md | 3 +++
1 file changed, 3 insertions(+)
diff --git a/my-other-scripts.md b/my-other-scripts.md
index dd4d701..aca4595 100644
--- a/my-other-scripts.md
+++ b/my-other-scripts.md
@@ -126,6 +126,9 @@ ### Synology recovery
### Other Synology scripts and packages
+- **DSM Update**
+ - Script to automatically download the correct pat file and update DSM using the downloaded pat file.
+
- **Synology Ookla Speedtest**
- Synology DSM 7 package to install Ookla Speedtest and run it in a GUI to test your internet speed.
From 802f32ccc08d10eb5dcada1631b7ce8aaab82b72 Mon Sep 17 00:00:00 2001
From: Dave Russell <39733752+007revad@users.noreply.github.com>
Date: Sat, 16 May 2026 19:10:09 +1000
Subject: [PATCH 19/70] Sync my-other-scripts.md from 007revad.github.io
---
my-other-scripts.md | 3 +++
1 file changed, 3 insertions(+)
diff --git a/my-other-scripts.md b/my-other-scripts.md
index aca4595..e6bbee0 100644
--- a/my-other-scripts.md
+++ b/my-other-scripts.md
@@ -126,6 +126,9 @@ ### Synology recovery
### Other Synology scripts and packages
+- **DSM Notify**
+ - Synology package to allow my scheduled scripts to send notifications to DSM 7.
+
- **DSM Update**
- Script to automatically download the correct pat file and update DSM using the downloaded pat file.
From d2b55ceedf02405d8b2f0fef3c268ef3a739cb06 Mon Sep 17 00:00:00 2001
From: Dave Russell <39733752+007revad@users.noreply.github.com>
Date: Tue, 19 May 2026 17:38:56 +1000
Subject: [PATCH 20/70] Sync my-other-scripts.md from 007revad.github.io
---
my-other-scripts.md | 3 +++
1 file changed, 3 insertions(+)
diff --git a/my-other-scripts.md b/my-other-scripts.md
index e6bbee0..378d5a0 100644
--- a/my-other-scripts.md
+++ b/my-other-scripts.md
@@ -126,6 +126,9 @@ ### Synology recovery
### Other Synology scripts and packages
+- **Check_UPS_Connected**
+ - Script to email you the USP status. Also works for Synology NAS that are UPS clients.
+
- **DSM Notify**
- Synology package to allow my scheduled scripts to send notifications to DSM 7.
From 2da9c19a7b070a663547cad078c65b4976552c5f Mon Sep 17 00:00:00 2001
From: 007revad <39733752+007revad@users.noreply.github.com>
Date: Tue, 2 Jun 2026 08:07:04 +1000
Subject: [PATCH 21/70] v3.6.126
---
CHANGES.txt | 7 +++++
syno_hdd_db.sh | 80 ++++++++++++++++++++++++++++++++++----------------
2 files changed, 61 insertions(+), 26 deletions(-)
diff --git a/CHANGES.txt b/CHANGES.txt
index ca3793f..b9f3bdd 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,10 @@
+v3.6.126
+- Changed to a more reliable way of getting the NAS model name.
+- Changed to keep db file backups up to date.
+ - If a DSM update, or the user, has updated the drive databases the old db file backups are replaced with new backups of the unedited db files.
+- Bug fix for db files with a space in their name, like "rxd1219sas module_v7.db".
+- Bug fix for restore mode failing to restore E10M20-T1 nic support on NAS models that don't officially support the E10M20-T1.
+
v3.6.125
- Bug fix for missing lvs and pvs errors for 1 bay NAS (that don't have LVM).
diff --git a/syno_hdd_db.sh b/syno_hdd_db.sh
index b9fa073..2e0c4cd 100644
--- a/syno_hdd_db.sh
+++ b/syno_hdd_db.sh
@@ -29,7 +29,7 @@
# /var/packages/StorageManager/target/ui/storage_panel.js
-scriptver="v3.6.125"
+scriptver="v3.6.126"
script=Synology_HDD_db
repo="007revad/Synology_HDD_db"
scriptname=syno_hdd_db
@@ -282,8 +282,9 @@ minor=$(/usr/syno/bin/synogetkeyvalue /etc.defaults/VERSION minorversion)
dsmversion="$major$minor"
# Get Synology model
-model=$(cat /proc/sys/kernel/syno_hw_version)
-modelname="$model"
+#model=$(cat /proc/sys/kernel/syno_hw_version)
+#modelname="$model"
+modelname=$(/usr/syno/bin/synogetkeyvalue /etc.defaults/synoinfo.conf upnpmodelname)
# Get CPU platform_name
#platform_name=$(/usr/syno/bin/synogetkeyvalue /etc.defaults/synoinfo.conf platform_name)
@@ -305,22 +306,24 @@ smallfixnumber=$(/usr/syno/bin/synogetkeyvalue /etc.defaults/VERSION smallfixnum
# Show DSM full version and model
if [[ $buildphase == GM ]]; then buildphase=""; fi
if [[ $smallfixnumber -gt "0" ]]; then smallfix="-$smallfixnumber"; fi
-echo "$model $arch DSM $productversion-$buildnumber$smallfix $buildphase"
+#echo "$model $arch DSM $productversion-$buildnumber$smallfix $buildphase"
+echo "$modelname $arch DSM $productversion-$buildnumber$smallfix $buildphase"
# Convert model to lower case
-model=${model,,}
+#model=${model,,}
+model=${modelname,,}
# Check for dodgy characters after model number
-if [[ $model =~ 'pv10-j'$ ]]; then # GitHub issue #10
- modelname=${modelname%??????}+ # replace last 6 chars with +
- model=${model%??????}+ # replace last 6 chars with +
- echo -e "\nUsing model: $model"
-elif [[ $model =~ '-j'$ ]]; then # GitHub issue #2
- modelname=${modelname%??} # remove last 2 chars
- model=${model%??} # remove last 2 chars
- echo -e "\nUsing model: $model"
-fi
+#if [[ $model =~ 'pv10-j'$ ]]; then # GitHub issue #10
+# modelname=${modelname%??????}+ # replace last 6 chars with +
+# model=${model%??????}+ # replace last 6 chars with +
+# echo -e "\nUsing model: $model"
+#elif [[ $model =~ '-j'$ ]]; then # GitHub issue #2
+# modelname=${modelname%??} # remove last 2 chars
+# model=${model%??} # remove last 2 chars
+# echo -e "\nUsing model: $model"
+#fi
# Get StorageManager version
storagemgrver=$(/usr/syno/bin/synopkg version StorageManager)
@@ -631,6 +634,7 @@ get_script_vol() {
fi
}
if which lvm >/dev/null; then
+ # Single bay Synology NAS don't have lvm
get_script_vol # sets $vol_name to /dev/whatever
if grep -qE "^${vol_name#/dev/} .+ nvme" /proc/mdstat; then
ding
@@ -734,11 +738,7 @@ set_writemostly(){
# Restore changes from backups
if [[ $restore == "yes" ]]; then
- dbbaklist=($(find $dbpath -maxdepth 1 \( -name "*.db.new.bak" -o -name "*.db.bak" \)))
- # Sort array
- IFS=$'\n'
- dbbakfiles=($(sort <<<"${dbbaklist[*]}"))
- unset IFS
+ readarray -t dbbakfiles < <(find "$dbpath" -maxdepth 1 \( -name "*.db.new.bak" -o -name "*.db.bak" \) | sort)
echo ""
if [[ ${#dbbakfiles[@]} -gt "0" || -f ${synoinfo}.bak ||\
@@ -783,8 +783,8 @@ if [[ $restore == "yes" ]]; then
# Make sure they don't lose E10M20-T1 network connection
modelrplowercase=${modelname//RP/rp}
- /usr/syno/bin/set_section_key_value ${adapter_cards} E10M20-T1_sup_nic "$modelrplowercase"
- /usr/syno/bin/set_section_key_value ${adapter_cards2} E10M20-T1_sup_nic "$modelrplowercase"
+ /usr/syno/bin/set_section_key_value ${adapter_cards} E10M20-T1_sup_nic "$modelrplowercase" yes
+ /usr/syno/bin/set_section_key_value ${adapter_cards2} E10M20-T1_sup_nic "$modelrplowercase" yes
fi
# Restore model.dtb from backup
@@ -1416,23 +1416,51 @@ getdbtype(){
backupdb(){
# Backup database file if needed
+ local bakversion newversion fname
+ if [[ $2 == "long" ]]; then
+ fname="$1"
+ else
+ fname=$(basename -- "${1}")
+ fi
+
if [[ ! -f "$1.bak" ]]; then
+ # No existing backup
if [[ $(basename "$1") == "synoinfo.conf" ]]; then
echo "" >&2 # Formatting for stdout
fi
- if [[ $2 == "long" ]]; then
- fname="$1"
- else
- fname=$(basename -- "${1}")
- fi
if cp -p "$1" "$1.bak"; then
echo -e "Backed up ${fname}" >&2
+ if [[ "${1##*.}" == "db" ]]; then
+ # Backup db version file as well
+ cp -p "$1.version" "$1.bakver"
+ fi
else
echo -e "${Error}ERROR 5${Off} Failed to backup ${fname}!" >&2
return 1
fi
+ elif [[ "${1##*.}" == "db" ]]; then
+ # Only .db files have version files
+ if [[ ! -f "$1.bakver" ]]; then
+ # Existing backup has no .bakver file, create one
+ cp -p "$1.version" "$1.bakver"
+ fi
+ bakversion=$(cat "$1.bakver" 2>/dev/null)
+ newversion=$(cat "$1.version" 2>/dev/null)
+ if [[ "$newversion" -gt "$bakversion" ]]; then
+ # Newer version db files have been installed
+ if cp -p "$1" "$1.bak"; then
+ echo -e "Backed up ${fname}" >&2
+ # Update db version backup as well
+ cp -p "$1.version" "$1.bakver"
+ else
+ echo -e "${Error}ERROR 5${Off} Failed to backup ${fname}!" >&2
+ return 1
+ fi
+ fi
fi
+
# Fix permissions if needed
+ local octal
octal=$(stat -c "%a %n" "$1" | cut -d" " -f1)
if [[ ! $octal -eq 644 ]]; then
chmod 644 "$1"
From 8111e099aee9ddd3cef5456e69c02db2f3cfaf0a Mon Sep 17 00:00:00 2001
From: 007revad <39733752+007revad@users.noreply.github.com>
Date: Tue, 2 Jun 2026 08:41:51 +1000
Subject: [PATCH 22/70] v3.6.126
---
CHANGES.txt | 1 +
syno_hdd_db.sh | 22 +++++++++++++---------
2 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/CHANGES.txt b/CHANGES.txt
index b9f3bdd..79bbbf5 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -4,6 +4,7 @@ v3.6.126
- If a DSM update, or the user, has updated the drive databases the old db file backups are replaced with new backups of the unedited db files.
- Bug fix for db files with a space in their name, like "rxd1219sas module_v7.db".
- Bug fix for restore mode failing to restore E10M20-T1 nic support on NAS models that don't officially support the E10M20-T1.
+- Bug fix for XPE not showing drive's correct temperature. Issue #586
v3.6.125
- Bug fix for missing lvs and pvs errors for 1 bay NAS (that don't have LVM).
diff --git a/syno_hdd_db.sh b/syno_hdd_db.sh
index 2e0c4cd..b5c3251 100644
--- a/syno_hdd_db.sh
+++ b/syno_hdd_db.sh
@@ -1360,27 +1360,29 @@ fi
# Check databases and add our drives if needed
# Host db files
-db1list=($(find "$dbpath" -maxdepth 1 -name "*_host*.db"))
-db2list=($(find "$dbpath" -maxdepth 1 -name "*_host*.db.new"))
+#db1list=($(find "$dbpath" -maxdepth 1 -name "*_host*.db"))
+#db2list=($(find "$dbpath" -maxdepth 1 -name "*_host*.db.new"))
#db1list=($(find "$dbpath" -maxdepth 1 -regextype posix-extended\
# -iregex ".*_host(_v7)?.db"))
#db2list=($(find "$dbpath" -maxdepth 1 -regextype posix-extended\
# -iregex ".*_host(_v7)?.db.new"))
+readarray -t db1list < <(find "$dbpath" -maxdepth 1 -name "*_host*.db" | sort)
+readarray -t db2list < <(find "$dbpath" -maxdepth 1 -name "*_host*.db.new" | sort)
# Expansion Unit db files
for i in "${!eunits[@]}"; do
#eunitdb1list+=($(find "$dbpath" -maxdepth 1 -name "${eunits[i],,}*.db"))
- eunitdb1list+=($(find "$dbpath" -maxdepth 1 -regextype posix-extended\
- -iregex ".*${eunits[i],,}(_v7)?.db"))
+ eunitdb1list+=("$(find "$dbpath" -maxdepth 1 -regextype posix-extended\
+ -iregex ".*${eunits[i],,}(_v7)?.db")")
#eunitdb2list+=($(find "$dbpath" -maxdepth 1 -name "${eunits[i],,}*.db.new"))
- eunitdb2list+=($(find "$dbpath" -maxdepth 1 -regextype posix-extended\
- -iregex ".*${eunits[i],,}(_v7)?.db.new"))
+ eunitdb2list+=("$(find "$dbpath" -maxdepth 1 -regextype posix-extended\
+ -iregex ".*${eunits[i],,}(_v7)?.db.new")")
done
# M.2 Card db files
for i in "${!m2cards[@]}"; do
- m2carddb1list+=($(find "$dbpath" -maxdepth 1 -name "*_${m2cards[i],,}*.db"))
- m2carddb2list+=($(find "$dbpath" -maxdepth 1 -name "*_${m2cards[i],,}*.db.new"))
+ m2carddb1list+=("$(find "$dbpath" -maxdepth 1 -name "*_${m2cards[i],,}*.db")")
+ m2carddb2list+=("$(find "$dbpath" -maxdepth 1 -name "*_${m2cards[i],,}*.db.new")")
done
@@ -1684,12 +1686,14 @@ updatedb(){
common_string="$common_string"\"smart_test_ignore\":false,
common_string="$common_string"\"smart_attr_ignore\":false
- fwstrng=\"$fwrev\":{
+ #fwstrng=\"$fwrev\":{
+ fwstrng=\"$fwrev\":{\"fw_buildnumber\":1, # Issue 585. Fix drive temperature for XPE
fwstrng="$fwstrng$common_string"
fwstrng="$fwstrng"}]},
#default=\"default\":{
default=\"default\":{\"size_gb\":$size_gb,
+ #default=\"default\":{\"fw_buildnumber\":1,\"size_gb\":$size_gb, # Issue 585. Fix drive temperature for XPE
default="$default$common_string"
default="$default"}]}}}
From 4bae864b3df7e98446d28340095ebe69e9f48384 Mon Sep 17 00:00:00 2001
From: Dave Russell <39733752+007revad@users.noreply.github.com>
Date: Tue, 2 Jun 2026 08:52:21 +1000
Subject: [PATCH 23/70] Fix issue number for XPE temperature bug
Corrected issue number for XPE temperature bug fix.
---
CHANGES.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CHANGES.txt b/CHANGES.txt
index 79bbbf5..7485229 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -4,7 +4,7 @@ v3.6.126
- If a DSM update, or the user, has updated the drive databases the old db file backups are replaced with new backups of the unedited db files.
- Bug fix for db files with a space in their name, like "rxd1219sas module_v7.db".
- Bug fix for restore mode failing to restore E10M20-T1 nic support on NAS models that don't officially support the E10M20-T1.
-- Bug fix for XPE not showing drive's correct temperature. Issue #586
+- Bug fix for XPE not showing drive's correct temperature. Issue #585
v3.6.125
- Bug fix for missing lvs and pvs errors for 1 bay NAS (that don't have LVM).
From 716db64e31f51148faeffff3c7ce5bd345f8cd5b Mon Sep 17 00:00:00 2001
From: 007revad <39733752+007revad@users.noreply.github.com>
Date: Wed, 3 Jun 2026 09:18:42 +1000
Subject: [PATCH 24/70] v3.6.127
---
CHANGES.txt | 3 +++
syno_hdd_db.sh | 24 ++++++++++++++++++++----
2 files changed, 23 insertions(+), 4 deletions(-)
diff --git a/CHANGES.txt b/CHANGES.txt
index 79bbbf5..2995edd 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,6 @@
+v3.6.127
+- Bug fix for 6 TB drives having '"size_gb": 6001' in db files.
+
v3.6.126
- Changed to a more reliable way of getting the NAS model name.
- Changed to keep db file backups up to date.
diff --git a/syno_hdd_db.sh b/syno_hdd_db.sh
index b5c3251..384f8bc 100644
--- a/syno_hdd_db.sh
+++ b/syno_hdd_db.sh
@@ -29,7 +29,7 @@
# /var/packages/StorageManager/target/ui/storage_panel.js
-scriptver="v3.6.126"
+scriptver="v3.6.127"
script=Synology_HDD_db
repo="007revad/Synology_HDD_db"
scriptname=syno_hdd_db
@@ -1028,7 +1028,9 @@ fixdrivemodel(){
get_size_gb(){
# $1 is /sys/block/sata1 or /sys/block/nvme0n1 etc
local disk_size_gb
- disk_size_gb=$(synodisk --info /dev/"$(basename -- "$1")" 2>/dev/null | grep 'Total capacity' | awk '{print int($4 * 1.073741824)}')
+ #disk_size_gb=$(synodisk --info /dev/"$(basename -- "$1")" 2>/dev/null | grep 'Total capacity' | awk '{print int($4 * 1.073741824)}')
+ # Prevent 6 TB drives getting rounded up to 6001 !!!
+ disk_size_gb=$(synodisk --info /dev/"$(basename -- "$1")" 2>/dev/null | grep 'Total capacity' | awk '{gb = $4 * 1.073741824; printf "%d\n", int(gb / 4 + 0.5) * 4}')
echo "$disk_size_gb"
}
@@ -1761,15 +1763,29 @@ updatedb(){
}
+# Fix "size_gb": 6001, for 6 TB drives caused by v3.5.104 to v3.6.126
+if [[ "${#db1list[@]}" -gt "0" ]]; then
+ for i in "${!db1list[@]}"; do
+ sed -i 's/"size_gb": 6001/"size_gb": 6000/g' "${db1list[i]}"
+ sed -i 's/"size_gb":6001/"size_gb":6000/g' "${db1list[i]}"
+ done
+fi
+if [[ "${#db2list[@]}" -gt "0" ]]; then
+ for i in "${!db2list[@]}"; do
+ sed -i 's/"size_gb": 6001/"size_gb": 6000/g' "${db2list[i]}"
+ sed -i 's/"size_gb":6001/"size_gb":6000/g' "${db2list[i]}"
+ done
+fi
+
# Fix ,, instead of , bug caused by v3.3.75
if [[ "${#db1list[@]}" -gt "0" ]]; then
for i in "${!db1list[@]}"; do
- sed -i "s/,,/,/" "${db1list[i]}"
+ sed -i "s/,,/,/" "${db1list[i]}"
done
fi
if [[ "${#db2list[@]}" -gt "0" ]]; then
for i in "${!db2list[@]}"; do
- sed -i "s/,,/,/" "${db2list[i]}"
+ sed -i "s/,,/,/" "${db2list[i]}"
done
fi
From 608de6f86d6180ff430af63a35e989671f30fc28 Mon Sep 17 00:00:00 2001
From: 007revad <39733752+007revad@users.noreply.github.com>
Date: Wed, 3 Jun 2026 10:45:49 +1000
Subject: [PATCH 25/70] v3.6.127
---
CHANGES.txt | 1 +
syno_hdd_db.sh | 10 +++++-----
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/CHANGES.txt b/CHANGES.txt
index 028c87f..d620206 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,6 @@
v3.6.127
- Bug fix for 6 TB drives having '"size_gb": 6001' in db files.
+- Bug fix for trying to backup "*_v7.db.version" instead of "*_v7.version".
v3.6.126
- Changed to a more reliable way of getting the NAS model name.
diff --git a/syno_hdd_db.sh b/syno_hdd_db.sh
index 384f8bc..0603386 100644
--- a/syno_hdd_db.sh
+++ b/syno_hdd_db.sh
@@ -1444,18 +1444,18 @@ backupdb(){
fi
elif [[ "${1##*.}" == "db" ]]; then
# Only .db files have version files
- if [[ ! -f "$1.bakver" ]]; then
+ if [[ ! -f "${1%.db}.bakver" ]]; then
# Existing backup has no .bakver file, create one
- cp -p "$1.version" "$1.bakver"
+ cp -p "${1%.db}.version" "${1%.db}.bakver"
fi
- bakversion=$(cat "$1.bakver" 2>/dev/null)
- newversion=$(cat "$1.version" 2>/dev/null)
+ bakversion=$(cat "${1%.db}.bakver" 2>/dev/null)
+ newversion=$(cat "${1%.db}.version" 2>/dev/null)
if [[ "$newversion" -gt "$bakversion" ]]; then
# Newer version db files have been installed
if cp -p "$1" "$1.bak"; then
echo -e "Backed up ${fname}" >&2
# Update db version backup as well
- cp -p "$1.version" "$1.bakver"
+ cp -p "${1%.db}.version" "${1%.db}.bakver"
else
echo -e "${Error}ERROR 5${Off} Failed to backup ${fname}!" >&2
return 1
From 699f6f9c5120c021f4e70b759b79232768def667 Mon Sep 17 00:00:00 2001
From: 007revad <39733752+007revad@users.noreply.github.com>
Date: Wed, 3 Jun 2026 10:48:20 +1000
Subject: [PATCH 26/70] v3.6.127
---
CHANGES.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CHANGES.txt b/CHANGES.txt
index d620206..155433a 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,5 @@
v3.6.127
-- Bug fix for 6 TB drives having '"size_gb": 6001' in db files.
+- Bug fix for 6 TB drives having '"size_gb": 6001' in db files instead of '"size_gb": 6000'.
- Bug fix for trying to backup "*_v7.db.version" instead of "*_v7.version".
v3.6.126
From 489416b078b85ff8b628f85bde6ebd41de543e22 Mon Sep 17 00:00:00 2001
From: 007revad <39733752+007revad@users.noreply.github.com>
Date: Wed, 3 Jun 2026 10:49:50 +1000
Subject: [PATCH 27/70] v3.6.127
---
CHANGES.txt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/CHANGES.txt b/CHANGES.txt
index 155433a..51606bb 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,6 +1,7 @@
v3.6.127
-- Bug fix for 6 TB drives having '"size_gb": 6001' in db files instead of '"size_gb": 6000'.
- Bug fix for trying to backup "*_v7.db.version" instead of "*_v7.version".
+- Bug fix for 6 TB drives having '"size_gb": 6001' in db files instead of '"size_gb": 6000'.
+ - Also replaces any existing '"size_gb": 6001' in db files with '"size_gb": 6000'.
v3.6.126
- Changed to a more reliable way of getting the NAS model name.
From aba32f6796e78b8d5607bf55ea26b3f469ef2a63 Mon Sep 17 00:00:00 2001
From: 007revad <39733752+007revad@users.noreply.github.com>
Date: Wed, 3 Jun 2026 14:32:53 +1000
Subject: [PATCH 28/70] v3.6.128
---
CHANGES.txt | 3 +++
syno_hdd_db.sh | 14 ++++++++++----
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/CHANGES.txt b/CHANGES.txt
index 51606bb..fafbcdf 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,6 @@
+v3.6.128
+- Bug fix for trying to backup "*_v7.db.version" instead of "*_v7.version".
+
v3.6.127
- Bug fix for trying to backup "*_v7.db.version" instead of "*_v7.version".
- Bug fix for 6 TB drives having '"size_gb": 6001' in db files instead of '"size_gb": 6000'.
diff --git a/syno_hdd_db.sh b/syno_hdd_db.sh
index 0603386..f17f7ef 100644
--- a/syno_hdd_db.sh
+++ b/syno_hdd_db.sh
@@ -29,7 +29,7 @@
# /var/packages/StorageManager/target/ui/storage_panel.js
-scriptver="v3.6.127"
+scriptver="v3.6.128"
script=Synology_HDD_db
repo="007revad/Synology_HDD_db"
scriptname=syno_hdd_db
@@ -1436,7 +1436,9 @@ backupdb(){
echo -e "Backed up ${fname}" >&2
if [[ "${1##*.}" == "db" ]]; then
# Backup db version file as well
- cp -p "$1.version" "$1.bakver"
+ if [[ -f "${1%.db}.version" ]]; then
+ cp -p "${1%.db}.version" "${1%.db}.bakver"
+ fi
fi
else
echo -e "${Error}ERROR 5${Off} Failed to backup ${fname}!" >&2
@@ -1446,7 +1448,9 @@ backupdb(){
# Only .db files have version files
if [[ ! -f "${1%.db}.bakver" ]]; then
# Existing backup has no .bakver file, create one
- cp -p "${1%.db}.version" "${1%.db}.bakver"
+ if [[ -f "${1%.db}.version" ]]; then
+ cp -p "${1%.db}.version" "${1%.db}.bakver"
+ fi
fi
bakversion=$(cat "${1%.db}.bakver" 2>/dev/null)
newversion=$(cat "${1%.db}.version" 2>/dev/null)
@@ -1455,7 +1459,9 @@ backupdb(){
if cp -p "$1" "$1.bak"; then
echo -e "Backed up ${fname}" >&2
# Update db version backup as well
- cp -p "${1%.db}.version" "${1%.db}.bakver"
+ if [[ -f "${1%.db}.version" ]]; then
+ cp -p "${1%.db}.version" "${1%.db}.bakver"
+ fi
else
echo -e "${Error}ERROR 5${Off} Failed to backup ${fname}!" >&2
return 1
From ceea30c7f0b826f55b172af7c0c4faf2c5fe3337 Mon Sep 17 00:00:00 2001
From: 007revad <39733752+007revad@users.noreply.github.com>
Date: Wed, 3 Jun 2026 16:32:54 +1000
Subject: [PATCH 29/70] v3.6.129
---
CHANGES.txt | 3 +++
syno_hdd_db.sh | 18 ++++--------------
2 files changed, 7 insertions(+), 14 deletions(-)
diff --git a/CHANGES.txt b/CHANGES.txt
index fafbcdf..3c5ae5c 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,6 @@
+v3.6.129
+- Bug fix for backing up expansion unit db files (introduced in v3.6.126).
+
v3.6.128
- Bug fix for trying to backup "*_v7.db.version" instead of "*_v7.version".
diff --git a/syno_hdd_db.sh b/syno_hdd_db.sh
index f17f7ef..d0bf9a5 100644
--- a/syno_hdd_db.sh
+++ b/syno_hdd_db.sh
@@ -29,7 +29,7 @@
# /var/packages/StorageManager/target/ui/storage_panel.js
-scriptver="v3.6.128"
+scriptver="v3.6.129"
script=Synology_HDD_db
repo="007revad/Synology_HDD_db"
scriptname=syno_hdd_db
@@ -1362,23 +1362,13 @@ fi
# Check databases and add our drives if needed
# Host db files
-#db1list=($(find "$dbpath" -maxdepth 1 -name "*_host*.db"))
-#db2list=($(find "$dbpath" -maxdepth 1 -name "*_host*.db.new"))
-#db1list=($(find "$dbpath" -maxdepth 1 -regextype posix-extended\
-# -iregex ".*_host(_v7)?.db"))
-#db2list=($(find "$dbpath" -maxdepth 1 -regextype posix-extended\
-# -iregex ".*_host(_v7)?.db.new"))
readarray -t db1list < <(find "$dbpath" -maxdepth 1 -name "*_host*.db" | sort)
readarray -t db2list < <(find "$dbpath" -maxdepth 1 -name "*_host*.db.new" | sort)
# Expansion Unit db files
-for i in "${!eunits[@]}"; do
- #eunitdb1list+=($(find "$dbpath" -maxdepth 1 -name "${eunits[i],,}*.db"))
- eunitdb1list+=("$(find "$dbpath" -maxdepth 1 -regextype posix-extended\
- -iregex ".*${eunits[i],,}(_v7)?.db")")
- #eunitdb2list+=($(find "$dbpath" -maxdepth 1 -name "${eunits[i],,}*.db.new"))
- eunitdb2list+=("$(find "$dbpath" -maxdepth 1 -regextype posix-extended\
- -iregex ".*${eunits[i],,}(_v7)?.db.new")")
+for i in "${eunits[@]}"; do
+ readarray -t -O "${#eunitdb1list[@]}" eunitdb1list < <(find "$dbpath" -maxdepth 1 -name "${i,,}*.db" | sort)
+ readarray -t -O "${#eunitdb2list[@]}" eunitdb2list < <(find "$dbpath" -maxdepth 1 -name "${i,,}*.db.new" | sort)
done
# M.2 Card db files
From 4015c3ce08c4514a37c71b41829a8a427ca2ba15 Mon Sep 17 00:00:00 2001
From: 007revad <39733752+007revad@users.noreply.github.com>
Date: Sat, 6 Jun 2026 06:26:23 +1000
Subject: [PATCH 30/70] v3.6.130
---
CHANGES.txt | 4 ++++
syno_hdd_db.sh | 27 ++++++++++++++++-----------
2 files changed, 20 insertions(+), 11 deletions(-)
diff --git a/CHANGES.txt b/CHANGES.txt
index 3c5ae5c..a7b544a 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,7 @@
+v3.6.130
+- Bug fix for Samsung SSDs that have 2.5" in their model name.
+- Bug fix for not removing leading spaces in drive model names (introduced in v3.6.123).
+
v3.6.129
- Bug fix for backing up expansion unit db files (introduced in v3.6.126).
diff --git a/syno_hdd_db.sh b/syno_hdd_db.sh
index d0bf9a5..3d88a7b 100644
--- a/syno_hdd_db.sh
+++ b/syno_hdd_db.sh
@@ -29,7 +29,7 @@
# /var/packages/StorageManager/target/ui/storage_panel.js
-scriptver="v3.6.129"
+scriptver="v3.6.130"
script=Synology_HDD_db
repo="007revad/Synology_HDD_db"
scriptname=syno_hdd_db
@@ -1015,13 +1015,13 @@ fixdrivemodel(){
hdmodel=${hdmodel#"FUJISTU "} # Remove "FUJISTU " from start of model name
# Remove any leading spaces
- var=$(echo "$var" | sed -e 's/^[[:space:]]*//')
+ hdmodel=$(echo "$hdmodel" | sed -e 's/^[[:space:]]*//')
elif [[ $1 =~ ^'APPLE HDD '.* ]]; then
# Old drive brands
hdmodel=${hdmodel#"APPLE HDD "} # Remove "APPLE HDD " from start of model name
# Remove any leading spaces
- var=$(echo "$var" | sed -e 's/^[[:space:]]*//')
+ hdmodel=$(echo "$hdmodel" | sed -e 's/^[[:space:]]*//')
fi
}
@@ -1605,9 +1605,12 @@ editcount(){
editdb7(){
+ local hdmodel_sed
+ hdmodel_sed="${hdmodel//\"/\\\"}" # escape " for sed/JSON
+ hdmodel_sed="${hdmodel_sed//\//\\/}" # escape / for sed
+
if [[ $1 == "append" ]]; then # model not in db file
- #if sed -i "s/}}}/}},\"$hdmodel\":{$fwstrng$default/" "$2"; then # append
- if sed -i "s/}}}/}},\"${hdmodel//\//\\/}\":{$fwstrng$default/" "$2"; then # append
+ if sed -i "s/}}}/}},\"${hdmodel_sed}\":{$fwstrng$default/" "$2"; then # append
if jq -e --arg hdmodel "$hdmodel" --arg fwrev "$fwrev" \
'.disk_compatbility_info[$hdmodel] | has($fwrev)' "$2" > /dev/null; then
echo -e "Added ${Yellow}$hdmodel ($fwrev)${Off} to ${Cyan}$(basename -- "$2")${Off}"
@@ -1621,8 +1624,7 @@ editdb7(){
fi
elif [[ $1 == "insert" ]]; then # model and default exists
- #if sed -i "s/\"$hdmodel\":{/\"$hdmodel\":{$fwstrng/" "$2"; then # insert firmware
- if sed -i "s/\"${hdmodel//\//\\/}\":{/\"${hdmodel//\//\\/}\":{$fwstrng/" "$2"; then # insert firmware
+ if sed -i "s/\"${hdmodel_sed}\":{/\"${hdmodel_sed}\":{$fwstrng/" "$2"; then # insert firmware
if jq -e --arg hdmodel "$hdmodel" --arg fwrev "$fwrev" \
'.disk_compatbility_info[$hdmodel] | has($fwrev)' "$2" > /dev/null; then
echo -e "Updated ${Yellow}$hdmodel ($fwrev)${Off} in ${Cyan}$(basename -- "$2")${Off}"
@@ -1636,9 +1638,7 @@ editdb7(){
fi
elif [[ $1 == "empty" ]]; then # db file only contains {}
- #if sed -i "s/{}/{\"$hdmodel\":{$fwstrng${default}}/" "$2"; then # empty
- #if sed -i "s/{}/{\"${hdmodel//\//\\/}\":{$fwstrng${default}}/" "$2"; then # empty
- if sed -i "s/{}/{\"${hdmodel//\//\\/}\":{$fwstrng${default}/" "$2"; then # empty
+ if sed -i "s/{}/{\"${hdmodel_sed}\":{$fwstrng${default}/" "$2"; then # empty
if jq -e --arg hdmodel "$hdmodel" --arg fwrev "$fwrev" \
'.disk_compatbility_info[$hdmodel] | has($fwrev)' "$2" > /dev/null; then
echo -e "Added ${Yellow}$hdmodel ($fwrev)${Off} to ${Cyan}$(basename -- "$2")${Off}"
@@ -1733,6 +1733,10 @@ updatedb(){
fi
elif [[ $dbtype -eq "6" ]]; then
# db type 6 used up to DSM 7.0.1
+ local hdmodel_sed
+ hdmodel_sed="${hdmodel//\"/\\\"}" # escape " for sed/JSON
+ hdmodel_sed="${hdmodel_sed//\//\\/}" # escape / for sed
+
if grep -q "$hdmodel" "$2"; then
echo -e "${Yellow}$hdmodel${Off} already exists in ${Cyan}$(basename -- "$2")${Off}" >&2
else
@@ -1740,7 +1744,8 @@ updatedb(){
# {"model":"WD60EFRX-68MYMN1","firmware":"82.00A82","rec_intvl":[1]},
# Don't need to add firmware version?
#string="{\"model\":\"${hdmodel}\",\"firmware\":\"${fwrev}\",\"rec_intvl\":\[1\]},"
- string="{\"model\":\"${hdmodel}\",\"firmware\":\"\",\"rec_intvl\":\[1\]},"
+ #string="{\"model\":\"${hdmodel}\",\"firmware\":\"\",\"rec_intvl\":\[1\]},"
+ string="{\"model\":\"${hdmodel_sed}\",\"firmware\":\"\",\"rec_intvl\":\[1\]},"
# {"success":1,"list":[
startstring="{\"success\":1,\"list\":\["
# example:
From c1b5e817a06c6543e71a7d7f94546999765ebe80 Mon Sep 17 00:00:00 2001
From: Dave Russell <39733752+007revad@users.noreply.github.com>
Date: Sun, 7 Jun 2026 10:04:24 +1000
Subject: [PATCH 31/70] Update 2025_plus_models.md
---
2025_plus_models.md | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/2025_plus_models.md b/2025_plus_models.md
index b4de80b..a35c99e 100644
--- a/2025_plus_models.md
+++ b/2025_plus_models.md
@@ -40,22 +40,25 @@ ### Setting up a new 2025 or later plus model with only unverified HDDs in DSM 7
1. Start telnet by entering `http://:5000/webman/start_telnet.cgi` into your browser's address bar.
- Replace `` with the IP address of the Synology NAS.
-2. Open a telnet client (powershell, PuTTY etc) on your computer and connect to the Synology with 'telnet `.
+2. Open a telnet client (powershell, PuTTY, Terminal etc) on your computer and connect to the Synology by typing the following in the telent window then press enter:
+ ```
+ telnet
+ ```
- Replace `` with the IP address of the Synology NAS.
-3. Log into telnet with:
+4. Log into telnet with:
- `root` for the login
- `101-0101` for the password
-4. Execute the following command: (using a while loop in case DSM is running in a VM)
+5. Execute the following command: (using a while loop in case DSM is running in a VM)
```
while true; do touch /tmp/installable_check_pass; sleep 1; done
```
-5. Refresh the web installation page and install DSM.
-6. Then in the telnet window, or via SSH, execute the following command:
+6. Refresh the web browser installation page and install DSM.
+7. Then back in the telnet window, or via SSH, paste the following command and press enter:
```
/usr/syno/bin/synosetkeyvalue /etc.defaults/synoinfo.conf support_disk_compatibility no
```
-7. If Storage Manager is already open close then open it, or refresh the web page. If refreshing the page or restarting Storage Manager is not working, try restarting your Synology NAS.
-8. You can now create your storage pool from Storage Manager.
+8. If Storage Manager is already open close then open it, or refresh the web page. If refreshing the page or restarting Storage Manager is not working, try restarting your Synology NAS.
+9. You can now create your storage pool from Storage Manager.
From b028b15daf9bb24d7d4acc05f136a5b1f4c51af2 Mon Sep 17 00:00:00 2001
From: Dave Russell <39733752+007revad@users.noreply.github.com>
Date: Sun, 7 Jun 2026 10:08:59 +1000
Subject: [PATCH 32/70] Update 2025_plus_models.md
---
2025_plus_models.md | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/2025_plus_models.md b/2025_plus_models.md
index a35c99e..4f592c8 100644
--- a/2025_plus_models.md
+++ b/2025_plus_models.md
@@ -38,9 +38,10 @@ ### Setting up a new 2025 or later plus model with only unverified HDDs in DSM 7
DSM won't install on a 2025 or later series plus model if you only have unverified HDDs. But we can get around that.
-1. Start telnet by entering `http://:5000/webman/start_telnet.cgi` into your browser's address bar.
+1. Get the Synology's IP address from Synology Assistant.
+2. Start telnet by entering `http://:5000/webman/start_telnet.cgi` into your browser's address bar.
- Replace `` with the IP address of the Synology NAS.
-2. Open a telnet client (powershell, PuTTY, Terminal etc) on your computer and connect to the Synology by typing the following in the telent window then press enter:
+3. Open a telnet client (powershell, PuTTY, Terminal etc) on your computer and connect to the Synology by typing the following in the telent window then press enter:
```
telnet
```
From 2a3a9a346c5521c26e13e6fc73e7de13d52e3a4f Mon Sep 17 00:00:00 2001
From: Dave Russell <39733752+007revad@users.noreply.github.com>
Date: Sun, 7 Jun 2026 10:10:31 +1000
Subject: [PATCH 33/70] Update 2025_plus_models.md
---
2025_plus_models.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/2025_plus_models.md b/2025_plus_models.md
index 4f592c8..c048d53 100644
--- a/2025_plus_models.md
+++ b/2025_plus_models.md
@@ -39,9 +39,9 @@ ### Setting up a new 2025 or later plus model with only unverified HDDs in DSM 7
DSM won't install on a 2025 or later series plus model if you only have unverified HDDs. But we can get around that.
1. Get the Synology's IP address from Synology Assistant.
-2. Start telnet by entering `http://:5000/webman/start_telnet.cgi` into your browser's address bar.
+2. Start DSM's telnet server by entering `http://:5000/webman/start_telnet.cgi` into your browser's address bar.
- Replace `` with the IP address of the Synology NAS.
-3. Open a telnet client (powershell, PuTTY, Terminal etc) on your computer and connect to the Synology by typing the following in the telent window then press enter:
+3. Open a telnet client (PowerShell, PuTTY, Terminal etc) on your computer and connect to the Synology by typing the following in the telent window then press enter:
```
telnet
```
From c9d4a447e33692c7fc30a09067cdea8a301cbaf5 Mon Sep 17 00:00:00 2001
From: Dave Russell <39733752+007revad@users.noreply.github.com>
Date: Sun, 7 Jun 2026 17:49:00 +1000
Subject: [PATCH 34/70] Update 2025_plus_models.md
---
2025_plus_models.md | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/2025_plus_models.md b/2025_plus_models.md
index c048d53..8750c83 100644
--- a/2025_plus_models.md
+++ b/2025_plus_models.md
@@ -46,10 +46,15 @@ ### Setting up a new 2025 or later plus model with only unverified HDDs in DSM 7
telnet
```
- Replace `` with the IP address of the Synology NAS.
-4. Log into telnet with:
+4. When it asks you to log in use:
- `root` for the login
- `101-0101` for the password
-5. Execute the following command: (using a while loop in case DSM is running in a VM)
+ - Note: When you type the password you may not see what you are typing.
+5. Execute the following command:
+ ```
+ touch /tmp/installable_check_pass
+ ```
+ - If DSM is running in a virtual machine use this command instead:
```
while true; do touch /tmp/installable_check_pass; sleep 1; done
```
From 6e755a08641a0232dc6f89b96dfaf9d6beb13a15 Mon Sep 17 00:00:00 2001
From: Dave Russell <39733752+007revad@users.noreply.github.com>
Date: Sun, 7 Jun 2026 17:54:58 +1000
Subject: [PATCH 35/70] Fix version reference and add Mac Terminal note
Corrected the version reference and added a note for Mac users regarding Terminal installation.
---
2025_plus_models.md | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/2025_plus_models.md b/2025_plus_models.md
index 8750c83..9260833 100644
--- a/2025_plus_models.md
+++ b/2025_plus_models.md
@@ -36,7 +36,7 @@ ### Setting up a new 2025 or later plus model with only unverified HDDs in DSM 7
Credit to Alex_of_Chaos on reddit
-DSM won't install on a 2025 or later series plus model if you only have unverified HDDs. But we can get around that.
+DSM 7.2.2 won't install on a 2025 or later series plus model if you only have unverified HDDs. But we can get around that.
1. Get the Synology's IP address from Synology Assistant.
2. Start DSM's telnet server by entering `http://:5000/webman/start_telnet.cgi` into your browser's address bar.
@@ -45,11 +45,12 @@ ### Setting up a new 2025 or later plus model with only unverified HDDs in DSM 7
```
telnet
```
- - Replace `` with the IP address of the Synology NAS.
+ - Replace `` with the IP address of the Synology NAS.
+ - **Note:** If using a Mac you may need to install Terminal.
4. When it asks you to log in use:
- `root` for the login
- `101-0101` for the password
- - Note: When you type the password you may not see what you are typing.
+ - **Note:** When you type the password you may not see what you are typing.
5. Execute the following command:
```
touch /tmp/installable_check_pass
From f223b1be8aaf735c27a47f44f936e949b74722b4 Mon Sep 17 00:00:00 2001
From: Dave Russell <39733752+007revad@users.noreply.github.com>
Date: Mon, 8 Jun 2026 15:32:50 +1000
Subject: [PATCH 36/70] Enhance telnet connection instructions for Mac users
Added instructions for installing telnet on Mac.
---
2025_plus_models.md | 24 ++++++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)
diff --git a/2025_plus_models.md b/2025_plus_models.md
index 9260833..379684b 100644
--- a/2025_plus_models.md
+++ b/2025_plus_models.md
@@ -41,12 +41,32 @@ ### Setting up a new 2025 or later plus model with only unverified HDDs in DSM 7
1. Get the Synology's IP address from Synology Assistant.
2. Start DSM's telnet server by entering `http://:5000/webman/start_telnet.cgi` into your browser's address bar.
- Replace `` with the IP address of the Synology NAS.
-3. Open a telnet client (PowerShell, PuTTY, Terminal etc) on your computer and connect to the Synology by typing the following in the telent window then press enter:
+3. Open a telnet client (PowerShell, PuTTY, Terminal etc) on your computer and connect to the Synology by typing the following in the telnet window then press enter:
```
telnet
```
- Replace `` with the IP address of the Synology NAS.
- - **Note:** If using a Mac you may need to install Terminal.
+ - **Note:** If using a Mac you may need to install Terminal.
+
+
+ Click here to see how to install telnet on a Mac
+
+ **Installing telnet on a Mac**
+
+ a. Open your Terminal app.
+
+ b. If you don't have Homebrew installed, copy and paste the following command into Terminal and press Enter:
+ ```
+ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
+ ```
+
+ c. Once Homebrew is installed, simply run the installation command:
+ ```
+ brew install telnet
+ ```
+
+
+
4. When it asks you to log in use:
- `root` for the login
- `101-0101` for the password
From f0242c025b24bdab778fe8cbde3f93e465e2b52f Mon Sep 17 00:00:00 2001
From: Dave Russell <39733752+007revad@users.noreply.github.com>
Date: Sat, 13 Jun 2026 11:25:03 +1000
Subject: [PATCH 37/70] Sync my-other-scripts.md from 007revad.github.io
---
my-other-scripts.md | 3 +++
1 file changed, 3 insertions(+)
diff --git a/my-other-scripts.md b/my-other-scripts.md
index 378d5a0..ca101ab 100644
--- a/my-other-scripts.md
+++ b/my-other-scripts.md
@@ -126,6 +126,9 @@ ### Synology recovery
### Other Synology scripts and packages
+- **Check_UPS_Connected**
- Script to email you the USP status. Also works for Synology NAS that are UPS clients.
From c903d99d6b274f4dae3d3bca7335f0c50997b196 Mon Sep 17 00:00:00 2001
From: Dave Russell <39733752+007revad@users.noreply.github.com>
Date: Mon, 15 Jun 2026 12:31:18 +1000
Subject: [PATCH 38/70] Sync my-other-scripts.md from 007revad.github.io
---
my-other-scripts.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/my-other-scripts.md b/my-other-scripts.md
index ca101ab..7a12c1b 100644
--- a/my-other-scripts.md
+++ b/my-other-scripts.md
@@ -126,10 +126,10 @@ ### Synology recovery
### Other Synology scripts and packages
-- **Synolog fix size units**
- Make DSM show the correct TiB, GiB, MiB and KiB IEC labels instead of TB, GB, MB and KB binary labels.
-- **Check_UPS_Connected**
+- **Check UPS Connected**
- Script to email you the USP status. Also works for Synology NAS that are UPS clients.
- **DSM Notify**
From a263a52aa25f4b7f96b32f049b2e9b746acebed5 Mon Sep 17 00:00:00 2001
From: Dave Russell <39733752+007revad@users.noreply.github.com>
Date: Tue, 16 Jun 2026 17:36:42 +1000
Subject: [PATCH 39/70] Sync my-other-scripts.md from 007revad.github.io
---
my-other-scripts.md | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/my-other-scripts.md b/my-other-scripts.md
index 7a12c1b..760c489 100644
--- a/my-other-scripts.md
+++ b/my-other-scripts.md
@@ -126,7 +126,10 @@ ### Synology recovery
### Other Synology scripts and packages
-- **Synolog fix size units**
+- **Synology_drive_info**
+ - Show drive device id, DSM number, model and serial number for all drives in your Synology NAS.
+
+- **Synology fix size units**
- Make DSM show the correct TiB, GiB, MiB and KiB IEC labels instead of TB, GB, MB and KB binary labels.
- **Check UPS Connected**
From dce582f66550ad2059c37a66307f00216c783745 Mon Sep 17 00:00:00 2001
From: Dave Russell <39733752+007revad@users.noreply.github.com>
Date: Tue, 16 Jun 2026 17:37:19 +1000
Subject: [PATCH 40/70] Sync my-other-scripts.md from 007revad.github.io
---
my-other-scripts.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/my-other-scripts.md b/my-other-scripts.md
index 760c489..6497754 100644
--- a/my-other-scripts.md
+++ b/my-other-scripts.md
@@ -127,7 +127,7 @@ ### Synology recovery
### Other Synology scripts and packages
- **Synology_drive_info**
- - Show drive device id, DSM number, model and serial number for all drives in your Synology NAS.
+ - DSM 7 package to show drive device id, DSM number, model and serial number for all drives in your Synology NAS.
- **Synology fix size units**
- Make DSM show the correct TiB, GiB, MiB and KiB IEC labels instead of TB, GB, MB and KB binary labels.
From 67dde6623d7b7210eec3931394273426ba06516c Mon Sep 17 00:00:00 2001
From: 007revad <39733752+007revad@users.noreply.github.com>
Date: Wed, 17 Jun 2026 04:11:10 +1000
Subject: [PATCH 41/70] v3.6.131
---
CHANGES.txt | 3 +++
syno_hdd_db.sh | 8 ++++----
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/CHANGES.txt b/CHANGES.txt
index a7b544a..0bb3348 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,6 @@
+v3.6.131
+- Fix for DSM 7.4 including "rules" db files in drive db file folder.
+
v3.6.130
- Bug fix for Samsung SSDs that have 2.5" in their model name.
- Bug fix for not removing leading spaces in drive model names (introduced in v3.6.123).
diff --git a/syno_hdd_db.sh b/syno_hdd_db.sh
index 3d88a7b..5b9e783 100644
--- a/syno_hdd_db.sh
+++ b/syno_hdd_db.sh
@@ -29,7 +29,7 @@
# /var/packages/StorageManager/target/ui/storage_panel.js
-scriptver="v3.6.130"
+scriptver="v3.6.131"
script=Synology_HDD_db
repo="007revad/Synology_HDD_db"
scriptname=syno_hdd_db
@@ -738,7 +738,7 @@ set_writemostly(){
# Restore changes from backups
if [[ $restore == "yes" ]]; then
- readarray -t dbbakfiles < <(find "$dbpath" -maxdepth 1 \( -name "*.db.new.bak" -o -name "*.db.bak" \) | sort)
+ readarray -t dbbakfiles < <(find "$dbpath" -maxdepth 1 \( -name "*.db.new.bak" -o -name "*.db.bak" \) ! -name "rule_*" | sort)
echo ""
if [[ ${#dbbakfiles[@]} -gt "0" || -f ${synoinfo}.bak ||\
@@ -1362,8 +1362,8 @@ fi
# Check databases and add our drives if needed
# Host db files
-readarray -t db1list < <(find "$dbpath" -maxdepth 1 -name "*_host*.db" | sort)
-readarray -t db2list < <(find "$dbpath" -maxdepth 1 -name "*_host*.db.new" | sort)
+readarray -t db1list < <(find "$dbpath" -maxdepth 1 -name "*_host*.db" ! -name "rule_*" | sort)
+readarray -t db2list < <(find "$dbpath" -maxdepth 1 -name "*_host*.db.new" ! -name "rule_*" | sort)
# Expansion Unit db files
for i in "${eunits[@]}"; do
From 3c6e1847b048706bb84b02875fea0ee27fc9f6b9 Mon Sep 17 00:00:00 2001
From: Dave Russell <39733752+007revad@users.noreply.github.com>
Date: Wed, 17 Jun 2026 04:12:18 +1000
Subject: [PATCH 42/70] Add support for DSM 7.4 in README
Update compatibility information for DSM versions.
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index f7fa3f5..1cc9126 100644
--- a/README.md
+++ b/README.md
@@ -13,7 +13,7 @@ ### Description
Add your SATA or SAS HDDs and SSDs plus SATA and NVMe M.2 drives to your Synology's compatible drive databases, including your Synology M.2 PCIe card and Expansion Unit databases.
-The script works in DSM 7, including DSM 7.1, 7.2 and 7.3, and DSM 6.
+The script works in DSM 7, including DSM 7.1, 7.2, 7.3 and 7.4, and DSM 6.
It also has a restore option to undo all the changes made by the script.
From 801acf39f091ebe48a3dd73539805d68fc5440e2 Mon Sep 17 00:00:00 2001
From: Dave Russell <39733752+007revad@users.noreply.github.com>
Date: Wed, 17 Jun 2026 04:14:49 +1000
Subject: [PATCH 43/70] Correct typo in CHANGES.txt for DSM 7.4 fix
---
CHANGES.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CHANGES.txt b/CHANGES.txt
index 0bb3348..2fab619 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,5 @@
v3.6.131
-- Fix for DSM 7.4 including "rules" db files in drive db file folder.
+- Fix for DSM 7.4 including "rules" db files in the drive db files folder.
v3.6.130
- Bug fix for Samsung SSDs that have 2.5" in their model name.
From 8c143c80f97e5321f014d4b36098570f9f1a14cd Mon Sep 17 00:00:00 2001
From: tkirkland <18052612+tkirkland@users.noreply.github.com>
Date: Fri, 19 Jun 2026 01:19:02 -0400
Subject: [PATCH 44/70] Fix expansion unit database alias selection
---
CHANGES.txt | 8 +-
syno_hdd_db.sh | 55 ++++++++++++--
tests/test_expansion_unit_db_selection.sh | 92 +++++++++++++++++++++++
3 files changed, 149 insertions(+), 6 deletions(-)
create mode 100755 tests/test_expansion_unit_db_selection.sh
diff --git a/CHANGES.txt b/CHANGES.txt
index 2fab619..48ff26b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,10 @@
+Unreleased
+- Bug fix for expansion units that DSM reports with different model names.
+ - Adds aliases from each expansion disk's runtime container, such as mapping
+ RX1217-1 to RX1217 when detection reports RX1217RP.
+ - Uses exact model-family matching so RX1217 does not also edit RX1217RP or
+ RX1217SAS database files.
+
v3.6.131
- Fix for DSM 7.4 including "rules" db files in the drive db files folder.
@@ -470,4 +477,3 @@ v1.0.1
v1.0.0
- Initial release.
-
diff --git a/syno_hdd_db.sh b/syno_hdd_db.sh
index 5b9e783..81a8ca0 100644
--- a/syno_hdd_db.sh
+++ b/syno_hdd_db.sh
@@ -1312,6 +1312,30 @@ if [[ $m2 != "no" ]]; then
fi
+get_eunit_container_aliases(){
+ # DSM can report one expansion unit with different model names.
+ # For example, detection can return RX1217RP while the attached disks'
+ # runtime container is RX1217-1 and DSM reads the rx1217 drive database.
+ local ebox_info="$1"
+ local runtime_root="${2:-/run/synostorage/disks}"
+ local disk
+ local container
+
+ while IFS= read -r disk; do
+ [[ -n $disk ]] || continue
+
+ container=$(cat "$runtime_root/${disk##*/}/container" 2>/dev/null)
+ container=$(printf "%s" "$container" | sed -E 's/-[0-9]+$//')
+
+ if printf "%s\n" "$container" |
+ grep -Eqi '^([FRD]XD?[0-9]{3,4})(rp|ii|sas)?$';
+ then
+ printf "%s\n" "$container"
+ fi
+ done < <(printf "%s\n" "$ebox_info" | awk '/Disk path:/ {print $NF}')
+}
+
+
# Expansion units
ebox_conected=$(synodisk --enum -t ebox)
if [[ $ebox_conected ]]; then
@@ -1334,6 +1358,12 @@ if [[ $ebox_conected ]]; then
file=$(ls $path | tail -n1)
eunitlist=($(grep -Eowi "([FRD]XD?[0-9]{3,4})(rp|ii|sas){0,2}" "$path/$file" | uniq))
fi
+
+ # Include the model name DSM uses for each expansion disk's runtime
+ # container. The existing sort below removes duplicates.
+ while IFS= read -r eunit_alias; do
+ [[ -n $eunit_alias ]] && eunitlist+=("$eunit_alias")
+ done < <(get_eunit_container_aliases "$ebox_conected")
fi
# Sort eunitlist array into new eunits array to remove duplicates
@@ -1365,11 +1395,27 @@ fi
readarray -t db1list < <(find "$dbpath" -maxdepth 1 -name "*_host*.db" ! -name "rule_*" | sort)
readarray -t db2list < <(find "$dbpath" -maxdepth 1 -name "*_host*.db.new" ! -name "rule_*" | sort)
+find_eunit_db_files(){
+ # Match an exact expansion-unit model family while allowing Synology's
+ # "_v7" and space-delimited filename suffixes. Do not let RX1217 also
+ # select RX1217RP or RX1217SAS.
+ local db_dir="$1"
+ local extension="$2"
+ local eunit
+ shift 2
+
+ for eunit in "$@"; do
+ find "$db_dir" -maxdepth 1 -type f \
+ \( -name "${eunit,,}${extension}" \
+ -o -name "${eunit,,}_*${extension}" \
+ -o -name "${eunit,,} *${extension}" \)
+ done | sort -u
+}
+
+
# Expansion Unit db files
-for i in "${eunits[@]}"; do
- readarray -t -O "${#eunitdb1list[@]}" eunitdb1list < <(find "$dbpath" -maxdepth 1 -name "${i,,}*.db" | sort)
- readarray -t -O "${#eunitdb2list[@]}" eunitdb2list < <(find "$dbpath" -maxdepth 1 -name "${i,,}*.db.new" | sort)
-done
+readarray -t eunitdb1list < <(find_eunit_db_files "$dbpath" ".db" "${eunits[@]}")
+readarray -t eunitdb2list < <(find_eunit_db_files "$dbpath" ".db.new" "${eunits[@]}")
# M.2 Card db files
for i in "${!m2cards[@]}"; do
@@ -2734,4 +2780,3 @@ elif [[ $dsm -eq "6" || $rebootmsg == "yes" ]]; then
fi
exit
-
diff --git a/tests/test_expansion_unit_db_selection.sh b/tests/test_expansion_unit_db_selection.sh
new file mode 100755
index 0000000..7a9bdd2
--- /dev/null
+++ b/tests/test_expansion_unit_db_selection.sh
@@ -0,0 +1,92 @@
+#!/usr/bin/env bash
+
+set -euo pipefail
+
+repo_root=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
+script="$repo_root/syno_hdd_db.sh"
+tmpdir=$(mktemp -d)
+trap 'rm -rf "$tmpdir"' EXIT
+
+extract_function() {
+ local function_name="$1"
+ sed -n "/^${function_name}(){/,/^}/p" "$script"
+}
+
+eval "$(extract_function get_eunit_container_aliases)"
+eval "$(extract_function find_eunit_db_files)"
+
+mkdir -p "$tmpdir/runtime/sata13" "$tmpdir/db"
+printf '%s\n' "RX1217-1" > "$tmpdir/runtime/sata13/container"
+
+ebox_info=$(cat <<'EOF'
+************ Disk Info ***************
+>> Disk id: 1
+>> Slot id: -1
+>> Disk path: /dev/sata13
+>> Disk model: ST4000VN006-3CW104
+EOF
+)
+
+mapfile -t runtime_aliases < <(
+ get_eunit_container_aliases "$ebox_info" "$tmpdir/runtime"
+)
+
+if [[ ${runtime_aliases[*]} != "RX1217" ]]; then
+ echo "Expected runtime alias RX1217, got: ${runtime_aliases[*]-}" >&2
+ exit 1
+fi
+
+eunitlist=("RX1217rp" "${runtime_aliases[@]}")
+mapfile -t eunits < <(printf '%s\n' "${eunitlist[@]}" | sort -u)
+
+touch \
+ "$tmpdir/db/rx1217.db" \
+ "$tmpdir/db/rx1217 module_v7.db" \
+ "$tmpdir/db/rx1217_v7.db" \
+ "$tmpdir/db/rx1217rp.db" \
+ "$tmpdir/db/rx1217rp_v7.db" \
+ "$tmpdir/db/rx1217sas_v7.db" \
+ "$tmpdir/db/rx1217.db.new" \
+ "$tmpdir/db/rx1217rp.db.new" \
+ "$tmpdir/db/rx1217sas_v7.db.new"
+
+mapfile -t selected < <(
+ find_eunit_db_files "$tmpdir/db" ".db" "${eunits[@]}" |
+ while IFS= read -r file; do basename "$file"; done |
+ sort
+)
+
+expected=(
+ "rx1217 module_v7.db"
+ "rx1217.db"
+ "rx1217_v7.db"
+ "rx1217rp.db"
+ "rx1217rp_v7.db"
+)
+
+if [[ ${selected[*]} != "${expected[*]}" ]]; then
+ echo "Unexpected expansion-unit database selection" >&2
+ printf 'Expected: %s\n' "${expected[*]}" >&2
+ printf 'Actual: %s\n' "${selected[*]-}" >&2
+ exit 1
+fi
+
+mapfile -t selected_new < <(
+ find_eunit_db_files "$tmpdir/db" ".db.new" "${eunits[@]}" |
+ while IFS= read -r file; do basename "$file"; done |
+ sort
+)
+
+expected_new=(
+ "rx1217.db.new"
+ "rx1217rp.db.new"
+)
+
+if [[ ${selected_new[*]} != "${expected_new[*]}" ]]; then
+ echo "Unexpected expansion-unit .db.new selection" >&2
+ printf 'Expected: %s\n' "${expected_new[*]}" >&2
+ printf 'Actual: %s\n' "${selected_new[*]-}" >&2
+ exit 1
+fi
+
+echo "PASS: runtime aliases select RX1217 and RX1217RP databases without RX1217SAS"
From c2cc51ff47f7ffcddf09430d02dcbb9e9e9ff18e Mon Sep 17 00:00:00 2001
From: Dave Russell <39733752+007revad@users.noreply.github.com>
Date: Sat, 20 Jun 2026 03:53:36 +1000
Subject: [PATCH 45/70] Update image tags in README.md for better formatting
---
README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 1cc9126..ac30533 100644
--- a/README.md
+++ b/README.md
@@ -186,7 +186,7 @@ ### vendor_ids.txt
If DSM doesn't know the brand of your NVMe drives they will show up in Storage Manager as Unknown brand, and Unrecognised firmware version.
-
+
In this case the script will show you the vendor ID and advise you to add it to the syno_hdd_vendor_ids.txt file.
@@ -195,7 +195,7 @@ ### vendor_ids.txt
### Ironwolf Health
Ironwolf Health working with the latest version of Ironwolf Health Monitor.
-
+
From 461f7875ecffd3a565d9af0fb9bb78195f3b54ab Mon Sep 17 00:00:00 2001
From: Dave Russell <39733752+007revad@users.noreply.github.com>
Date: Tue, 23 Jun 2026 13:10:50 +1000
Subject: [PATCH 46/70] Update CHANGES.txt for version 3.6.132
Updated changelog for version 3.6.132 with bug fix details for expansion units and issue reference.
---
CHANGES.txt | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/CHANGES.txt b/CHANGES.txt
index 48ff26b..fd17877 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,9 +1,8 @@
-Unreleased
-- Bug fix for expansion units that DSM reports with different model names.
- - Adds aliases from each expansion disk's runtime container, such as mapping
- RX1217-1 to RX1217 when detection reports RX1217RP.
- - Uses exact model-family matching so RX1217 does not also edit RX1217RP or
- RX1217SAS database files.
+v3.6.132
+- Bug fix for expansion units that DSM reports with different model names. Issue #578
+ - Adds aliases from each expansion disk's runtime container, such as mapping RX1217-1 to RX1217 when detection reports RX1217RP.
+ - Uses exact model-family matching so RX1217 does not also edit RX1217RP or RX1217SAS database files.
+Thanks @aretaon
v3.6.131
- Fix for DSM 7.4 including "rules" db files in the drive db files folder.
From 50a9ec19875e72056e222d0dea19d411d0665bd1 Mon Sep 17 00:00:00 2001
From: 007revad <39733752+007revad@users.noreply.github.com>
Date: Tue, 23 Jun 2026 13:19:19 +1000
Subject: [PATCH 47/70] v3.6.132
---
syno_hdd_db.sh | 4 ++--
tests/test_expansion_unit_db_selection.sh | 0
2 files changed, 2 insertions(+), 2 deletions(-)
mode change 100755 => 100644 tests/test_expansion_unit_db_selection.sh
diff --git a/syno_hdd_db.sh b/syno_hdd_db.sh
index 81a8ca0..1586a6d 100644
--- a/syno_hdd_db.sh
+++ b/syno_hdd_db.sh
@@ -1312,7 +1312,7 @@ if [[ $m2 != "no" ]]; then
fi
-get_eunit_container_aliases(){
+get_eunit_container_aliases(){
# DSM can report one expansion unit with different model names.
# For example, detection can return RX1217RP while the attached disks'
# runtime container is RX1217-1 and DSM reads the rx1217 drive database.
@@ -1395,7 +1395,7 @@ fi
readarray -t db1list < <(find "$dbpath" -maxdepth 1 -name "*_host*.db" ! -name "rule_*" | sort)
readarray -t db2list < <(find "$dbpath" -maxdepth 1 -name "*_host*.db.new" ! -name "rule_*" | sort)
-find_eunit_db_files(){
+find_eunit_db_files(){
# Match an exact expansion-unit model family while allowing Synology's
# "_v7" and space-delimited filename suffixes. Do not let RX1217 also
# select RX1217RP or RX1217SAS.
diff --git a/tests/test_expansion_unit_db_selection.sh b/tests/test_expansion_unit_db_selection.sh
old mode 100755
new mode 100644
From 7ad2f4c6df8dbbd86388a54cc866ad94bd1b503d Mon Sep 17 00:00:00 2001
From: Dave Russell <39733752+007revad@users.noreply.github.com>
Date: Tue, 23 Jun 2026 13:23:37 +1000
Subject: [PATCH 48/70] Update CHANGES.txt for version 3.6.132
---
CHANGES.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CHANGES.txt b/CHANGES.txt
index fd17877..35588a1 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -2,7 +2,7 @@ v3.6.132
- Bug fix for expansion units that DSM reports with different model names. Issue #578
- Adds aliases from each expansion disk's runtime container, such as mapping RX1217-1 to RX1217 when detection reports RX1217RP.
- Uses exact model-family matching so RX1217 does not also edit RX1217RP or RX1217SAS database files.
-Thanks @aretaon
+Thanks @tkirkland
v3.6.131
- Fix for DSM 7.4 including "rules" db files in the drive db files folder.
From df9ec99d61bdfc87824fc87f099e74bc2a4ace20 Mon Sep 17 00:00:00 2001
From: 007revad <39733752+007revad@users.noreply.github.com>
Date: Tue, 23 Jun 2026 13:53:48 +1000
Subject: [PATCH 49/70] v3.6.132
---
CHANGES.txt | 3 +++
syno_hdd_db.sh | 13 +++++++++----
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/CHANGES.txt b/CHANGES.txt
index 35588a1..dcdea35 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -2,6 +2,9 @@ v3.6.132
- Bug fix for expansion units that DSM reports with different model names. Issue #578
- Adds aliases from each expansion disk's runtime container, such as mapping RX1217-1 to RX1217 when detection reports RX1217RP.
- Uses exact model-family matching so RX1217 does not also edit RX1217RP or RX1217SAS database files.
+- Bug fix for trying to backup non-existent file. Issue #578
+- Bug fix for SynoOnlinePack version not found.
+
Thanks @tkirkland
v3.6.131
diff --git a/syno_hdd_db.sh b/syno_hdd_db.sh
index 1586a6d..048895a 100644
--- a/syno_hdd_db.sh
+++ b/syno_hdd_db.sh
@@ -29,7 +29,7 @@
# /var/packages/StorageManager/target/ui/storage_panel.js
-scriptver="v3.6.131"
+scriptver="v3.6.132"
script=Synology_HDD_db
repo="007revad/Synology_HDD_db"
scriptname=syno_hdd_db
@@ -342,9 +342,13 @@ if [[ $dsmversion -gt "72" ]]; then
else
SOPinfo="/var/packages/SynoOnlinePack/INFO"
fi
- SOPpkgver="$(/usr/syno/bin/synogetkeyvalue $SOPinfo version)"
- #echo -e "SynoOnlinePack$v2 version $SOPpkgver\n"
- echo "- SynoOnlinePack$v2 version $SOPpkgver"
+ if [[ -f "$SOPinfo" ]]; then
+ SOPpkgver="$(/usr/syno/bin/synogetkeyvalue $SOPinfo version)"
+ #echo -e "SynoOnlinePack$v2 version $SOPpkgver\n"
+ echo "- SynoOnlinePack$v2 version $SOPpkgver"
+ else
+ echo "- SynoOnlinePack$v2 version not found"
+ fi
#else
# echo ""
fi
@@ -1457,6 +1461,7 @@ getdbtype(){
backupdb(){
# Backup database file if needed
local bakversion newversion fname
+ [[ -z "$1" || ! -f "$1" ]] || return 0 # Don't try to backup non-existent files
if [[ $2 == "long" ]]; then
fname="$1"
else
From c53372ed19833d769ce47d2bac2e8d3fd580811a Mon Sep 17 00:00:00 2001
From: Dave Russell <39733752+007revad@users.noreply.github.com>
Date: Tue, 23 Jun 2026 13:57:45 +1000
Subject: [PATCH 50/70] Fix issue references in CHANGES.txt
---
CHANGES.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/CHANGES.txt b/CHANGES.txt
index dcdea35..6ae17c2 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,8 +1,8 @@
v3.6.132
-- Bug fix for expansion units that DSM reports with different model names. Issue #578
+- Bug fix for expansion units that DSM reports with different model names. Issue #574
- Adds aliases from each expansion disk's runtime container, such as mapping RX1217-1 to RX1217 when detection reports RX1217RP.
- Uses exact model-family matching so RX1217 does not also edit RX1217RP or RX1217SAS database files.
-- Bug fix for trying to backup non-existent file. Issue #578
+- Bug fix for trying to backup non-existent file. Issue #574
- Bug fix for SynoOnlinePack version not found.
Thanks @tkirkland
From f4fda18c2007a5ce42688ae513ab13942e9d3c9a Mon Sep 17 00:00:00 2001
From: Dave Russell <39733752+007revad@users.noreply.github.com>
Date: Tue, 23 Jun 2026 13:59:39 +1000
Subject: [PATCH 51/70] Fix SynoOnlinePack version not found error
Fixes a bug related to SynoOnlinePack version not found.
---
CHANGES.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CHANGES.txt b/CHANGES.txt
index 6ae17c2..e11ed79 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -3,7 +3,7 @@ v3.6.132
- Adds aliases from each expansion disk's runtime container, such as mapping RX1217-1 to RX1217 when detection reports RX1217RP.
- Uses exact model-family matching so RX1217 does not also edit RX1217RP or RX1217SAS database files.
- Bug fix for trying to backup non-existent file. Issue #574
-- Bug fix for SynoOnlinePack version not found.
+- Bug fix for SynoOnlinePack version not found causing an error.
Thanks @tkirkland
From b74ffce94314f324697f7bf7ef0e5a2dbe858295 Mon Sep 17 00:00:00 2001
From: Dave Russell <39733752+007revad@users.noreply.github.com>
Date: Fri, 26 Jun 2026 14:47:13 +1000
Subject: [PATCH 52/70] Sync my-other-scripts.md from 007revad.github.io
---
my-other-scripts.md | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/my-other-scripts.md b/my-other-scripts.md
index 6497754..2fac1a9 100644
--- a/my-other-scripts.md
+++ b/my-other-scripts.md
@@ -28,21 +28,21 @@ ### Speed Testing
- **Synology Ookla Speedtest**
- Synology DSM 7 package to install Ookla Speedtest and run it in a GUI to test your Internet speed.
-- **Synology Libre Speedtest**
- - Synology DSM 7 package to install Libre Speedtest and run it in a GUI to test your LAN speed.
-
- **Synology Open Speedtest**
- Synology DSM 7 package to install OpenSpeedtest and run it in a GUI to test your LAN speed.
+- **Synology Libre Speedtest**
+ - Synology DSM 7 package to install Libre Speedtest and run it in a GUI to test your LAN speed.
+
- **Asustor Ookla Speedtest**
- Asustor ADM 5 package to install Ookla Speedtest and run it in a GUI to test your internet speed.
-- **Asustor LibreSpeed Speedtest**
- - Asustor ADM 5 package to install LibreSpeed Speedtest and run it in a GUI to test your LAN speed.
-
- **Asustor Open Speedtest**
- Asustor ADM 5 package to install OpenSpeedtest and run it in a GUI to test your LAN speed.
+- **Asustor LibreSpeed Speedtest**
+ - Asustor ADM 5 package to install LibreSpeed Speedtest and run it in a GUI to test your LAN speed.
+
[Back to Contents](#contents)
### Plex
@@ -75,6 +75,9 @@ ### Asustor
- **Asustor Open Speedtest**
- Asustor ADM 5 package to install OpenSpeedtest and run it in a GUI to test your LAN speed.
+- **Asustor LibreSpeed Speedtest**
+ - Asustor ADM 5 package to install LibreSpeed Speedtest and run it in a GUI to test your LAN speed.
+
- **Asustor SMART info**
- Show Asustor smart health and attributes. Can also email you when important values change.
@@ -147,6 +150,9 @@ ### Other Synology scripts and packages
- **Synology Open Speedtest**
- Synology DSM 7 package to install OpenSpeedtest and run it in a GUI to test your LAN speed.
+- **Synology Libre Speedtest**
+ - Synology DSM 7 package to install Libre Speedtest and run it in a GUI to test your LAN speed.
+
- **Synology app mover**
- Easily move Synology packages from one volume to another volume.
From 0d0fdf6ff7224f32cb6bb564be7d606be7ca8c07 Mon Sep 17 00:00:00 2001
From: Dave Russell <39733752+007revad@users.noreply.github.com>
Date: Sun, 12 Jul 2026 06:03:33 +1000
Subject: [PATCH 53/70] Sync my-other-scripts.md from 007revad.github.io
---
my-other-scripts.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/my-other-scripts.md b/my-other-scripts.md
index 2fac1a9..d726cb4 100644
--- a/my-other-scripts.md
+++ b/my-other-scripts.md
@@ -130,7 +130,7 @@ ### Synology recovery
### Other Synology scripts and packages
- **Synology_drive_info**
- - DSM 7 package to show drive device id, DSM number, model and serial number for all drives in your Synology NAS.
+ - DSM package to show drive device id, DSM drive number, location, model, serial number, health and S.M.A.R.T. values for all drives in all your Synology NAS.
- **Synology fix size units**
- Make DSM show the correct TiB, GiB, MiB and KiB IEC labels instead of TB, GB, MB and KB binary labels.
From 1131d4adaf94b5eaa8b58b3eb79ef069949ddb53 Mon Sep 17 00:00:00 2001
From: 007revad <39733752+007revad@users.noreply.github.com>
Date: Mon, 20 Jul 2026 14:30:37 +1000
Subject: [PATCH 54/70] v3.6.133
- Bug fix for not updating db files with each drive's firmware version if drives were previously added to the db files without firmware version from an older script version. Issue #598
- Bug fix for restore mode not re-enabling drive database updates in DSM 7.3 and later.
- Bug fix for sometimes not detecting script was running from scheduled task.
- Bug fix for errors showing in all red instead of just ERROR being in red.
---
CHANGES.txt | 6 ++
syno_hdd_db.sh | 215 ++++++++++++++++++++++++++++---------------------
2 files changed, 128 insertions(+), 93 deletions(-)
diff --git a/CHANGES.txt b/CHANGES.txt
index e11ed79..83213e1 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,9 @@
+v3.6.133
+- Bug fix for not updating db files with each drive's firmware version if drives were previously added to the db files without firmware version from an older script version. Issue #598
+- Bug fix for restore mode not re-enabling drive database updates in DSM 7.3 and later.
+- Bug fix for sometimes not detecting script was running from scheduled task.
+- Bug fix for errors showing in all red instead of just ERROR being in red.
+
v3.6.132
- Bug fix for expansion units that DSM reports with different model names. Issue #574
- Adds aliases from each expansion disk's runtime container, such as mapping RX1217-1 to RX1217 when detection reports RX1217RP.
diff --git a/syno_hdd_db.sh b/syno_hdd_db.sh
index 048895a..840a468 100644
--- a/syno_hdd_db.sh
+++ b/syno_hdd_db.sh
@@ -29,7 +29,7 @@
# /var/packages/StorageManager/target/ui/storage_panel.js
-scriptver="v3.6.132"
+scriptver="v3.6.133"
script=Synology_HDD_db
repo="007revad/Synology_HDD_db"
scriptname=syno_hdd_db
@@ -265,7 +265,7 @@ detect_scheduler(){
# Check parent process
local parent
parent=$(ps -p $PPID -o comm=)
- [[ "$parent" =~ (systemd-run|sched|crond) ]] && return 0
+ [[ "$parent" =~ (TaskS|systemd-run|sched|crond) ]] && return 0
return 1
}
@@ -768,6 +768,35 @@ if [[ $restore == "yes" ]]; then
sed -i "/drive_db_test_url=*/d" "$synoinfo"
sed -i "/drive_db_test_url=*/d" /etc/synoinfo.conf
+ # Restore SynoOnlinePack version
+ if [[ $dsmversion -ge "73" ]]; then
+ # Is DSM 7.3 or later
+ if [[ -f /var/packages/SynoOnlinePack_v3/INFO ]]; then
+ SOPinfo="/var/packages/SynoOnlinePack_v3/INFO"
+ elif [[ -f /var/packages/SynoOnlinePack_v2/INFO ]]; then
+ SOPinfo="/var/packages/SynoOnlinePack_v2/INFO"
+ else
+ SOPinfo="/var/packages/SynoOnlinePack/INFO"
+ fi
+ SOPpkgver="$(/usr/syno/bin/synogetkeyvalue $SOPinfo version)"
+
+ # Re-enable drive db updates
+ if [[ ${SOPpkgver:0:4} == "9999" ]]; then
+ # Remove 9999 from version
+ /usr/syno/bin/synosetkeyvalue "$SOPinfo" version "${SOPpkgver:4}"
+
+ # Check if we re-enabled drive db auto updates
+ SOPpkgver2="$(/usr/syno/bin/synogetkeyvalue $SOPinfo version)"
+ if [[ ${SOPpkgver2:0:4} != "9999" ]]; then
+ echo -e "Re-enabled drive db auto updates."
+ else
+ echo -e "${Error}ERROR${Off} Failed to enable drive db auto updates!"
+ fi
+ else
+ echo -e "Drive db auto updates already enabled."
+ fi
+ fi
+
# Restore adapter_cards.conf from backup
# /usr/syno/etc.defaults/adapter_cards.conf
if [[ -f ${adapter_cards}.bak ]]; then
@@ -853,6 +882,7 @@ if [[ $restore == "yes" ]]; then
done
# Update .db files from Synology
+ echo -e "\nUpdating .db files from Synology"
/usr/syno/bin/syno_disk_db_update --update
# Enable SynoMemCheck.service if disabled
@@ -945,7 +975,7 @@ vendor_from_id(){
echo "$vidlist" >&2
fi
else
- echo -e "\n${Error}ERROR{OFF} $vidlist not found!" >&2
+ echo -e "\n${Error}ERROR${OFF} $vidlist not found!" >&2
fi
;;
esac
@@ -1438,14 +1468,16 @@ fi
getdbtype(){
# Detect drive db type
# Synology misspelt compatibility as compatbility
- if grep -q -F '{"disk_compatbility_info":' "$1"; then
- # DSM 7 drive db files start with {"disk_compatbility_info":
+ if jq -e 'has("disk_compatbility_info")' "$1" >/dev/null 2>&1; then
+ # DSM 7 drive db files have a top-level disk_compatbility_info key
dbtype=7
- elif grep -q -F '{"success":1,"list":[' "$1"; then
- # DSM 6 drive db files start with {"success":1,"list":[
+ elif jq -e '.success == 1 and (.list | type == "array")' "$1" >/dev/null 2>&1; then
+ # DSM 6 drive db files have success:1 and a list array
dbtype=6
elif [[ ! $1 =~ .*'.db.new' ]]; then
- if [[ $(stat -c%s "$1") -eq "0" ]]; then
+ # .db.new files are legitimately absent/empty on new installs, so only
+ # warn for .db files
+ if [[ ! -s "$1" ]]; then
echo -e "${Error}ERROR${Off} $(basename -- "${1}") is 0 bytes!" >&2
else
echo -e "${Error}ERROR${Off} Unknown database type $(basename -- "${1}")!" >&2
@@ -1656,51 +1688,62 @@ editcount(){
editdb7(){
- local hdmodel_sed
- hdmodel_sed="${hdmodel//\"/\\\"}" # escape " for sed/JSON
- hdmodel_sed="${hdmodel_sed//\//\\/}" # escape / for sed
-
- if [[ $1 == "append" ]]; then # model not in db file
- if sed -i "s/}}}/}},\"${hdmodel_sed}\":{$fwstrng$default/" "$2"; then # append
- if jq -e --arg hdmodel "$hdmodel" --arg fwrev "$fwrev" \
- '.disk_compatbility_info[$hdmodel] | has($fwrev)' "$2" > /dev/null; then
- echo -e "Added ${Yellow}$hdmodel ($fwrev)${Off} to ${Cyan}$(basename -- "$2")${Off}"
- editcount "$2"
- else
- echo -e "\n${Error}ERROR{Off} Failed to add $hdmodel ($fwrev) to $(basename -- "$2")${Off}"
- fi
- else
- echo -e "\n${Error}ERROR 6a${Off} Failed to add $hdmodel ($fwrev) to $(basename -- "$2")${Off}"
- #exit 6
- fi
+ # $1 is the db file
+ local dbfile="$1" tmpfile existed
+
+ tmpfile="$(mktemp "${dbfile}.XXXXXX")" || {
+ echo -e "\n${Error}ERROR${Off} Failed to create tmp file for $(basename -- "$dbfile")"
+ return 1
+ }
+
+ # Was the model already in the db? Determines "Added" vs "Updated" wording
+ # and whether we also need to write the "default" block.
+ if jq -c -e --arg model "$hdmodel" '.disk_compatbility_info[$model]' "$dbfile" >/dev/null; then
+ existed=yes
+ fi
- elif [[ $1 == "insert" ]]; then # model and default exists
- if sed -i "s/\"${hdmodel_sed}\":{/\"${hdmodel_sed}\":{$fwstrng/" "$2"; then # insert firmware
- if jq -e --arg hdmodel "$hdmodel" --arg fwrev "$fwrev" \
- '.disk_compatbility_info[$hdmodel] | has($fwrev)' "$2" > /dev/null; then
- echo -e "Updated ${Yellow}$hdmodel ($fwrev)${Off} in ${Cyan}$(basename -- "$2")${Off}"
- #editcount "$2"
- else
- echo -e "\n${Error}ERROR{Off} Failed to update $hdmodel for ($fwrev) in $(basename -- "$2")"
- fi
+ if jq -c --arg model "$hdmodel" --arg fw "$fwrev" --argjson fwbn 1 --argjson size_gb "$size_gb" '
+ def interval:
+ {
+ compatibility: "support",
+ not_yet_rolling_status: "support",
+ fw_dsm_update_status_notify: false,
+ barebone_installable: true,
+ barebone_installable_v2: "auto",
+ smart_test_ignore: false,
+ smart_attr_ignore: false
+ };
+ if (.disk_compatbility_info[$model] == null) then
+ .disk_compatbility_info[$model] = {
+ ($fw): { fw_buildnumber: $fwbn, compatibility_interval: [interval] },
+ default: { size_gb: $size_gb, compatibility_interval: [interval] }
+ }
else
- echo -e "\n${Error}ERROR 6b${Off} Failed to update $hdmodel for ($fwrev) in $(basename -- "$2")"
- #exit 6
- fi
-
- elif [[ $1 == "empty" ]]; then # db file only contains {}
- if sed -i "s/{}/{\"${hdmodel_sed}\":{$fwstrng${default}/" "$2"; then # empty
- if jq -e --arg hdmodel "$hdmodel" --arg fwrev "$fwrev" \
- '.disk_compatbility_info[$hdmodel] | has($fwrev)' "$2" > /dev/null; then
- echo -e "Added ${Yellow}$hdmodel ($fwrev)${Off} to ${Cyan}$(basename -- "$2")${Off}"
- editcount "$2"
+ .disk_compatbility_info[$model][$fw] = { fw_buildnumber: $fwbn, compatibility_interval: [interval] }
+ end
+ ' "$dbfile" > "$tmpfile"; then
+
+ if jq -c -e --arg hdmodel "$hdmodel" --arg fwrev "$fwrev" \
+ '.disk_compatbility_info[$hdmodel] | has($fwrev)' "$tmpfile" > /dev/null; then
+ if mv "$tmpfile" "$dbfile"; then
+ chmod 644 "$dbfile"
+ if [[ $existed == "yes" ]]; then
+ echo -e "Updated ${Yellow}$hdmodel ($fwrev)${Off} in ${Cyan}$(basename -- "$dbfile")${Off}"
+ else
+ echo -e "Added ${Yellow}$hdmodel ($fwrev)${Off} to ${Cyan}$(basename -- "$dbfile")${Off}"
+ editcount "$dbfile"
+ fi
else
- echo -e "\n${Error}ERROR{Off} Failed to add $hdmodel ($fwrev) to $(basename -- "$2")"
+ echo -e "\n${Error}ERROR${Off} Failed to save $(basename -- "$dbfile")"
+ rm -f "$tmpfile"
fi
else
- echo -e "\n${Error}ERROR 6c${Off} Failed to add $hdmodel ($fwrev) to $(basename -- "$2")"
- #exit 6
+ echo -e "\n${Error}ERROR${Off} Failed to add $hdmodel ($fwrev) to $(basename -- "$dbfile")"
+ rm -f "$tmpfile"
fi
+ else
+ echo -e "\n${Error}ERROR${Off} jq failed editing $(basename -- "$dbfile")"
+ rm -f "$tmpfile"
fi
}
@@ -1710,59 +1753,26 @@ updatedb(){
fwrev=$(printf "%s" "$1" | cut -d"," -f 2)
size_gb=$(printf "%s" "$1" | cut -d"," -f 3)
- #echo arg1 "$1" >&2 # debug
- #echo arg2 "$2" >&2 # debug
- #echo hdmodel "$hdmodel" >&2 # debug
- #echo fwrev "$fwrev" >&2 # debug
-
# Check if db file is new or old style
getdbtype "$2"
if [[ $dbtype -gt "6" ]]; then
# db type 7 used from DSM 7.1 and later
- if jq -e --arg hdmodel "$hdmodel" --arg fwrev "$fwrev" \
+ if jq -c -e --arg hdmodel "$hdmodel" --arg fwrev "$fwrev" \
'.disk_compatbility_info[$hdmodel] | has($fwrev)' "$2" > /dev/null; then
- echo -e "${Yellow}$hdmodel ($fwrev)${Off} already exists in ${Cyan}$(basename -- "$2")${Off}" >&2
- else
- #common_string=\"size_gb\":$size_gb,
- #common_string="$common_string"\"compatibility_interval\":[{
- common_string=\"compatibility_interval\":[{
- common_string="$common_string"\"compatibility\":\"support\",
- common_string="$common_string"\"not_yet_rolling_status\":\"support\",
- common_string="$common_string"\"fw_dsm_update_status_notify\":false,
- common_string="$common_string"\"barebone_installable\":true,
- common_string="$common_string"\"barebone_installable_v2\":\"auto\",
- common_string="$common_string"\"smart_test_ignore\":false,
- common_string="$common_string"\"smart_attr_ignore\":false
-
- #fwstrng=\"$fwrev\":{
- fwstrng=\"$fwrev\":{\"fw_buildnumber\":1, # Issue 585. Fix drive temperature for XPE
- fwstrng="$fwstrng$common_string"
- fwstrng="$fwstrng"}]},
-
- #default=\"default\":{
- default=\"default\":{\"size_gb\":$size_gb,
- #default=\"default\":{\"fw_buildnumber\":1,\"size_gb\":$size_gb, # Issue 585. Fix drive temperature for XPE
- default="$default$common_string"
- default="$default"}]}}}
-
- # Synology misspelt compatibility as compatbility
- if grep -q '"disk_compatbility_info":{}' "$2"; then
- # Replace "disk_compatbility_info":{} with
- # "disk_compatbility_info":{"WD40PURX-64GVNY0":{"80.00A80":{ ... }}},"default":{ ... }}}}
- #echo "Edit empty db file:" # debug
- editdb7 "empty" "$2"
-
- elif jq -e --arg hdmodel "$hdmodel" '.disk_compatbility_info[$hdmodel]' "$2" >/dev/null; then
- # Replace "WD40PURX-64GVNY0":{ with "WD40PURX-64GVNY0":{"80.00A80":{ ... }}},
- #echo "Insert firmware version:" # debug
- editdb7 "insert" "$2"
+ # Entry exists. Check it has fw_buildnumber (added by the #585 fix).
+ # Entries written by older script versions may be missing it, which
+ # stops synostgdisk generating compatibility_action for that disk. Issue #598
+ if jq -c -e --arg hdmodel "$hdmodel" --arg fwrev "$fwrev" \
+ '.disk_compatbility_info[$hdmodel][$fwrev] | has("fw_buildnumber") | not' \
+ "$2" > /dev/null; then
+ backfill_fw_buildnumber "$hdmodel" "$fwrev" "$2"
else
- # Add "WD40PURX-64GVNY0":{"80.00A80":{ ... }}},"default":{ ... }}}
- #echo "Append drive and firmware:" # debug
- editdb7 "append" "$2"
+ echo -e "${Yellow}$hdmodel ($fwrev)${Off} already exists in ${Cyan}$(basename -- "$2")${Off}" >&2
fi
+ else
+ editdb7 "$2"
fi
# Edit existing drives in db with compatibility:unverified # Issue #224
@@ -1804,7 +1814,7 @@ updatedb(){
#if sed -i "s/$startstring/$startstring$string/" "$2"; then
#if sed -i "s/${startstring//\//\\/}/${startstring//\//\\/}$string/" "$2"; then
if sed -i "s/$startstring/$startstring${string//\//\\/}/" "$2"; then
- echo -e "Added ${Yellow}$hdmodel$ ($fwrev){Off} to ${Cyan}$(basename -- "$2")${Off}"
+ echo -e "Added ${Yellow}$hdmodel$ ($fwrev)${Off} to ${Cyan}$(basename -- "$2")${Off}"
else
ding
echo -e "\n${Error}ERROR 8${Off} Failed to update $(basename -- "$2")${Off}" >&2
@@ -1815,6 +1825,25 @@ updatedb(){
}
+backfill_fw_buildnumber(){
+ # $1 hdmodel, $2 fwrev, $3 db file
+ local dbfile="$3" tmpfile
+ tmpfile="$(mktemp "${dbfile}.XXXXXX")" || {
+ echo -e "\n${Error}ERROR${Off} Failed to create tmp file for $(basename -- "$dbfile")"
+ return 1
+ }
+ if jq -c --arg model "$1" --arg fw "$2" --argjson fwbn 1 \
+ '.disk_compatbility_info[$model][$fw].fw_buildnumber = $fwbn' \
+ "$dbfile" > "$tmpfile" && mv "$tmpfile" "$dbfile"; then
+ chmod 644 "$dbfile"
+ echo -e "Updated ${Yellow}$1 ($2)${Off} in ${Cyan}$(basename -- "$dbfile")${Off} (added missing fw_buildnumber)"
+ else
+ echo -e "\n${Error}ERROR${Off} Failed to backfill fw_buildnumber for $1 ($2) in $(basename -- "$dbfile")"
+ rm -f "$tmpfile"
+ fi
+}
+
+
# Fix "size_gb": 6001, for 6 TB drives caused by v3.5.104 to v3.6.126
if [[ "${#db1list[@]}" -gt "0" ]]; then
for i in "${!db1list[@]}"; do
@@ -2769,7 +2798,7 @@ if [[ $show_trim_warning == "yes" ]]; then
fi
# Show reboot message or reboot cleanly once if needed
-if [[ $do_reboot == "yes" && $sch_task == "yes" ]];then
+if [[ $do_reboot == "yes" && $sch_task == "yes" ]]; then
# Reboot cleanly after DSM update if needed
previous_build="$(synogetkeyvalue "$reboot_file" dsm_build)"
if [[ $buildnumber -gt "$previous_build" ]]; then
From a3c94956492d03ac46eac72221db3f37f45022f8 Mon Sep 17 00:00:00 2001
From: 007revad <39733752+007revad@users.noreply.github.com>
Date: Mon, 20 Jul 2026 14:37:24 +1000
Subject: [PATCH 55/70] v3.6.133
---
CHANGES.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CHANGES.txt b/CHANGES.txt
index 83213e1..83d29a9 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -2,7 +2,7 @@ v3.6.133
- Bug fix for not updating db files with each drive's firmware version if drives were previously added to the db files without firmware version from an older script version. Issue #598
- Bug fix for restore mode not re-enabling drive database updates in DSM 7.3 and later.
- Bug fix for sometimes not detecting script was running from scheduled task.
-- Bug fix for errors showing in all red instead of just ERROR being in red.
+- Bug fix for some errors showing in all red instead of just ERROR being in red.
v3.6.132
- Bug fix for expansion units that DSM reports with different model names. Issue #574
From a328fb71cf798b7479e04900154868bd4788cdc3 Mon Sep 17 00:00:00 2001
From: 007revad <39733752+007revad@users.noreply.github.com>
Date: Mon, 20 Jul 2026 15:41:32 +1000
Subject: [PATCH 56/70] v3.6.134
---
CHANGES.txt | 5 +++++
syno_hdd_db.sh | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/CHANGES.txt b/CHANGES.txt
index 83d29a9..464a0cc 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,8 @@
+v3.6.134
+- Bug for trying to backup M.2 PCIe card's .db.new when it didn't exist which caused the following error:
+ - **cp: cannot stat '': No such file or directory
+ - ERROR 5 Failed to backup !**
+
v3.6.133
- Bug fix for not updating db files with each drive's firmware version if drives were previously added to the db files without firmware version from an older script version. Issue #598
- Bug fix for restore mode not re-enabling drive database updates in DSM 7.3 and later.
diff --git a/syno_hdd_db.sh b/syno_hdd_db.sh
index 840a468..9a99850 100644
--- a/syno_hdd_db.sh
+++ b/syno_hdd_db.sh
@@ -1493,7 +1493,7 @@ getdbtype(){
backupdb(){
# Backup database file if needed
local bakversion newversion fname
- [[ -z "$1" || ! -f "$1" ]] || return 0 # Don't try to backup non-existent files
+ [[ -z "$1" || ! -f "$1" ]] && return 0 # Don't try to backup non-existent files
if [[ $2 == "long" ]]; then
fname="$1"
else
From 21efba3ae92a14c6f7762244b0cb7189aadd2ab0 Mon Sep 17 00:00:00 2001
From: 007revad <39733752+007revad@users.noreply.github.com>
Date: Mon, 20 Jul 2026 15:44:57 +1000
Subject: [PATCH 57/70] v3.6.134
---
CHANGES.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CHANGES.txt b/CHANGES.txt
index 464a0cc..2e5ea77 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,5 @@
v3.6.134
-- Bug for trying to backup M.2 PCIe card's .db.new when it didn't exist which caused the following error:
+- Bug for trying to backup M.2 PCIe card's .db.new when it didn't exist which caused the following error. Issue #599
- **cp: cannot stat '': No such file or directory
- ERROR 5 Failed to backup !**
From 8e6728c9de795e4e368a4202cc230f4d7c9b6d04 Mon Sep 17 00:00:00 2001
From: 007revad <39733752+007revad@users.noreply.github.com>
Date: Mon, 20 Jul 2026 15:46:47 +1000
Subject: [PATCH 58/70] v3.6.134
---
CHANGES.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CHANGES.txt b/CHANGES.txt
index 2e5ea77..66b5e43 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,5 @@
v3.6.134
-- Bug for trying to backup M.2 PCIe card's .db.new when it didn't exist which caused the following error. Issue #599
+- Bug fix for trying to backup M.2 PCIe card's .db.new when it didn't exist which caused the following error. Issue #599
- **cp: cannot stat '': No such file or directory
- ERROR 5 Failed to backup !**
From 6fba438739cb6db9d08030b4f95ae69caf6c7309 Mon Sep 17 00:00:00 2001
From: 007revad <39733752+007revad@users.noreply.github.com>
Date: Mon, 20 Jul 2026 17:41:40 +1000
Subject: [PATCH 59/70] v3.6.134
---
syno_hdd_db.sh | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/syno_hdd_db.sh b/syno_hdd_db.sh
index 9a99850..2908d0b 100644
--- a/syno_hdd_db.sh
+++ b/syno_hdd_db.sh
@@ -29,7 +29,7 @@
# /var/packages/StorageManager/target/ui/storage_panel.js
-scriptver="v3.6.133"
+scriptver="v3.6.134"
script=Synology_HDD_db
repo="007revad/Synology_HDD_db"
scriptname=syno_hdd_db
@@ -1453,8 +1453,10 @@ readarray -t eunitdb2list < <(find_eunit_db_files "$dbpath" ".db.new" "${eunits[
# M.2 Card db files
for i in "${!m2cards[@]}"; do
- m2carddb1list+=("$(find "$dbpath" -maxdepth 1 -name "*_${m2cards[i],,}*.db")")
- m2carddb2list+=("$(find "$dbpath" -maxdepth 1 -name "*_${m2cards[i],,}*.db.new")")
+ m2card_db1=$(find "$dbpath" -maxdepth 1 -name "*_${m2cards[i],,}*.db")
+ m2card_db2=$(find "$dbpath" -maxdepth 1 -name "*_${m2cards[i],,}*.db.new")
+ [[ -n "$m2card_db1" ]] && m2carddb1list+=("$m2card_db1")
+ [[ -n "$m2card_db2" ]] && m2carddb2list+=("$m2card_db2")
done
@@ -1493,7 +1495,7 @@ getdbtype(){
backupdb(){
# Backup database file if needed
local bakversion newversion fname
- [[ -z "$1" || ! -f "$1" ]] && return 0 # Don't try to backup non-existent files
+ [[ -z "$1" || ! -f "$1" ]] && return 1 # Don't try to backup non-existent files
if [[ $2 == "long" ]]; then
fname="$1"
else
From 371a886ab7b7b1b6167da96244550b0ef74c3c15 Mon Sep 17 00:00:00 2001
From: Dave Russell <39733752+007revad@users.noreply.github.com>
Date: Mon, 27 Jul 2026 17:29:31 +1000
Subject: [PATCH 60/70] Update CHANGES.txt for version 3.6.135
Updated CHANGES.txt to reflect changes in version 3.6.135, including fixes for smart quotes, command paths, and scheduled task detection.
---
CHANGES.txt | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/CHANGES.txt b/CHANGES.txt
index 66b5e43..f43f207 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,8 @@
+v3.6.135
+- Changed to replace curly/smart quotes (from db files edited in Word or in iOS) before backing db files to prevent jq errors.
+- Added `/usr/syno/bin` or `/usr/syno/sbin` to the syno... commmands that were missing the full path (for people with a corrupt or edited PATH). Issue #601
+- Bug fix for not detecting script was running from triggered scheduled task.
+
v3.6.134
- Bug fix for trying to backup M.2 PCIe card's .db.new when it didn't exist which caused the following error. Issue #599
- **cp: cannot stat '': No such file or directory
From b8d066abd6e04db284c5f9e7b4621174491c72b3 Mon Sep 17 00:00:00 2001
From: Dave Russell <39733752+007revad@users.noreply.github.com>
Date: Mon, 27 Jul 2026 17:30:02 +1000
Subject: [PATCH 61/70] Update script version and fix command paths
---
syno_hdd_db.sh | 59 ++++++++++++++++++++++++++++++++++----------------
1 file changed, 40 insertions(+), 19 deletions(-)
diff --git a/syno_hdd_db.sh b/syno_hdd_db.sh
index 2908d0b..2089b95 100644
--- a/syno_hdd_db.sh
+++ b/syno_hdd_db.sh
@@ -29,7 +29,7 @@
# /var/packages/StorageManager/target/ui/storage_panel.js
-scriptver="v3.6.134"
+scriptver="v3.6.135"
script=Synology_HDD_db
repo="007revad/Synology_HDD_db"
scriptname=syno_hdd_db
@@ -258,18 +258,19 @@ if [[ $( whoami ) != "root" ]]; then
exit 1
fi
+
detect_scheduler(){
- # Check if stdin is a terminal (interactive)
- [ ! -t 0 ] && return 0
-
- # Check parent process
- local parent
- parent=$(ps -p $PPID -o comm=)
- [[ "$parent" =~ (TaskS|systemd-run|sched|crond) ]] && return 0
-
+ local pid=$PPID
+ local comm
+ while [[ "$pid" != "1" && -n "$pid" ]]; do
+ comm=$(ps -p "$pid" -o comm=)
+ [[ "$comm" =~ (SYNO.Core.TaskS|SYNO.Core.Event|systemd-run|sched|crond) ]] && return 0
+ pid=$(ps -p "$pid" -o ppid= | tr -d ' ')
+ done
return 1
}
+
# Get DSM major version
dsm=$(/usr/syno/bin/synogetkeyvalue /etc.defaults/VERSION majorversion)
if [[ $dsm -gt "6" ]]; then
@@ -688,7 +689,7 @@ reboot_file="${scriptpath}/syno_hdd_reboot.txt"
if [[ ! -f "$reboot_file" ]]; then
echo "Do NOT delete this file!" > "$reboot_file"
echo "It is used to track if DSM has updated." >> "$reboot_file"
- synosetkeyvalue "$reboot_file" dsm_build "$buildnumber"
+ /usr/syno/bin/synosetkeyvalue "$reboot_file" dsm_build "$buildnumber"
fi
@@ -1062,9 +1063,9 @@ fixdrivemodel(){
get_size_gb(){
# $1 is /sys/block/sata1 or /sys/block/nvme0n1 etc
local disk_size_gb
- #disk_size_gb=$(synodisk --info /dev/"$(basename -- "$1")" 2>/dev/null | grep 'Total capacity' | awk '{print int($4 * 1.073741824)}')
+ #disk_size_gb=$(/usr/syno/bin/synodisk --info /dev/"$(basename -- "$1")" 2>/dev/null | grep 'Total capacity' | awk '{print int($4 * 1.073741824)}')
# Prevent 6 TB drives getting rounded up to 6001 !!!
- disk_size_gb=$(synodisk --info /dev/"$(basename -- "$1")" 2>/dev/null | grep 'Total capacity' | awk '{gb = $4 * 1.073741824; printf "%d\n", int(gb / 4 + 0.5) * 4}')
+ disk_size_gb=$(/usr/syno/bin/synodisk --info /dev/"$(basename -- "$1")" 2>/dev/null | grep 'Total capacity' | awk '{gb = $4 * 1.073741824; printf "%d\n", int(gb / 4 + 0.5) * 4}')
echo "$disk_size_gb"
}
@@ -1371,7 +1372,7 @@ get_eunit_container_aliases(){
# Expansion units
-ebox_conected=$(synodisk --enum -t ebox)
+ebox_conected=$(/usr/syno/bin/synodisk --enum -t ebox)
if [[ $ebox_conected ]]; then
# Only device tree models have syno_slot_mapping
# eSATA and InfiniBand ports both appear in syno_slot_mapping as:
@@ -1379,7 +1380,7 @@ if [[ $ebox_conected ]]; then
# Eunit port 1 - RX1214
if which syno_slot_mapping >/dev/null; then
# syno_slot_mapping does not find SAS eunits
- eunitlist=($(syno_slot_mapping | grep 'Eunit port' | awk '{print $5}'))
+ eunitlist=($(/usr/syno/bin/syno_slot_mapping | grep 'Eunit port' | awk '{print $5}'))
fi
if [[ ${#eunitlist[@]} -eq "0" ]]; then
# Create new /var/log/diskprediction log to ensure newly connected ebox is in latest log
@@ -1492,6 +1493,19 @@ getdbtype(){
}
+sanitize_smart_quotes(){
+ # Fix manually edited db files edited in iOS or Word. Issue #591
+ # Replace curly/smart quotes with straight ASCII quotes
+ # Fixes db files that were hand-edited with an editor/app that
+ # auto-converts straight quotes to curly quotes, breaking the JSON
+ local file="$1"
+ if grep -q $'\xe2\x80\x9c\|\xe2\x80\x9d' "$file" 2>/dev/null; then
+ sed -i $'s/\xe2\x80\x9c/"/g; s/\xe2\x80\x9d/"/g' "$file"
+ echo -e "Fixed smart quotes in ${Cyan}$(basename -- "$file")${Off}" >&2
+ fi
+}
+
+
backupdb(){
# Backup database file if needed
local bakversion newversion fname
@@ -1502,6 +1516,12 @@ backupdb(){
fname=$(basename -- "${1}")
fi
+ # Fix smart quotes before backing up or using the file, so the
+ # backup (and every later jq call) sees clean JSON
+ if [[ "$1" =~ \.db$ || "$1" =~ \.db\.new$ ]]; then
+ sanitize_smart_quotes "$1"
+ fi
+
if [[ ! -f "$1.bak" ]]; then
# No existing backup
if [[ $(basename "$1") == "synoinfo.conf" ]]; then
@@ -1961,7 +1981,7 @@ enable_card(){
# /usr/syno/etc/adapter_cards.conf
/usr/syno/bin/set_section_key_value "$adapter_cards2" "$2" "$modelrplowercase" yes
echo -e "Enabled ${Yellow}$3${Off} for ${Cyan}$modelname${Off}" >&2
- rebootmsg=yes
+ rebootmsg=yes # Show reboot message at end
else
echo -e "${Error}ERROR 9${Off} Failed to enable $3 for ${modelname}!" >&2
fi
@@ -2193,7 +2213,7 @@ edit_modeldtb(){
chmod a+r "$dtb_file"
chown root:root "$dtb_file"
cp -pu "$dtb_file" "$dtb2_file" # Copy dtb file to /etc
- rebootmsg=yes
+ rebootmsg=yes # Show reboot message at end
else
echo -e "${Error}ERROR${Off} Missing /usr/sbin/dtc or not executable!" >&2
fi
@@ -2799,15 +2819,16 @@ if [[ $show_trim_warning == "yes" ]]; then
echo "https://tinyurl.com/ssd-trim"
fi
+
# Show reboot message or reboot cleanly once if needed
if [[ $do_reboot == "yes" && $sch_task == "yes" ]]; then
# Reboot cleanly after DSM update if needed
- previous_build="$(synogetkeyvalue "$reboot_file" dsm_build)"
+ previous_build="$(/usr/syno/bin/synogetkeyvalue "$reboot_file" dsm_build)"
if [[ $buildnumber -gt "$previous_build" ]]; then
- synosetkeyvalue "$reboot_file" dsm_build "$buildnumber" # Update buildnumber
+ /usr/syno/bin/synosetkeyvalue "$reboot_file" dsm_build "$buildnumber" # Update buildnumber
echo -e "\nDSM has updated from build $previous_build to $buildnumber"
echo "Rebooting..."
- synoshutdown --reboot # Reboot cleanly
+ /usr/syno/sbin/synoshutdown --reboot # Reboot cleanly
exit
fi
elif [[ $dsm -eq "6" || $rebootmsg == "yes" ]]; then
From d94ca3769314127ee2fd719ad1562f4d2b2ab3c6 Mon Sep 17 00:00:00 2001
From: Dave Russell <39733752+007revad@users.noreply.github.com>
Date: Mon, 27 Jul 2026 17:37:09 +1000
Subject: [PATCH 62/70] Update CHANGES.txt for versions 3.6.135 and 3.6.134
Added details about changes made in version 3.6.135 and 3.6.134, including fixes for jq errors and scheduled task detection.
---
CHANGES.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/CHANGES.txt b/CHANGES.txt
index f43f207..4857649 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,6 +1,7 @@
v3.6.135
- Changed to replace curly/smart quotes (from db files edited in Word or in iOS) before backing db files to prevent jq errors.
- Added `/usr/syno/bin` or `/usr/syno/sbin` to the syno... commmands that were missing the full path (for people with a corrupt or edited PATH). Issue #601
+ - The change above also fixes js errors caused by those commmands not returning anything. Issue #601
- Bug fix for not detecting script was running from triggered scheduled task.
v3.6.134
From aa5f164a49607b2d068a5389c72554520550a5fa Mon Sep 17 00:00:00 2001
From: Dave Russell <39733752+007revad@users.noreply.github.com>
Date: Wed, 29 Jul 2026 08:23:46 +1000
Subject: [PATCH 63/70] Sync my-other-scripts.md from 007revad.github.io
---
my-other-scripts.md | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/my-other-scripts.md b/my-other-scripts.md
index d726cb4..e410754 100644
--- a/my-other-scripts.md
+++ b/my-other-scripts.md
@@ -129,8 +129,11 @@ ### Synology recovery
### Other Synology scripts and packages
-- **Synology_drive_info**
- - DSM package to show drive device id, DSM drive number, location, model, serial number, health and S.M.A.R.T. values for all drives in all your Synology NAS.
+- **Synology Dive Info**
+ - Synology package to show drive device id, DSM drive number, location, model, serial number, health and S.M.A.R.T. values for all drives in all your Synology NAS.
+
+- **Syno Package Source Manager**
+ - Synology package that allows you to disable and enable community package sources you have added to Package Center. It also allows adding known, working, package sources without having to type and paste anything in Package Center's settings.
- **Synology fix size units**
- Make DSM show the correct TiB, GiB, MiB and KiB IEC labels instead of TB, GB, MB and KB binary labels.
From 73e715913ae31baf87ebc0ebc0541bdb232ca68e Mon Sep 17 00:00:00 2001
From: Dave Russell <39733752+007revad@users.noreply.github.com>
Date: Thu, 30 Jul 2026 13:03:07 +1000
Subject: [PATCH 64/70] Update CHANGES.txt for version 3.6.136
Added messages for write mostly options and NVMe drive usage. Updated changelog for version 3.6.136.
---
CHANGES.txt | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/CHANGES.txt b/CHANGES.txt
index 4857649..45a3870 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,7 +1,12 @@
+v3.6.136
+- Added messages when write mostly options were used but write mostly cannot be set. Issue #602
+ - Message for when the `-S` option is used and there are no internal 2.5 inch SDDs found.
+ - Message for when the user used `-ssd=nvmeNnN` as NVMe drives do not contain DSM system or swap partitions.
+
v3.6.135
-- Changed to replace curly/smart quotes (from db files edited in Word or in iOS) before backing db files to prevent jq errors.
+- Changed to replace curly/smart quotes (from db files edited in Word or in iOS) before backing up db files to prevent jq errors.
- Added `/usr/syno/bin` or `/usr/syno/sbin` to the syno... commmands that were missing the full path (for people with a corrupt or edited PATH). Issue #601
- - The change above also fixes js errors caused by those commmands not returning anything. Issue #601
+ - The change above also fixes jq errors caused by those commmands not returning anything. Issue #601
- Bug fix for not detecting script was running from triggered scheduled task.
v3.6.134
From 05a0fa3215a190fc9fad8648fb9e92c1b4be496f Mon Sep 17 00:00:00 2001
From: Dave Russell <39733752+007revad@users.noreply.github.com>
Date: Thu, 30 Jul 2026 13:07:29 +1000
Subject: [PATCH 65/70] v3.6.136
---
syno_hdd_db.sh | 39 ++++++++++++++++++++++++++++++---------
1 file changed, 30 insertions(+), 9 deletions(-)
diff --git a/syno_hdd_db.sh b/syno_hdd_db.sh
index 2089b95..9b6eef1 100644
--- a/syno_hdd_db.sh
+++ b/syno_hdd_db.sh
@@ -29,7 +29,7 @@
# /var/packages/StorageManager/target/ui/storage_panel.js
-scriptver="v3.6.135"
+scriptver="v3.6.136"
script=Synology_HDD_db
repo="007revad/Synology_HDD_db"
scriptname=syno_hdd_db
@@ -260,11 +260,13 @@ fi
detect_scheduler(){
+ # SYNO.Core.TaskS is regular scheduled task
+ # SYNO.Core.Event is triggered scheduled task
local pid=$PPID
local comm
while [[ "$pid" != "1" && -n "$pid" ]]; do
comm=$(ps -p "$pid" -o comm=)
- [[ "$comm" =~ (SYNO.Core.TaskS|SYNO.Core.Event|systemd-run|sched|crond) ]] && return 0
+ [[ "$comm" =~ (SYNO.Core.TaskS|SYNO.Core.Event|crond) ]] && return 0
pid=$(ps -p "$pid" -o ppid= | tr -d ' ')
done
return 1
@@ -358,12 +360,12 @@ fi
if [[ -f "/var/lib/disk-compatibility/${model}_host_v7.version" ]]; then
echo -n "- ${model}_host_v7 version "
cat "/var/lib/disk-compatibility/${model}_host_v7.version"
- echo -e "\n"
+ #echo -e "\n"
fi
if [[ -f "/var/lib/disk-compatibility/${model}_host.version" ]]; then
echo -n "- ${model}_host version "
cat "/var/lib/disk-compatibility/${model}_host.version"
- echo -e "\n"
+ #echo -e "\n"
fi
@@ -375,6 +377,19 @@ fi
#echo "" # To keep output readable
+# Check if script is running in an interactive shell or from schedule
+if [[ -t 1 ]]; then # Running in terminal
+ echo -e "- Running in an interactive shell (user terminal).\n"
+else
+ # Check if running via task scheduler
+ if detect_scheduler; then
+ sch_task="yes"
+ color="no"
+ fi
+ echo -e "- Running from a scheduled task.\n"
+fi
+
+
# shellcheck disable=SC2317 # Don't warn about unreachable commands in this function
pause(){
# When debugging insert pause command where needed
@@ -2272,11 +2287,15 @@ if [[ $ssd == "yes" ]]; then
elif [[ ${#ssds_writemostly[@]} -gt "0" ]]; then
# User specified their fast drive(s)
echo -e "\nSetting slow internal HDDs state to write_mostly"
- for idrive in "${internal_drives[@]}"; do
- if [[ ! ${ssds_writemostly[*]} =~ $idrive ]]; then
- set_writemostly writemostly "$idrive"
- fi
- done
+ if [[ ${ssds_writemostly[*]} =~ "nvme" ]]; then
+ echo "NVMe drives don't have DSM system or swap partitions"
+ else
+ for idrive in "${internal_drives[@]}"; do
+ if [[ ! ${ssds_writemostly[*]} =~ $idrive ]]; then
+ set_writemostly writemostly "$idrive"
+ fi
+ done
+ fi
else
# Get list of internal HDDs and qty of SSDs
@@ -2301,6 +2320,8 @@ if [[ $ssd == "yes" ]]; then
for idrive in "${internal_hdds[@]}"; do
set_writemostly writemostly "$idrive"
done
+ else
+ echo -e "\nNo internal 2.5 inch SSDs found so not setting write mostly on the HDDs"
fi
fi
fi
From 64aded0da86b6e5c3f1e2a3f4cf74875e84d1783 Mon Sep 17 00:00:00 2001
From: Dave Russell <39733752+007revad@users.noreply.github.com>
Date: Sun, 2 Aug 2026 13:18:49 +1000
Subject: [PATCH 66/70] Sync my-other-scripts.md from 007revad.github.io
---
my-other-scripts.md | 3 +++
1 file changed, 3 insertions(+)
diff --git a/my-other-scripts.md b/my-other-scripts.md
index e410754..8d264b2 100644
--- a/my-other-scripts.md
+++ b/my-other-scripts.md
@@ -135,6 +135,9 @@ ### Other Synology scripts and packages
- **Syno Package Source Manager**
- Synology package that allows you to disable and enable community package sources you have added to Package Center. It also allows adding known, working, package sources without having to type and paste anything in Package Center's settings.
+- **Syno CPU Temperature**
+ - Synology package to log CPU temperature to help troubleshooting Synology randomly shutting down due to overheating.
+
- **Synology fix size units**
- Make DSM show the correct TiB, GiB, MiB and KiB IEC labels instead of TB, GB, MB and KB binary labels.
From 1f539491892f0a47788fa5016df0022033838a10 Mon Sep 17 00:00:00 2001
From: Dave Russell <39733752+007revad@users.noreply.github.com>
Date: Mon, 3 Aug 2026 11:56:45 +1000
Subject: [PATCH 67/70] Update script version and M.2 card database file search
v3.6.137
- Bug fix for the wrong E10M20-T1, M2D20, M2D18 and M2D17 db files getting processed if the main drives were migrated from a different Synology model.
---
syno_hdd_db.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/syno_hdd_db.sh b/syno_hdd_db.sh
index 9b6eef1..427a7cd 100644
--- a/syno_hdd_db.sh
+++ b/syno_hdd_db.sh
@@ -29,7 +29,7 @@
# /var/packages/StorageManager/target/ui/storage_panel.js
-scriptver="v3.6.136"
+scriptver="v3.6.137"
script=Synology_HDD_db
repo="007revad/Synology_HDD_db"
scriptname=syno_hdd_db
@@ -1469,8 +1469,8 @@ readarray -t eunitdb2list < <(find_eunit_db_files "$dbpath" ".db.new" "${eunits[
# M.2 Card db files
for i in "${!m2cards[@]}"; do
- m2card_db1=$(find "$dbpath" -maxdepth 1 -name "*_${m2cards[i],,}*.db")
- m2card_db2=$(find "$dbpath" -maxdepth 1 -name "*_${m2cards[i],,}*.db.new")
+ m2card_db1=$(find "$dbpath" -maxdepth 1 -name "${model}_${m2cards[i],,}*.db")
+ m2card_db2=$(find "$dbpath" -maxdepth 1 -name "${model}_${m2cards[i],,}*.db.new")
[[ -n "$m2card_db1" ]] && m2carddb1list+=("$m2card_db1")
[[ -n "$m2card_db2" ]] && m2carddb2list+=("$m2card_db2")
done
From 226d444d316fb552e9369080c6029f187b532b1f Mon Sep 17 00:00:00 2001
From: Dave Russell <39733752+007revad@users.noreply.github.com>
Date: Mon, 3 Aug 2026 11:57:11 +1000
Subject: [PATCH 68/70] Fix db file processing bug for migrated Synology models
Fixed issue with incorrect db files being processed after migration from different Synology model.
---
CHANGES.txt | 3 +++
1 file changed, 3 insertions(+)
diff --git a/CHANGES.txt b/CHANGES.txt
index 45a3870..915ce5a 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,6 @@
+v3.6.137
+- Bug fix for the wrong E10M20-T1, M2D20, M2D18 and M2D17 db files getting processed if the main drives were migrated from a different Synology model.
+
v3.6.136
- Added messages when write mostly options were used but write mostly cannot be set. Issue #602
- Message for when the `-S` option is used and there are no internal 2.5 inch SDDs found.
From 3618a2d9356165ccea91034866daa20a434282aa Mon Sep 17 00:00:00 2001
From: Dave Russell <39733752+007revad@users.noreply.github.com>
Date: Mon, 3 Aug 2026 12:43:09 +1000
Subject: [PATCH 69/70] Update CHANGES.txt with new bug fix details
Added note about NVMe drives showing as Unverified due to bug fix.
---
CHANGES.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/CHANGES.txt b/CHANGES.txt
index 915ce5a..579812b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,6 @@
v3.6.137
- Bug fix for the wrong E10M20-T1, M2D20, M2D18 and M2D17 db files getting processed if the main drives were migrated from a different Synology model.
+ - Resulted in NVMe drives in one of the above PCIe cards still showing as Unverified.
v3.6.136
- Added messages when write mostly options were used but write mostly cannot be set. Issue #602
From ea471b9b4073a0479b099f0c60f4e58508b898e6 Mon Sep 17 00:00:00 2001
From: Dave Russell <39733752+007revad@users.noreply.github.com>
Date: Mon, 3 Aug 2026 12:46:36 +1000
Subject: [PATCH 70/70] Update CHANGES.txt