Browse Source

Merge pull request #194 from 007revad/develop

Develop
pull/205/head v3.3.73
Dave Russell 2 years ago
committed by GitHub
parent
commit
5ef78b9a28
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      CHANGES.txt
  2. 14
      README.md
  3. BIN
      images/vendor_ids.png
  4. 24
      syno_hdd_db.sh
  5. 4
      syno_hdd_vendor_ids.txt

3
CHANGES.txt

@ -1,3 +1,6 @@
v3.3.73
- Bug fix for vendor id.
v3.3.72 v3.3.72
- Bug fix for enabling creating storage pools in Storage Manager for M.2 drives in PCIe adaptor cards. - Bug fix for enabling creating storage pools in Storage Manager for M.2 drives in PCIe adaptor cards.
- Bug fix for not copying syno_hdd_db_vendors.txt to script location when script updates itself. - Bug fix for not copying syno_hdd_db_vendors.txt to script location when script updates itself.

14
README.md

@ -98,6 +98,20 @@ ### Running the script via SSH
<p align="leftr"><img src="images/syno_hdd_db.png"></p> <p align="leftr"><img src="images/syno_hdd_db.png"></p>
### vendor_ids.txt
You only need to edit syno_hdd_vendor_ids.txt if the script warns you about a missing vendor id.
If DSM doesn't know the brand of your NVMe drives they will show up in Storage Manager as Unknown brand, and Unrecognised firmware version.
<p align="leftr"><img src="images/unknown.png"></p>
In this case the script will show you the vendor ID and advise you to add it to the syno_hdd_vendor_ids.txt file.
<p align="leftr"><img src="images/vendor_ids.png"></p>
<br>
**Credits** **Credits**
- The idea for this script came from a comment made by Empyrealist on the Synology subreddit. - The idea for this script came from a comment made by Empyrealist on the Synology subreddit.

BIN
images/vendor_ids.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

24
syno_hdd_db.sh

@ -21,8 +21,8 @@
# #
# Added new vendor ids for Apacer, aigo, Lexar and Transcend NVMe drives. # Added new vendor ids for Apacer, aigo, Lexar and Transcend NVMe drives.
# #
# Now includes syno_hdd_vendor.txt so users can add their NVMe drive's vendor id. # Now includes syno_hdd_vendor_ids.txt so users can add their NVMe drive's vendor id.
# - syno_hdd_vendor.txt needs to be in the same folder as syno_hdd_db.sh # - syno_hdd_vendor_ids.txt needs to be in the same folder as syno_hdd_db.sh
# #
# Now warns if script is located on an M.2 volume. # Now warns if script is located on an M.2 volume.
@ -178,7 +178,7 @@ fi
# Check script is running as root # Check script is running as root
if [[ $( whoami ) != "root" ]]; then if [[ $( whoami ) != "root" ]]; then
ding ding
echo -e "${Error}ERROR${Off} This script must be run as root or sudo!" echo -e "${Error}ERROR${Off} This script must be run as sudo or root!"
exit 1 exit 1
fi fi
@ -654,16 +654,16 @@ vendor_from_id(){
0x05dc) vendor=Lexar ;; 0x05dc) vendor=Lexar ;;
0x1d79) vendor=Transcend;; 0x1d79) vendor=Transcend;;
*) *)
# Get vendor from syno_hdd_vendor.txt # Get vendor from syno_hdd_vendor_ids.txt
vidlist="$scriptpath/syno_hdd_vendor.txt" vidlist="$scriptpath/syno_hdd_vendor_ids.txt"
if [[ -r "$vidlist" ]]; then if [[ -r "$vidlist" ]]; then
val=$(synogetkeyvalue "$vidlist" "$1") val=$(synogetkeyvalue "$vidlist" "$1")
if synogetkeyvalue "$vidlist" "$1"; then if [[ -n "$val" ]]; then
vendor="$val" vendor="$val"
else else
echo -e "\n${Yellow}WARNING{OFF} No vendor found for vid $1" >&2 echo -e "\n${Yellow}WARNING${Off} No vendor found for vid $1" >&2
echo -e "You can add your drive's vendor to: " echo -e "You can add ${Cyan}$1${Off} and your drive's vendor to: " >&2
echo "$vidlist" echo "$vidlist" >&2
fi fi
else else
echo -e "\n${Error}ERROR{OFF} $vidlist not found!" >&2 echo -e "\n${Error}ERROR{OFF} $vidlist not found!" >&2
@ -681,9 +681,9 @@ set_vendor(){
synosetkeyvalue "$vidfile" "${vid,,}" "$vendor" synosetkeyvalue "$vidfile" "${vid,,}" "$vendor"
val=$(synogetkeyvalue "$vidfile" "${vid,,}") val=$(synogetkeyvalue "$vidfile" "${vid,,}")
if [[ $val == "${vendor}" ]]; then if [[ $val == "${vendor}" ]]; then
echo "Added $vendor to pci_vendor_ids" >&2 echo -e "\nAdded $vendor to pci_vendor_ids" >&2
else else
echo "Failed to add $vendor to pci_vendor_ids!" >&2 echo -e "\nFailed to add $vendor to pci_vendor_ids!" >&2
fi fi
fi fi
if ! grep "$vid" "$vidfile2" >/dev/null; then if ! grep "$vid" "$vidfile2" >/dev/null; then
@ -1774,7 +1774,7 @@ if [[ $wdda == "no" ]]; then
fi fi
# Enabled creating pool on drives in M.2 adaptor card # Enable creating pool on drives in M.2 adaptor card
if [[ -f "$strgmgr" ]]; then if [[ -f "$strgmgr" ]]; then
# StorageManager package is installed # StorageManager package is installed
if [[ ${#m2cards[@]} -gt "0" ]]; then if [[ ${#m2cards[@]} -gt "0" ]]; then

4
syno_hdd_vendor_ids.txt

@ -1,4 +1,6 @@
# You can add your drive's vendor id and vendor name here # You can add your drive's vendor id and vendor name here.
#
# Only edit this file if the script warns you about a missing vendor id.
0x1dbe="ADATA" 0x1dbe="ADATA"
0x0ed1="aigo" 0x0ed1="aigo"

Loading…
Cancel
Save