mirror of
https://github.com/007revad/Synology_HDD_db.git
synced 2026-04-25 13:45:59 +03:00
[GH-ISSUE #23] ERROR No drives found! #516
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Synology_HDD_db#516
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @stevenpDU on GitHub (Mar 22, 2023).
Original GitHub issue: https://github.com/007revad/Synology_HDD_db/issues/23
When running the script, this is my output:
Synology_HDD_db v1.2.17
RS2421rp+ DSM 7.1.1
ERROR No drives found!
I have 11 disks in RAID 6 (Synology £HAT5300-16T) and 1 hot spare (Seagate ST16000NE000-2RW103) in my RS2421rp+
@007revad commented on GitHub (Mar 22, 2023):
I'm not sure what happened there. I suspect maybe your drives firmware version may be in
/sys/block/<drive>/device/firmware_revinstead of/sys/block/<drive>/device/revCan you try the following commands report back what each of them return:
cat /sys/block/sata1/device/modelcat /sys/block/sata1/device/revcat /sys/block/sata1/device/firmware_revIf you don't get anything from 2 or more of those commands let me know what this command returns:
ls -1 /sys/block/sata/deviceIf it returns nothing then try:
ls -1 /sys/block/sda/device@stevenpDU commented on GitHub (Mar 23, 2023):
Hello, my outputs are:
ash-4.4# cat /sys/block/sata1/device/model
HAT5300-16T
ash-4.4# cat /sys/block/sata1/device/rev
1402
ash-4.4# cat /sys/block/sata1/device/firmware_rev
cat: /sys/block/sata1/device/firmware_rev: No such file or directory
ash-4.4# ls -1 /sys/block/sata/device
ls: cannot access '/sys/block/sata/device': No such file or directory
ash-4.4# ls -1 /sys/block/sda/device
ls: cannot access '/sys/block/sda/device': No such file or directory
@007revad commented on GitHub (Mar 23, 2023):
I think I know what happened.
sudo <script>.sh/sysI've added a 30 seconds timeout to "check for new version" section of the code to prevent this happening, since v1.2.20
Can you please try the latest version, v1.2.23, here https://github.com/007revad/Synology_HDD_db
@stevenpDU commented on GitHub (Mar 24, 2023):
Hi, I've tested it again (this time with version 1.2.23) and the timeout you've mentioned isn't the issue.
I'm still getting the same outcome unfortunately.
@stevenpDU commented on GitHub (Mar 24, 2023):
Outcome:

@stevenpDU commented on GitHub (Mar 24, 2023):
@007revad commented on GitHub (Mar 24, 2023):
Can you try running it with sudo i instead of sudo
sudo i /volume1/DCAUD01/_script_synology/syno_hdd_db.sh@stevenpDU commented on GitHub (Mar 24, 2023):
same outcome when running with sudo -i
@007revad commented on GitHub (Mar 24, 2023):
I wonder if they're incorrectly being detected as removable drives which would cause the script to skip them.
Can you run the following command:
sudo cat "/sys/block/sata1/removable"And this command:
sudo for d in /sys/block/*; do hdmodel=$(cat "$1/device/model") && echo "$cardmodel"; done@stevenpDU commented on GitHub (Mar 24, 2023):
First command:
sudo cat "/sys/block/sata1/removable"
1
Second command:
sudo for d in /sys/block/*; do hdmodel=$(cat "$1/device/model") && echo "$cardmodel"; done
-sh: syntax error near unexpected token `do'
@007revad commented on GitHub (Mar 25, 2023):
It's weird that
cat /sys/block/sata1/removablereturned 1 for you. For me it returns 0, and only USB or eSATA drives return 1.For some reason sudo is causing an error in for ... do ... done. Thankfully I can run the command without sudo.
This should list all your drives:
for d in /sys/block/[sh][ad]*; do hdmodel=$(cat "$d/device/model") && echo "$hdmodel" "$d"; doneThis should list if DSM thinks your drives are removable:
for d in /sys/block/[sh][ad]*; do removable=$(cat "$d/removable") && echo "$removable" "$d"; done@007revad commented on GitHub (Mar 25, 2023):
I've released a new version, v1.2.24, to fix your issue.
@Greg-ATG commented on GitHub (Apr 13, 2023):
It appears this issue occurs for any RS2421RP+ (we're running DSM6 and see internal drives with "removable = 1")
@007revad commented on GitHub (Apr 17, 2023):
Thanks @Greg-ATG
I actually have a comment to myself in the script that says "Some DSM 7 RS models return 1 for internal drives!". It sounds like RS models return 1 for internal drives in both DSM 7 and DSM 6.
I added the removable drive check to prevent adding USB drives to the .db files to resolve an issue someone had. I'll find their issue and see if I can solve their issue another way.
@007revad commented on GitHub (Apr 18, 2023):
The latest version of syno_hdd_db no longer checks if "removable = 1". It's using a different method to check if a block device is a USB drive or not.
@Greg-ATG commented on GitHub (Apr 18, 2023):
Can you confirm which version this is fixed on? I'm still seeing "No drives found" on v2.1.37.
Thanks for your work on this!
@007revad commented on GitHub (Apr 18, 2023):
Oops. I forgot to pull the changes from develop to main.
v2.1.38 is there now.
@Greg-ATG commented on GitHub (Apr 18, 2023):
That did it! Our disk is now being detected correctly.