Comments (18)
That did it! Our disk is now being detected correctly.
from synology_hdd_db.
I'm not sure what happened there. I suspect maybe your drives firmware version may be in /sys/block/<drive>/device/firmware_rev
instead of /sys/block/<drive>/device/rev
Can you try the following commands report back what each of them return:
cat /sys/block/sata1/device/model
cat /sys/block/sata1/device/rev
cat /sys/block/sata1/device/firmware_rev
If you don't get anything from 2 or more of those commands let me know what this command returns:
ls -1 /sys/block/sata/device
If it returns nothing then try:
ls -1 /sys/block/sda/device
from synology_hdd_db.
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
from synology_hdd_db.
I think I know what happened.
- You logged in via SSH as an admin or user.
- Ran the script with
sudo <script>.sh
- The "check for new version" section of the code took longer than 5 minutes to get a reply from github.
- sudo expired due to the script being idle for 5 minutes.
- The 'get drives' section of the script failed because you no longer had permission to access
/sys
I'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
from synology_hdd_db.
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.
from synology_hdd_db.
from synology_hdd_db.
from synology_hdd_db.
Can you try running it with sudo i instead of sudo
sudo i /volume1/DCAUD01/_script_synology/syno_hdd_db.sh
from synology_hdd_db.
same outcome when running with sudo -i
from synology_hdd_db.
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
from synology_hdd_db.
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'
from synology_hdd_db.
It's weird that cat /sys/block/sata1/removable
returned 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"; done
This 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
from synology_hdd_db.
I've released a new version, v1.2.24, to fix your issue.
from synology_hdd_db.
It appears this issue occurs for any RS2421RP+ (we're running DSM6 and see internal drives with "removable = 1")
from synology_hdd_db.
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.
from synology_hdd_db.
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.
# $1 is /sys/block/sata1 or sys/block/sda etc
usb=$(grep $(basename -- "$1") /proc/mounts | grep usb | cut -d" " -f1-2)
from synology_hdd_db.
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!
from synology_hdd_db.
Oops. I forgot to pull the changes from develop to main.
v2.1.38 is there now.
from synology_hdd_db.
Related Issues (20)
- Not working for WDC WUH722222ALE6L4 HOT 2
- v1.2.19 hangs HOT 3
- Script trying to update from root dir instead of working directory where file is located HOT 13
- -s/--showedits argument not working HOT 4
- The script doesnt run HOT 1
- Unknown database type HOT 5
- Question about HDD update disabled HOT 9
- Synology DSM 7.1.1-42962 Update 5 compatibility HOT 2
- WD-SN850x NvME SSD's not found? HOT 10
- Nvme detected but no disk HOT 2
- Enhancement Request: Enable changing the file size upper threshold for read cache HOT 1
- SSD Volume Support in older NAS models HOT 2
- double free or corruption (out) HOT 6
- Synology_HDD_db v2.2.42 syntax error when using the script HOT 10
- Very weird behavior after updating to DSM 7.2rc and running the Synology_HDD_db script HOT 35
- Script Command Not Found HOT 5
- ERROR 6a Failed to update ds1821+_host_v7.db HOT 4
- Before the upgrade, I used NVME through SSH to upgrade the storage space. After restarting, it became unusable and the display version was not supported. Can I still recover through this script? Is all the data present after the recovery thanks HOT 2
- Lost access to Storage Manager on DSM 7.2-64561 (DS923+) HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from synology_hdd_db.