From d874f141538a6d1e2f7cd2cb2f1a844e6386e27b Mon Sep 17 00:00:00 2001 From: Dave Russell <39733752+007revad@users.noreply.github.com> Date: Thu, 18 Jul 2024 22:06:12 +1000 Subject: [PATCH] Update syno_hdd_db.sh v3.5.96 - Added option to set writemostly for your internal HDDs so DSM will normally read from your faster internal SSD(s). - It can automatically set DSM to read from your internal SSDs. - Or you can tell the script which internal drive(s) DSM should read from. --- syno_hdd_db.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/syno_hdd_db.sh b/syno_hdd_db.sh index cd9d1ec..beb944d 100644 --- a/syno_hdd_db.sh +++ b/syno_hdd_db.sh @@ -1727,14 +1727,14 @@ set_writemostly(){ if [[ $ssd == "yes" ]]; then # Get array of internal drives - readarray -t internal_drives < <(synodisk --enum -t internal | grep 'Disk path') + readarray -t internal_drives < <(synodisk --enum -t internal | grep 'Disk path' | cut -d"/" -f3) if [[ $ssd_restore == "yes" ]]; then # Restore all internal drives to just in_sync echo -e "\nRestoring internal drive's state:" for idrive in "${internal_drives[@]}"; do #if ! grep -q "write_mostly"; then - set_writemostly -writemostly "$(basename -- "$idrive")" + set_writemostly -writemostly "$idrive" #fi done @@ -1743,7 +1743,7 @@ if [[ $ssd == "yes" ]]; then echo -e "\nSetting slow internal HDDs state to write_mostly:" for idrive in "${internal_drives[@]}"; do if [[ ! ${ssds_writemostly[*]} =~ $idrive ]]; then - set_writemostly writemostly "$(basename -- "$idrive")" + set_writemostly writemostly "$idrive" fi done @@ -1769,7 +1769,7 @@ if [[ $ssd == "yes" ]]; then # There are internal SSDs and HDDs echo -e "\nSetting internal HDDs state to write_mostly:" for idrive in "${internal_hdds[@]}"; do - set_writemostly writemostly "$(basename -- "$idrive")" + set_writemostly writemostly "$idrive" done fi fi