From 5a13d38ffae6e4e95c6d5a3436a3c616204073b3 Mon Sep 17 00:00:00 2001 From: Dave Russell <39733752+007revad@users.noreply.github.com> Date: Tue, 31 Dec 2024 20:59:18 +1100 Subject: [PATCH 1/3] Update CHANGES.txt --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index b321e47..fec8574 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,6 @@ +v3.6.110 +- Bug fix for not finding SAS expansion units. Issue #413 + v3.6.109 - Added -I, --ihm option to update IronWolf Health Management to 2.5.1 to support recent model IronWolf and IronWolf Pro drives. - For NAS with x86_64 CPUs only. From 0105a09d859b96e63b137fbad920e8e15eb50627 Mon Sep 17 00:00:00 2001 From: Dave Russell <39733752+007revad@users.noreply.github.com> Date: Tue, 31 Dec 2024 21:00:17 +1100 Subject: [PATCH 2/3] Update syno_hdd_db.sh --- syno_hdd_db.sh | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/syno_hdd_db.sh b/syno_hdd_db.sh index c6203f1..4a39f04 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.109" +scriptver="v3.6.110" script=Synology_HDD_db repo="007revad/Synology_HDD_db" scriptname=syno_hdd_db @@ -1196,22 +1196,27 @@ fi # Expansion units -# eSATA and InfiniBand ports both appear in syno_slot_mapping as: -# Esata port count: 1 -# Eunit port 1 - RX1214 -# Only device tree models have syno_slot_mapping -if which syno_slot_mapping >/dev/null; then - eunitlist=($(syno_slot_mapping | grep 'Eunit port' | awk '{print $5}')) -else - # Create new /var/log/diskprediction log to ensure newly connected ebox is in latest log - # Otherwise the new /var/log/diskprediction log is only created a midnight. - /usr/syno/bin/syno_disk_data_collector record - - # Get list of connected expansion units (aka eunit/ebox) - path="/var/log/diskprediction" - # shellcheck disable=SC2012 - file=$(ls $path | tail -n1) - eunitlist=($(grep -Eowi "([FRD]XD?[0-9]{3,4})(rp|ii|sas){0,2}" "$path/$file" | uniq)) +ebox_conected=$(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: + # Esata port count: 1 + # 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}')) + fi + if [[ ${#eunitlist[@]} -eq "0" ]]; then + # Create new /var/log/diskprediction log to ensure newly connected ebox is in latest log + # Otherwise the new /var/log/diskprediction log is only created a midnight. + /usr/syno/bin/syno_disk_data_collector record + + # Get list of connected expansion units (aka eunit/ebox) + path="/var/log/diskprediction" + # shellcheck disable=SC2012 + file=$(ls $path | tail -n1) + eunitlist=($(grep -Eowi "([FRD]XD?[0-9]{3,4})(rp|ii|sas){0,2}" "$path/$file" | uniq)) + fi fi # Sort eunitlist array into new eunits array to remove duplicates From 53902ccd39b277ed937493bbb443624b3fbc3c49 Mon Sep 17 00:00:00 2001 From: Dave Russell <39733752+007revad@users.noreply.github.com> Date: Tue, 31 Dec 2024 21:14:11 +1100 Subject: [PATCH 3/3] Update syno_hdd_db.sh --- syno_hdd_db.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syno_hdd_db.sh b/syno_hdd_db.sh index 4a39f04..315cbbd 100644 --- a/syno_hdd_db.sh +++ b/syno_hdd_db.sh @@ -2296,7 +2296,7 @@ if [[ $arch == "x86_64" ]]; then branch="main" file_url="https://raw.githubusercontent.com/${repo}/${branch}/bin/dhm_tool" # install_binfile - install_binfile dhm_tool "$file_url" /usr/syno/sbin/dhm_tool "a+x" bin/dhm_tool "$md5hash" + install_binfile dhm_tool "$file_url" /usr/syno/sbin/dhm_tool "755" bin/dhm_tool "$md5hash" # Check dhm_tool updated dhm_version="$(dhm_tool --version | grep "Utility Version" | awk '{print $NF}')"