mirror of
https://github.com/007revad/Synology_HDD_db.git
synced 2026-04-25 13:45:59 +03:00
[GH-ISSUE #12] [Wanted] Someone with an expansion unit to help with detecting the expansion unit model. #10
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#10
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 @007revad on GitHub (Mar 18, 2023).
Original GitHub issue: https://github.com/007revad/Synology_HDD_db/issues/12
As I don't have an expansion unit I'm looking for help working out how to detect if an expansion unit is connected, and what model it is.
In DSM 7 on my DS1821+ the /etc.defaults/synoinfo.conf contains:
support_ew_20="yes"
support_ew_20_eunit="Synology-DX517,Synology-RX418"
And /var.defaults/lib/disk-compatibility/ has the following expansion unit db files:
dx5_v7.db
dx213_v7.db
dx510_v7.db
dx513_v7.db
dx517_v7.db
dx1211_v7.db
dx1215_v7.db
dx1215ii_v7.db
dx1222_v7.db
fx2421_v7.db
rx4_v7.db
rx410_v7.db
rx415_v7.db
rx418_v7.db
rx1211_v7.db
rx1211rp_v7.db
rx1213sas_v7.db
rx1214_v7.db
rx1214rp_v7.db
rx1216sas_v7.db
rx1217_v7.db
rx1217rp_v7.db
rx1217sas_v7.db
rx1222sas_v7.db
rx1223rp_v7.db
rx1224rp_v7.db
rx2417sas_v7.db
rx6022sas_v7.db
rxd1215sas_v7.db
rxd1219sas_v7.db
That's 30 different expansion unit models, even though synoinfo.conf seems to suggest that only 2 of them are supported.
If I run the following command it returns DX517:
sudo cat /sys/firmware/devicetree/base/DX517/nameI've never had a DX517 connected to this Synology, but I did buy it 2nd hand so maybe the previous has a DX517.
@aferende commented on GitHub (Mar 18, 2023):
Hi 007revad,
I'm not a linux expert but I'm ready and happy to collaborate.
I have like you a DS1821+ with 2 DX517 expansion units attached and the 2 full M2 slots with 2 NVME 2 TB (Crucial CT2000P3SSD8)
I confirm that I get the same results as you both for /etc.defaults/synoinfo.conf and /var.defaults/lib/disk-compatibility/ folder content.
This is the list of compatible expansion units:
https://kb.synology.com/en-ro/DSM/tutorial/Which_Synology_DiskStation_RackStation_can_I_use_with_Synology_Expansion_Units
I am attaching my sysinfo.conf file, the command output
synoinfo.conf.txt
sudo lspci -t -vvand some screenshots of my NAS in case it's helpful.
Let me know if you need more specific info.
Andrea.
@dwabraxus commented on GitHub (Mar 18, 2023):
I also have multiple expansion units, this CLI command works to show connected units in my RS3614XS+. Willing to do more testing as needed.
cat /var/log/disk_log.xml | grep -Eow "([RXD]{2}[0-9]{4})" | uniqReturns
RX1217
RX1214
@aferende commented on GitHub (Mar 18, 2023):
File
/var/log/disk_log.xmldoesn't exists on my DS1821+@007revad commented on GitHub (Mar 18, 2023):
My old Synology running DSM 6.2.4 has a /var/log/disk_log.xml but it only has entries from 2015 to 2018 (and they only list drive errors). My new Synology running DSM 7.2 beta does not have a /var/log/disk_log.xml
But there is a /var/log/disk.log (which I think is what @dwabraxus meant). The disk.log seems to get updated at boot and when you hotplug a drive.
Can you try:
cat /var/log/disk.log | grep -Eow "([FRD]XD?[0-9]{3,4})(RP|II|sas){0,2}" | uniqI'd actually like to see the whole line as well:
cat /var/log/disk.log | grep -E "([FRD]XD?[0-9]{3,4})"@aferende commented on GitHub (Mar 18, 2023):
In my NAS both command returns an empty result
@007revad commented on GitHub (Mar 18, 2023):
Can you run the following command as a user which will copy your disk.log file to your home folder.
sudo cp /var/log/disk.log ~Then attach the disk.log file to your reply.
@aferende commented on GitHub (Mar 18, 2023):
Here the file
disk.log
@dwabraxus commented on GitHub (Mar 18, 2023):
I actually have a
disk_log.xmlfile. But it appears like it might be leftover from an older OS, no recent changes.Had to add
.txtto get it to uploaddisk_log.xml.txt
@dwabraxus commented on GitHub (Mar 19, 2023):
I also found the info here:
/var/log/diskpredictionAttaching single disk object for reference
single_disk_object.json.txt
@007revad commented on GitHub (Mar 19, 2023):
Yep. I noticed the last entry in your disk_log.xml file was 2018.
@007revad commented on GitHub (Mar 19, 2023):
Can someone try this:
for f in /var/log/diskprediction/*.json; do grep -Eow "([FRD]XD?[0-9]{3,4})(RP|II|sas){0,2}" "$f" | uniq; doneOn my test files it is returning:
@007revad commented on GitHub (Mar 19, 2023):
I'm curious if the following command includes the expansion unit model:
synodisk --enum -t ebox@dwabraxus commented on GitHub (Mar 19, 2023):
Uniq is only applied to each file, not overall, so I have lots of dupes
@dwabraxus commented on GitHub (Mar 19, 2023):
No expansion info in the below command
@dwabraxus commented on GitHub (Mar 19, 2023):
Updated command here seems to work for me without dupes
@007revad commented on GitHub (Mar 19, 2023):
Thank you. So
synodisk --enum -t eboxjust provides info on the disks in the expansion boxes.@007revad commented on GitHub (Mar 19, 2023):
This looks like the solution as both DSM 6 and DSM 7 have
/var/log/diskprediction/data-yyyy-mm-dd.jsonfiles.ls -lah /var/log/diskprediction | tail -n1 | awk -F " " '{print $NF}' | grep -Eow "([FRD]XD?[0-9]{3,4})(RP|II|sas){0,2}" "$f" | sort -n | uniq
@aferende commented on GitHub (Mar 19, 2023):
In my NAS command result is "no such file or directory" ... but file exists:
Opening most recent json file and searching for my expansion unit I found this:
I attach json file:
data-2023-03-19.json.txt
@007revad commented on GitHub (Mar 19, 2023):
Try these 2 lines, one at a time, in order:
path="/var/log/diskprediction"file=$(ls $path | tail -n1)grep -Eow "([FRD]XD?[0-9]{3,4})(RP|II|sas){0,2}" "$path/$file"You should see:
DX517
DX517
@aferende commented on GitHub (Mar 19, 2023):
Here results:
DX517 DX517 DX517 DX517 DX517 DX517 DX517 DX517 DX517 DX517@007revad commented on GitHub (Mar 19, 2023):
Excellent. I'm using those 3 lines to add the expansion units to an array, which then gets sorted to remove duplicates.
Do you want to test the develop version of the script?
https://github.com/007revad/Synology_HDD_db/blob/develop/syno_hdd_db.sh
@aferende commented on GitHub (Mar 19, 2023):
Here results:
`syno_hdd_db.sh: line 190: rev: command not found
HDD/SSD models found: 3
ST16000NE000-2RW103,EN02
ST16000NM001G-2KK103,SN03
WDC WDS100T1R0A-68A4W0,00WR
M.2 drive models found: 1
CT2000P3SSD8,P9CR30A
Expansion Unit models found: 1
DX517
[41mERROR 3[0m /var/lib/disk-compatibility/_host_v7.db not found!
`
@007revad commented on GitHub (Mar 19, 2023):
That last error was because of the first error (rev: command not found). I just remembered you're using DSM 6.2.4 which doesn't have the rev command.
I've just updated develop version to fix that "rev: command not found" error.
https://github.com/007revad/Synology_HDD_db/blob/develop/syno_hdd_db.sh
@aferende commented on GitHub (Mar 19, 2023):
HI Dave,
I'm using DSM 7.1.1 update 4.
Here script result:
`HDD/SSD models found: 3
ST16000NE000-2RW103,EN02
ST16000NM001G-2KK103,SN03
WDC WDS100T1R0A-68A4W0,00WR
M.2 drive models found: 1
CT2000P3SSD8,P9CR30A
Expansion Unit models found: 1
DX517
[41mERROR 3[0m /var/lib/disk-compatibility/ds920+
ds1821+`
ds920+_host_v7.db not found!
@007revad commented on GitHub (Mar 19, 2023):
So that means the rev command is new in DSM 7.2 beta.
EDIT The rev command on my DS1821+ came with the Community Hub SynoCli packages I have installed.
Did you migrate some of the drive from a DS920+ to a DS1821+?
I've just updated develop version, again, to fix the model detection.
https://github.com/007revad/Synology_HDD_db/blob/develop/syno_hdd_db.sh
@aferende commented on GitHub (Mar 19, 2023):
Yes, before the DS1821+ I had the DS920.
This is the result of the updated script:
@007revad commented on GitHub (Mar 19, 2023):
That's perfect.
@dwabraxus commented on GitHub (Mar 19, 2023):
I also tested on 6.2.4
Works on rs812 with rx410
Works on rs812+ with rx418
Works on rs3614xs with rx1214 and rx1217
Output from rx3614xs
@AndrewTapp commented on GitHub (Mar 19, 2023):
Many thanks for your hard work, much appreciated.
Am new to this, all looks good after running the script, not that I had any issues in the first place, but thought I would post my setup and output from the script for information. Currently running DSM 7.1.1-42962 Update 4.
HDD/SSD models found: 3
WD101KFBX-68R56N0,0A03
WD181KRYZ-01AGBB0,1H01
WD8001FFWX-68J1UN0,0A03
M.2 drive models found: 1
Samsung SSD 980 PRO 2TB,5B2QGXA7
Added WD101KFBX-68R56N0 to ds1821+_host_v7.db
Added WD101KFBX-68R56N0 to ds1821+_host_v7.db.new
Added WD181KRYZ-01AGBB0 to ds1821+_host_v7.db
Added WD181KRYZ-01AGBB0 to ds1821+_host_v7.db.new
Added WD8001FFWX-68J1UN0 to ds1821+_host_v7.db
Added WD8001FFWX-68J1UN0 to ds1821+_host_v7.db.new
Added Samsung SSD 980 PRO 2TB to ds1821+_host_v7.db
Added Samsung SSD 980 PRO 2TB to ds1821+_host_v7.db.new
Backed up synoinfo.conf to synoinfo.conf.bak
Disabled drive db auto updates.
Changes to ds1821+_host_v7.db
},
"WD101KFBX-68R56N0": {
"default": {
"compatibility_interval": [
{
"compatibility": "support",
"not_yet_rolling_status": "support",
"fw_dsm_update_status_notify": false,
"barebone_installable": true
}
]
}
},
"WD181KRYZ-01AGBB0": {
"default": {
"compatibility_interval": [
{
"compatibility": "support",
"not_yet_rolling_status": "support",
"fw_dsm_update_status_notify": false,
"barebone_installable": true
}
]
}
},
"WD8001FFWX-68J1UN0": {
"default": {
"compatibility_interval": [
{
"compatibility": "support",
"not_yet_rolling_status": "support",
"fw_dsm_update_status_notify": false,
"barebone_installable": true
}
]
}
},
"Samsung SSD 980 PRO 2TB": {
"default": {
"compatibility_interval": [
{
"compatibility": "support",
"not_yet_rolling_status": "support",
"fw_dsm_update_status_notify": false,
"barebone_installable": true
}
]
}
}
},
"nas_model": "ds1821+"
}
DSM successfully checked disk compatibility.
@aferende commented on GitHub (Mar 19, 2023):
@007revad what about storage pool creation using M2 slot with 7.2 beta?
Are you able to create it using unsupported NVME drive or we need a new script release?
Ty,
Andrea
@007revad commented on GitHub (Mar 19, 2023):
Using unsupported NVME drives to create a storage pool in DSM 7.2 beta is next on my to do list.