Giter Site home page Giter Site logo

007revad / synology_hdd_db Goto Github PK

View Code? Open in Web Editor NEW
2.0K 39.0 141.0 1.91 MB

Add your HDD, SSD and NVMe drives to your Synology's compatible drive database

License: MIT License

Shell 100.00%
synology synology-disk-station synology-dsm synology-nas diskstation rackstation dsm

synology_hdd_db's Introduction

Synology HDD db

committers.top badge

Description

Add your SATA or SAS HDDs and SSDs plus SATA and NVMe M.2 drives to your Synology's compatible drive databases, including your Synology M.2 PCIe card and Expansion Unit databases.

The script works in DSM 7, including DSM 7.2, and DSM 6.

It also has a restore option to undo all the changes made by the script.

What the script does:

  • Gets the Synology NAS model and DSM version (so it knows which db files to edit).
  • Gets a list of the HDD, SSD, SAS and NVMe drives installed in your Synology NAS.
  • Gets each drive's model number and firmware version.
  • Backs up the database files if there is no backup already.
  • Checks if each drive is already in the Synology's compatible-drive database.
  • Adds any missing drives to the Synology's compatible-drive database.
  • Optionally prevents DSM auto updating the drive database.
  • Optionally disable DSM's "support_disk_compatibility".
  • Optionally disable DSM's "support_memory_compatibility" to prevent non-Synology memory notifications.
  • Optionally edits max supported memory to match the amount of memory installed, if installed memory is greater than the current max memory setting.
    • DSM only uses the max memory setting when calculating the reserved RAM area size for SSD caches.
  • Optionally disables Western Digital Device Analytics (aka WDDA) to prevent DSM showing a warning for WD drives that are 3 years old.
    • DSM 7.2.1 already has WDDA disabled.
  • Enables M2D20, M2D18, M2D17 and E10M20-T1 if present on Synology NAS that don't officially support them.
  • Checks that M.2 volume support is enabled (on models that have M.2 slots or PCIe slots).
  • Enables creating M.2 storage pools and volumes from within Storage Manager (newer models only?).
    • Including M.2 drives in PCIe adaptor cards like M2D20, M2D18, M2D17 and E10M20-T1 for DSM 7.2.1 and above (need to run script after each boot).
  • Makes DSM recheck disk compatibility so rebooting is not needed if you don't have M.2 drives (DSM 7 only).
    • If you have M.2 drives you may need to reboot.
    • Reminds you that you may need to reboot the Synology after running the script.
  • Checks if there is a newer version of this script and offers to download it for you.
    • The new version available messages time out so they don't prevent the script running if it is scheduled to run unattended.

Download the script

  1. Download the latest version Source code (zip) from https://github.com/007revad/Synology_HDD_db/releases
  2. Save the download zip file to a folder on the Synology.
    • Do NOT save the script to a M.2 volume. After a DSM or Storage Manager update the M.2 volume won't be available until after the script has run.
  3. Unzip the zip file.

When to run the script

You would need to re-run the script after a DSM update. If you have DSM set to auto update the best option is to run the script every time the Synology boots, and the best way to do that is to setup a scheduled task to run the the script at boot-up.

Note: After you first run the script you may need to reboot the Synology to see the effect of the changes.

Options when running the script

There are optional flags you can use when running the script:

  -s, --showedits       Show edits made to <model>_host db and db.new file(s)
  -n, --noupdate        Prevent DSM updating the compatible drive databases
  -r, --ram             Disable memory compatibility checking (DSM 7.x only)
                        and sets max memory to the amount of installed memory
  -f, --force           Force DSM to not check drive compatibility
                        Do not use this option unless absolutely needed
  -i, --incompatible    Change incompatible drives to supported
                        Do not use this option unless absolutely needed
  -w, --wdda            Disable WD Device Analytics to prevent DSM showing
                        a false warning for WD drives that are 3 years old
                          DSM 7.2.1 already has WDDA disabled
  -e, --email           Disable colored text in output scheduler emails
      --restore         Undo all changes made by the script
      --autoupdate=AGE  Auto update script (useful when script is scheduled)
                          AGE is how many days old a release must be before
                          auto-updating. AGE must be a number: 0 or greater
  -h, --help            Show this help message
  -v, --version         Show the script version

Notes:

  • The -f or --force option is only needed if for some reason your drives still show as unsupported in storage manager.
    • Only use this option as last resort.
    • Using this option will prevent data deduplication from being available, and prevent firmware updates on Synology brand drives.
  • If you have some Synology drives and want to update their firmware run the script without --noupdate or -n then do the drive database update from Storage Manager and finally run the script again with your preferred options.

Scheduling the script in Synology's Task Scheduler

See How to schedule a script in Synology Task Scheduler

Running the script via SSH

How to enable SSH and login to DSM via SSH

You run the script in a shell with sudo -s or as root.

sudo -s /path-to-script/syno_hdd_db.sh -nr

Note: Replace /path-to-script/ with the actual path to the script on your Synology.

If you run the script with the --showedits flag it will show you the changes it made to the Synology's compatible-drive database. Obviously this is only useful if you run the script in a shell.

sudo -s /path-to-script/syno_hdd_db.sh -nr --showedits

Note: Replace /path-to-script/ with the actual path to the script on your Synology.

Troubleshooting

Issue Cause Solution
/usr/bin/env: ‘bash\r’: No such file or directory File has Mac line endings! Download latest zip file
Cursor sits there doing nothing File has Windows line endings! Download latest zip file
syntax error near unexpected token You downloaded the webpage! Download latest zip file

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.

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.


Credits

  • The idea for this script came from a comment made by Empyrealist on the Synology subreddit.
  • Thanks for the assistance from Alex_of_Chaos on the Synology subreddit.
  • Thanks to dwabraxus and aferende for help detecting connected expansion units.
  • Thanks to bartoque on the Synology subreddit for the tip on making the script download the latest release from GitHub.
  • Thanks to nicolerenee for pointing out the easiest way to enable creating M.2 storage pools and volumes in Storage Manager.

Donators

Thank you to the following PayPal donators, GitHub sponsors and hardware donators

Christian Simon Azzouni
Lee Booy Bünyamin Olgun Hartmut Heinbach Alexander Gundermann
Björn Schöninger Nico Scherer Patrick Hoekstra Alex Joyce
Marcus Ackermann Lorenz Schmid enil-kil Xaver Zöllner
Jan Bublitz Darren O'Connor Charles Young J Davis
Jürg Baiker Joshua Gillispie bizIT Hirschberg Jordan Crawford
Tyler Teal Voluntary Commerce LLC Ez Hosting Alec Wilhere
Reece Lyne Enric Escudé Santana Yunhao Zhang Matthias Gerhardt
Darryl Harper Mikescher Matthias Pfaff cpharada
Neil Tapp zen1605 Kleissner Investments Angel Scandinavia
B Collins Peter jackson Mir Hekmat Andrew Tapp
Peter Weißflog Joseph Skup Dirk Kurfuerst Gareth Locke
Rory de Ruijter Nathan O'Farrell Harry Bos Mark-Philipp Wolfger
Filip Kraus John Pham Alejandro Bribian Rix Daniel Hofer
Bogdan-Stefan Rotariu Kevin Boatswain anschluss-org Yemeth
Patrick Thomas Manuel Marquez Corral Evrard Franck Chad Palmer
侯​永政 CHEN​HAN-YING Eric Wells Massimiliano Pesce
JasonEMartin Gerrit Klussmann Alain Aube Robert Kraut
Charles-Edouard Poisnel Oliver Busch anonymous donors private sponsors

synology_hdd_db's People

Contributors

007revad avatar antons- avatar jikkelsen avatar leonpano2006 avatar martinbjeldbak avatar tkipisalegacycipher avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

synology_hdd_db's Issues

Interesting output after running script

Hi,

I just updated the script and thought i'd run it then noticed something interesting:

Synology_HDD_db v2.2.47
DS1821+ DSM 7.2-64551 RC
Using options:

HDD/SSD models found: 6
ST8000DM0004-1ZC11G,DN01
WD60EFAX-68JH4N1,0A83
WD60EFAX-68SHWN0,0A82
WD60EFRX-68L0BN1,0A82
WD60EFRX-68MYMN1,0A82
WD60EFZX-68B3FN0,0A81

M.2 drive models found: 2
Samsung SSD 970 EVO Plus 1TB,1B2QEXM7
Samsung SSD 970 EVO Plus 1TB,2B2QEXM7

No M.2 cards found

Expansion Unit models found: 1
DX517

Added ST8000DM0004-1ZC11G to ds1821+_host_v7.db
Added ST8000DM0004-1ZC11G to dx517_v7.db
Added WD60EFAX-68JH4N1 to ds1821+_host_v7.db
Added WD60EFAX-68JH4N1 to dx517_v7.db
Added WD60EFAX-68SHWN0 to ds1821+_host_v7.db
Updated WD60EFAX-68SHWN0 to dx517_v7.db
Added WD60EFRX-68L0BN1 to ds1821+_host_v7.db
Updated WD60EFRX-68L0BN1 to dx517_v7.db
Added WD60EFRX-68MYMN1 to ds1821+_host_v7.db
Updated WD60EFRX-68MYMN1 to dx517_v7.db
Updated WD60EFZX-68B3FN0 to ds1821+_host_v7.db
Updated WD60EFZX-68B3FN0 to dx517_v7.db
Added Samsung SSD 970 EVO Plus 1TB to ds1821+_host_v7.db
Updated Samsung SSD 970 EVO Plus 1TB to ds1821+_host_v7.db

Support disk compatibility already enabled.

Support memory compatibility already enabled.

M.2 volume support already enabled.

Drive db auto updates already enabled.

DSM successfully checked disk compatibility.

You may need to reboot the Synology to see the changes.

Note it finds my 2 M.2 cards then says immediately after that there are non found. I'm not sure if this is a problem or not, or just a small bug but thought it was best to report it.

Also, have you implemented the auto-update feature yet? If so, how do I enable it please?

Thanks.

Enhancement Request: Enable changing the file size upper threshold for read cache

Thank you for the excellent work with this script!

I wanted to ask if you know how to increase the size of files that the Synology will put into the read cache?
From what I have read (and I could be wrong), it will only cache files up to 1M? (I'll try to find where I read that)

With a large SSD it would be great if we could specify what the upper limit is for files that would be cached.

Can not enable E10M20-T1 on DS1621+

After execute the sh file, I still can not enable E10M20-T1 on my DS1621+ fully. It can not recognice my nvme ssd, only NIC work.
I've add DS1621+ in /usr/syno/etc.defaults/adapter_cards.conf file, both E10M20-T1_sup_nvme and E10M20-T1_sup_sata, but still not work.
After execute ls /run/synostorage/disks, it shows no nvme drives. ls /sys/block | grep nvme return

nvme0n1
nvme1n1

I think it may because 1621+ only have x4 lanes PCIe while E10M20-T1 has 8. But I think E10M20-T1 may be a plx card so it actucally can work on PCIe x4?

Script trying to update from root dir instead of working directory where file is located

There is a newer version of this script available. Current version: v1.2.19 Latest version: v1.2.20 Do you want to download v1.2.20 now? {y/n] y % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 239k 0 239k 0 0 497k 0 --:--:-- --:--:-- --:--:-- 931k curl: Saved to filename 'Synology_HDD_db-1.2.20.tar.gz' ERROR /root/Synology_HDD_db-1.2.20.tar.gz not found!

Perhaps you can have it download to the directory the script is in instead? Or maybe /tmp?

Not working for rs3621xs+ on DSM 6.2.4-25556

Drives added (and now showing as "already existing"):
WD4002FFWX-68TZ4N0 already exists in rs3621xs+_host.db
WD4002FFWX-68TZ4N0 already exists in rs3621xs+_host.db.new
WD40EFRX-68WT0N0 already exists in rs3621xs+_host.db
WD40EFRX-68WT0N0 already exists in rs3621xs+_host.db.new

Before the reboot., I get notifications on the Synology web interface to say they are unverified (each time you run the script).
After a reboot, they are still showing unverified.

Storage pool on E10M20-T1 on DS1618+ cannot be created

Awsome script. Two remarks:

  1. on my DS1618+ i have a E10M20-T1 card with two samsung 980 pro 2tb nvme. I deleted the cache and ran the script, but synology 7.2-64570 update 1 does not allow me to create a storage pool on the pcie card. Anything I am doing wrong or forgetting?

  2. Since the nvme's are getting bigger, is it possible to partition the nvme's and use one partition on both nvme's as cache and the other partitions on both nvme's as storage pool with raid?

Thanks for the work! Edward

M2D18 not shown in GUI

Hi,

Got a bunch of M2D18 that I've bought for use in 820+ and never used there and now I have added one card in a RS2421+.
fdisk -l shows the drives before using Synology_HDD_db, but even after running the script, the M2 drives are not shown in the GUI.

Am I missing something or this is not the intended behaviour of seeing and been able to use the M2 drives in GUI?

My full log:

Synology_HDD_db v3.0.56
RS2421+ DSM 7.2-64570-1
Using options: -nfr

HDD/SSD models found: 4
HDWF180,GX0B
HUS728T8TALE6L0,V8DERT06
ST8000NM000A-2KE101,SN03
ST8000VN004-2M2101,SC60

M.2 drive models found: 1
Samsung SSD 980 1TB,3B4QFXO7

M.2 PCIe card models found: 1
M2D18

No Expansion Units found

Added HDWF180 to rs2421+_host_v7.db
Added HDWF180 to ds2415+_host_v7.db
Added HDWF180 to ds2415+_host.db
Added HDWF180 to ds2415+_host_v7.db.new
Added HDWF180 to ds2415+_host.db.new
Added HUS728T8TALE6L0 to rs2421+_host_v7.db
Added HUS728T8TALE6L0 to ds2415+_host_v7.db
Added HUS728T8TALE6L0 to ds2415+_host.db
Added HUS728T8TALE6L0 to ds2415+_host_v7.db.new
Added HUS728T8TALE6L0 to ds2415+_host.db.new
Added ST8000NM000A-2KE101 to rs2421+_host_v7.db
Updated ST8000NM000A-2KE101 to ds2415+_host_v7.db
ST8000NM000A-2KE101 already exists in ds2415+_host.db
Updated ST8000NM000A-2KE101 to ds2415+_host_v7.db.new
ST8000NM000A-2KE101 already exists in ds2415+_host.db.new
Added ST8000VN004-2M2101 to rs2421+_host_v7.db
Added ST8000VN004-2M2101 to ds2415+_host_v7.db
Added ST8000VN004-2M2101 to ds2415+_host.db
Added ST8000VN004-2M2101 to ds2415+_host_v7.db.new
Added ST8000VN004-2M2101 to ds2415+_host.db.new
Added Samsung SSD 980 1TB to rs2421+_host_v7.db
Added Samsung SSD 980 1TB to ds2415+_host_v7.db
Added Samsung SSD 980 1TB to ds2415+_host.db
Added Samsung SSD 980 1TB to ds2415+_host_v7.db.new
Added Samsung SSD 980 1TB to ds2415+_host.db.new
Added Samsung SSD 980 1TB to ds2415+_m2d18_v7.db
Added Samsung SSD 980 1TB to rs2421+_m2d18_v7.db


Disabled support disk compatibility.

Disabled support memory compatibility.

Max memory already set to 32 GB.

Enabled M.2 volume support.

Disabled drive db auto updates.

DSM successfully checked disk compatibility.

You may need to reboot the Synology to see the changes.

Added model.dtb for RS2421+

model.dtb.zip

Unrecognized firmware DS1823xs+?

I am probably doing something wrong, since it seems to work for everyone else: I still get the 'unrecognized firmware' on all my drives. Although sometimes that message is gone and everything seems fine; I cant repeat it though.

Here is the output of my script when run manually, the error message seems new:

Screenshot 2023-06-11 at 12 45 35 PM

Here is the config in task scheduler, with options -nr:

Screenshot 2023-06-11 at 12 49 30 PM

Side-note: I also added an old M2D20 to my DS1823xs+, with one M2 drive. The script 1.0.6 indeed finds it and displays the correct M2 disk. Not sure if you can solve this, but would be nice if the NAS would be able to access it. So far it only displays the drives 1-8, 2xM2 build in slots, but not the M2D20 drive under storage manager:

Screenshot 2023-06-11 at 12 49 13 PM

Issue:
Screenshot 2023-06-11 at 1 06 01 PM

WD-SN850x NvME SSD's not found?

Hey all.

I ran the script and the system still cannot see the 2 WD-SN850x NvME drives installed in order to create a cache pool.

Any ideas?

Synology_HDD_db v2.0.35
DS1522+ DSM 7.1.1-42962-4

HDD/SSD models found: 2
ST10000VN0004-1ZD101,SC60
ST14000NM001G-2KJ103,SN03

No M.2 drives found

No M.2 cards found

No Expansion Units found

ST10000VN0004-1ZD101 already exists in ds1522+_host_v7.db
ST10000VN0004-1ZD101 already exists in ds1522+_host_v7.db.new
ST14000NM001G-2KJ103 already exists in ds1522+_host_v7.db
ST14000NM001G-2KJ103 already exists in ds1522+_host_v7.db.new

Disabled support memory compatibility.

Disabled drive db auto updates.

    "ST10000VN0004-1ZD101": {
      "SC60": {
        "compatibility_interval": [
          {
            "compatibility": "support",
            "not_yet_rolling_status": "support",
            "fw_dsm_update_status_notify": false,
            "barebone_installable": true
          }
        ]
      },
      "default": {

    "ST14000NM001G-2KJ103": {
      "SN03": {
        "compatibility_interval": [
          {
            "compatibility": "support",
            "not_yet_rolling_status": "support",
            "fw_dsm_update_status_notify": false,
            "barebone_installable": true
          }
        ]
      },
      "default": {

DSM successfully checked disk compatibility.

image

image

image

Reboot not necessary on db change

The reboot on changing the drive db is not necessary, just execute this and the drive db will be reloaded:

/usr/syno/sbin/synostgdisk --check-all-disks-compatibility

Please reincarnate true read-write SSD cache aka Sequential I/O checkbox when setting up new SSD cache

Hello!

I found you and your HDD-db and other Synology scripts on reddit today and nearly had a stroke I was so excited. I am, like so many others, extremely grateful for your excellent ongoing work on Synology community projects!

My request is DIFFERENT than your existing similar-sounding Cache feature request-57: Enable changing the file size upper threshold for read cache - #57

This unique request/issue is likely "easy" for you with a very large positive impact on the community:

After much experimentation with "unsupported" downgrades of DSM, I've observed the original, true read-write SSD caching code from DSM 6.2.4 is STILL within DSM 7.0.1/7.1.1+. However, the "Sequential I/O" checkbox to enable true read-write SSD cache (write-Back) in DSM 6.2.4 during its creation and setup, has been removed from the GUI in DSM 7.0.1+.

This means you can no longer re-enable by GUI the true read/write write-Back cache aka "Sequential I/O" when setting up the SSD cache, presumably to extend the lifespan of SSD's and/or to kill performance on lower-end units to promote sales of their "enterprise" products.

This ALSO means, if you downgrade a DSM to 6.2.4, I believe someone with your skills can see how the SSD cache parameters is being created (when that optional but hugely important "Sequential I/O" write-Back cache box is checked), to then carry it over to a new script for DSM 7.1+.

Note, I do not care about SSD lifespans or the M.2+SATA SSD cache mix, but I do have limited budgets, and desperately need it to again be as fast as possible at all times. Especially when writing many thousands of files to storage. It used to cache them all in SSD and slowly write over time to the HDD's with low IOPS, which was able to do full 10G Ethernet wire-speed on my DS3617xs, but now it refuses to do so and has absolutely KILLED performance to LESS than HALF.

It is obvious to me, after finding you and your multiple scripts and reddit posts, that if anyone can fix this Synology sabotage of their own lower-end products to re-enable them to once again perform as good as they used to, now I know it is you!

Please see my old post/rant about Synology castrating their SSD caching subsystem for more details:
https://www.synoforum.com/threads/oh-no-dsm-7-1-removed-critical-ssd-nvme-cache-functionality.8899/

I humbly suggest this be a new script/project, as this SSD cache "re-enable" request isn't really in alignment with your amazing HDD-Database script where I am posting this now.

Thanks so much for your kind consideration and all that you do!

Confirmed working on 918 :

DS918+

2. X Samsung NVMe M.2 SSD 970 EVO Plus 500Go
DS918+
Samsung SSD 970 EVO Plus 500Go
DSM 7.1.1-42962 Update 5
Script version : v3.1.60-RC
1 NVMe M.2 for read cache
1 NVMe M.2 for volume

Work perfectly!!!

Very weird behavior after updating to DSM 7.2rc and running the Synology_HDD_db script

On reddit dukdukgoose wrote:

I no longer have access to the Storage Manager app, the Snapshot Replication app, and most of the Hardware tab in control panel (fan speed, beep setting, etc). Also in Control Panel/Info Center "Model name" is listed as "Unknown Model" (instead of DS918+) and "Fan Speed Mode" is blank... probably because most of the hardware features are disabled because it doesn't know what the model is any more.

Any ideas how to resolve this? I tried the --restore switch on the script but that actually made it worse as it caused DSM to stop seeing my M.2 volume... so I ran the script again and volume returned.

The good news is I haven't lost any data, but not having the Storage Manager and hardware features working is a big problem. I could try a level 2 reset of DSM, but I'd rather not if it's not necessary.

Question about HDD update disabled

I have a question about disabling Synology update.
As far as I know, this update also serves to check for any new firmware on the individual HDs.

Attempting manual update fails (after running the script).

So we have to give up forever to any updates?

What do you think about?
Ty

-s/--showedits argument not working

Using the -s argument does not show edits, only runs the script as if it had no command line parameters.

root@DS1:~# /volume1/Data/syno_hdd_db.sh -n -f -r
Synology_HDD_db v1.2.21
DS2415+-j DSM 7.1.1
Using model: ds2415+

HDD/SSD models found: 4
SSD 850 EVO 250GB,EMT0
SSD 860 EVO 1TB,RVT0
ST12000VN0007-2GS116,SC60
ST12000VN0008-2YS101,SC60

No M.2 drives found

No Expansion Units found

SSD 850 EVO 250GB already exists in ds2415+_host_v7.db
SSD 850 EVO 250GB already exists in ds2415+_host_v7.db.new
SSD 860 EVO 1TB already exists in ds2415+_host_v7.db
SSD 860 EVO 1TB already exists in ds2415+_host_v7.db.new
ST12000VN0007-2GS116 already exists in ds2415+_host_v7.db
ST12000VN0007-2GS116 already exists in ds2415+_host_v7.db.new
ST12000VN0008-2YS101 already exists in ds2415+_host_v7.db
ST12000VN0008-2YS101 already exists in ds2415+_host_v7.db.new

DSM successfully checked disk compatibility.
root@DS1:~# /volume1/Data/syno_hdd_db.sh -s
Synology_HDD_db v1.2.21
DS2415+-j DSM 7.1.1
Using model: ds2415+

HDD/SSD models found: 4
SSD 850 EVO 250GB,EMT0
SSD 860 EVO 1TB,RVT0
ST12000VN0007-2GS116,SC60
ST12000VN0008-2YS101,SC60

No M.2 drives found

No Expansion Units found

SSD 850 EVO 250GB already exists in ds2415+_host_v7.db
SSD 850 EVO 250GB already exists in ds2415+_host_v7.db.new
SSD 860 EVO 1TB already exists in ds2415+_host_v7.db
SSD 860 EVO 1TB already exists in ds2415+_host_v7.db.new
ST12000VN0007-2GS116 already exists in ds2415+_host_v7.db
ST12000VN0007-2GS116 already exists in ds2415+_host_v7.db.new
ST12000VN0008-2YS101 already exists in ds2415+_host_v7.db
ST12000VN0008-2YS101 already exists in ds2415+_host_v7.db.new

Re-enabled support disk compatibility.

DSM successfully checked disk compatibility.
root@DS1:~# /volume1/Data/syno_hdd_db.sh --showedits
Synology_HDD_db v1.2.21
DS2415+-j DSM 7.1.1
Using model: ds2415+

HDD/SSD models found: 4
SSD 850 EVO 250GB,EMT0
SSD 860 EVO 1TB,RVT0
ST12000VN0007-2GS116,SC60
ST12000VN0008-2YS101,SC60

No M.2 drives found

No Expansion Units found

SSD 850 EVO 250GB already exists in ds2415+_host_v7.db
SSD 850 EVO 250GB already exists in ds2415+_host_v7.db.new
SSD 860 EVO 1TB already exists in ds2415+_host_v7.db
SSD 860 EVO 1TB already exists in ds2415+_host_v7.db.new
ST12000VN0007-2GS116 already exists in ds2415+_host_v7.db
ST12000VN0007-2GS116 already exists in ds2415+_host_v7.db.new
ST12000VN0008-2YS101 already exists in ds2415+_host_v7.db
ST12000VN0008-2YS101 already exists in ds2415+_host_v7.db.new

Re-enabled support disk compatibility.

DSM successfully checked disk compatibility.
root@DS1:~#

DB not found on DS213+

Hi,

I tested the script (I cut off the writing stuff part) and it errored on the DB file part. I've read another issue and ran some of the commands to collect info.

System: DS213+ with DSM 6.2.4 25556-6

get_key_value /etc/synoinfo.conf unique (also /etc.defaults/synoinfo.conf)
synology_qoriq_213+

cat /proc/cmdline
.... syno_hw_version=DS213pv10 .....

cat /proc/sys/kernel/syno_hw_version
DS213pv10-j

cat /etc.defaults/synoinfo.conf | grep disk_com
support_disk_compatibility="yes"

LOG PART:

/sys/block/sda
Model: 'WD40EFRX-68N32N0'
Firmware: '82.0'
/sys/block/sdb
Model: 'WD40EFRX-68N32N0'
Firmware: '82.0'
/sys/block/sdq
Model: 'STORAGE DEVICE'
Firmware: '9910'
/sys/block/sdr
Model: 'STORAGE DEVICE'
Firmware: '9910'
/sys/block/sdr
add: 'STORAGE DEVICE,9910'
add: 'WD40EFRX-68N32N0,82.0'
HDD/SSD models found: 2
STORAGE DEVICE,9910
WD40EFRX-68N32N0,82.0

No M.2 drives found

/sys/block/sdr
ERROR /var/lib/disk-compatibility/ds213pv10_host.db not found!

In /var/lib/disk-compatibility/ there are two DB files related to DS213+ (among others). They are recently updated because a fresh DSM install and hitting the Update now button for Drive Database in Storage Manager.
The used harddrives are present in the files:

ds213+_host.db = ds213+_host.db.new: {"success":1,"list":[ ....
,{"model":"WD40EFRX-68N32N0","firmware":"82.00A82","default_unverified":0,"rec_intvl":[3]},

ds213+_host_v7.db = ds213+_host_v7.db.new: {"disk_compatbility_info":{ ....
,"WD40EFRX-68N32N0":{"82.00A82":{"compatibility_interval":[{"compatibility":"not_support","not_yet_rolling_status":"not_support","fw_dsm_update_status_notify":false,"barebone_installable":true}]},

I cannot find which of those two files actually is used. I don't know what STORAGE DEVICE is, this is not present in both files.

A long time ago these drives were new and installed with DSM 5.2 (probably). This was migrated to 6.x and now a fresh install.

At this install to my surprise the Storage Manager complained about the disks "Incompatible with Synology NAS: Drive x".
After 'continue' the drives installed and now in the Storage Manager I cannot see any complaints anymore about this.
So I'm wondering if I should put effort in changing the DB file anyway. I also could hack it in manually.

1.1.14 Fails to work on DS3622xs+

I have 2 volumes:
First is a raid 6 pool, synology 18TB drives, no issue.
Second is a Raid 5 set of 3 drives consistensing of 3 x Unknown MZ7LM960HCHP-000V3 00Y), All the Same Firmeare GXT3CB31. It does not say so, but I believe these are a Samsung Drive from a Lenov Server. I have been using them for years with no issues. (Samsung PM863 MZ7LM960HCHP-00003 2.5in SFF).

The script runs fine:

HDD/SSD models found: 2
HAT5310-18T,1401
MZ7LM960HCHP-000V3 00Y,GXT3

HAT5310-18T already exists in ds3622xs+_host_v7.db
Added MZ7LM960HCHP-000V3 00Y to ds3622xs+_host_v7.db

and on second run:

HAT5310-18T already exists in ds3622xs+_host_v7.db
MZ7LM960HCHP-000V3 00Y already exists in ds3622xs+_host_v7.db

I have rebooted after install, but the drive status has not changed, still unverified.

System is a brand new DS3622xs+ running DSM 7.1.1-42962 Update 1.

Hope this helps... and is fixable, as at the moment I can't migrate my old server to this one with an "at risk" volume. THe migration fails.....

thanks,
YB

DS918+ 7.2-64561 problem

Hi there is a problem with dsm7.2release.
I tried v2.0.35 with dsm7.2beta, and the storage pool is recognized normally.
But v2.0.35, v2.2.47, v2.3.48RC with dsm7.2release, does not work.
need help...

console logs:
ash-4.4# ./syno_hdd_db.sh -nr
Synology_HDD_db v2.0.35
DS918+ DSM 7.2-64561

There is a newer version of this script available.
Current version: v2.0.35
Latest version: v2.2.47
Do you want to download v2.2.47 now? [y/n]
y
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- 0:00:05 --:--:-- 0
curl: (28) Resolving timed out after 5000 milliseconds
ERROR Failed to download Synology_HDD_db-2.2.47.tar.gz!
./syno_hdd_db.sh: line 493: /run/synostorage/disks/$(basename -- "$d")/m2_pool_support: No such file or directory

HDD/SSD models found: 1
CT2000MX500SSD1,033

M.2 drive models found: 1
aigo NVMe SSD P7000Z 2TB,H230407a

No M.2 cards found

No Expansion Units found

Insert firmware version
Updated CT2000MX500SSD1 to ds918+_host_v7.db
Insert firmware version
Updated CT2000MX500SSD1 to ds918+_host_v7.db.new
Append drive and firmware
Added aigo NVMe SSD P7000Z 2TB to ds918+_host_v7.db
Append drive and firmware
Added aigo NVMe SSD P7000Z 2TB to ds918+_host_v7.db.new

Backed up synoinfo.conf

Re-enabled support disk compatibility.

Enabled M.2 volume support.

Disabled drive db auto updates.

DSM successfully checked disk compatibility.

ash-4.4# ./syno_hdd_db.sh -nr
Synology_HDD_db v2.2.47
DS918+ DSM 7.2-64561
Using options: -nr
./syno_hdd_db.sh: line 625: /run/synostorage/disks/$(basename -- "$d")/m2_pool_support: No such file or directory

HDD/SSD models found: 1
CT2000MX500SSD1,033

M.2 drive models found: 1
aigo NVMe SSD P7000Z 2TB,H230407a

No M.2 cards found

No Expansion Units found

Backed up ds918+_host.db.new
Backed up ds918+_host_v7.db.new
CT2000MX500SSD1 already exists in ds918+_host_v7.db
CT2000MX500SSD1 already exists in ds918+_host.db
CT2000MX500SSD1 already exists in ds918+_host.db.new
CT2000MX500SSD1 already exists in ds918+_host_v7.db.new
aigo NVMe SSD P7000Z 2TB already exists in ds918+_host_v7.db
Added aigo NVMe SSD P7000Z 2TB to ds918+_host.db
Added aigo NVMe SSD P7000Z 2TB to ds918+_host.db.new
aigo NVMe SSD P7000Z 2TB already exists in ds918+_host_v7.db.new

Re-enabled support disk compatibility.

Support memory compatibility already disabled.
./syno_hdd_db.sh: line 1066: Size:: syntax error in expression (error token is ":")

M.2 volume support already enabled.

Drive db auto updates already disabled.

DSM successfully checked disk compatibility.

You may need to reboot the Synology to see the changes.

ash-4.4# ./syno_hdd_db.sh -nr
Synology_HDD_db v2.3.48
DS918+ DSM 7.2-64561
Using options: -nr
./syno_hdd_db.sh: line 686: /run/synostorage/disks/$(basename -- "$d")/m2_pool_support: No such file or directory

HDD/SSD models found: 1
CT2000MX500SSD1,033

M.2 drive models found: 1
aigo NVMe SSD P7000Z 2TB,H230407a

No M.2 cards found

No Expansion Units found

CT2000MX500SSD1 already exists in ds918+_host_v7.db
CT2000MX500SSD1 already exists in ds918+_host.db
CT2000MX500SSD1 already exists in ds918+_host.db.new
CT2000MX500SSD1 already exists in ds918+_host_v7.db.new
aigo NVMe SSD P7000Z 2TB already exists in ds918+_host_v7.db
aigo NVMe SSD P7000Z 2TB already exists in ds918+_host.db
aigo NVMe SSD P7000Z 2TB already exists in ds918+_host.db.new
aigo NVMe SSD P7000Z 2TB already exists in ds918+_host_v7.db.new

Re-enabled support disk compatibility.

Support memory compatibility already disabled.
./syno_hdd_db.sh: line 1127: Size:: syntax error in expression (error token is ":")

M.2 volume support already enabled.

Drive db auto updates already disabled.

DSM successfully checked disk compatibility.

You may need to reboot the Synology to see the changes.
ash-4.4#

Not working for WDC WUH722222ALE6L4

New DS1823xs+ installed ST8000VN0022-2EL112, and KINGSTON SFYRD4000G worked without problems.
Today inserted WDC WUH722222ALE6L4 drives, script run without error:

Synology_HDD_db v1.2.18
DS1823xs+ DSM 7.1.1

HDD/SSD models found: 2
ST8000VN0022-2EL112,SC61
WDC WUH722222ALE6L4,W730

M.2 drive models found: 1
KINGSTON SFYRD4000G,EIFK31.6

No Expansion Units found

ST8000VN0022-2EL112 already exists in ds1823xs+_host_v7.db
ST8000VN0022-2EL112 already exists in ds1823xs+_host_v7.db.new
Added WDC WUH722222ALE6L4 to ds1823xs+_host_v7.db
Added WDC WUH722222ALE6L4 to ds1823xs+_host_v7.db.new
KINGSTON SFYRD4000G already exists in ds1823xs+_host_v7.db
KINGSTON SFYRD4000G already exists in ds1823xs+_host_v7.db.new

M.2 volume support already enabled.

Drive db auto updates already enabled.

DSM successfully checked disk compatibility.

Unfortunately the WDC drives still show as not verified

Is there anything I can check or provide additional information?

Error: Cannot find hostdb file - DS1817+ running DSM6

I have a DS1817+ running DSM6, after listing my disks i get the following error:

ERROR: /var/lib/disk-compatibility/ds1817+-j_host.db not found!

when i run "cat /proc/sys/kernel/syno_hw_version" i get back "ds1817+-j" so perhaps the last 2 characters need to be trimmed off in your script?

[Wanted] Someone with an expansion unit to help with detecting the expansion unit model.

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/name

I've never had a DX517 connected to this Synology, but I did buy it 2nd hand so maybe the previous has a DX517.

SSD Volume Support in older NAS models

Hi Dave,

First thanks for writing and maintaining this script. I have a DS1019+ with two 512gb M.2 SSDs that I had been using as a RAID1 volume. I set up the volume via the commandline using instructions that I found on Reddit and it has been performing just fine.

I found this script today and decided to give it a shot to see if I could create an SSD storage Volume via the DSM. I deleted my existing volume and ran the script, then rebooted, however the DSM is still saying that I can't create a storage pool because I don't have any drives that meet the requirements.

Is creating SSD storage volumes in "unsupported" older NAS models actually a thing this script should allow or have I misunderstood?

Here's what I see in the drive requirements modal window:
image

Thanks for your time!

DSM Version: 7.2-64570 Update 2 - all nvme drives gone

after updating to 7.2 U2, all nvme drives are gone from GUI, script still finds them and shows them as enabled. Have tried a number of script runs, restores and then reapply, reboots, etc - no dice.

using version 3.1.60

I have 2 in the native slots as a shr-1 volume

and then 2 on a E10M20-T1 card as a rw cache.

everything is degraded and basically in limp mode

thoughts to revive?

Release 1.1.9 not working on RS4021xs+

When I execute the script I get a bunch of errors like this:

sda SG_IO: bad/missing sense data, sb[]: 70 00 05 00 00 00 00 10 00 00 00 00 20 00 00 c0 00 00 00 25 20 00 00 00 00 00 00 00 00 00 00 00 HDIO_GET_IDENTITY failed: Invalid argument

I think these come from the getfirmware function. If I replace hdparm -I with smartctl -i that function does not return any errors and the script runs normally and reports that my drives already exist in the db files (Because I've run this a few times now). Unfortunately, Synology still shows the drives as not compatible if I don't use the -f flag. I want to use the deduplication capability so I don't want to use the force flag.

What could be wrong here? What tests can I do?

The drives I am trying to add:

HDD/SSD models found: 6
P043S3T8EMC3840,Revision: ESFA
P043S7T6EMC7680,Revision: ESV7
PX02SMF040,Revision: MS01
PX02SMF040,Revision: MS02
PX04SMB040,Revision: AM04
PX05SMB040,Revision: 0101

NVMe drive models found: 1
WD_BLACK SN850X 2000GB,620311WD

P043S3T8EMC3840 already exists in rs4021xs+_host_v7.db
P043S3T8EMC3840 already exists in rs4021xs+_host_v7.db.new
P043S7T6EMC7680 already exists in rs4021xs+_host_v7.db
P043S7T6EMC7680 already exists in rs4021xs+_host_v7.db.new
PX02SMF040 already exists in rs4021xs+_host_v7.db
PX02SMF040 already exists in rs4021xs+_host_v7.db.new
PX02SMF040 already exists in rs4021xs+_host_v7.db
PX02SMF040 already exists in rs4021xs+_host_v7.db.new
PX04SMB040 already exists in rs4021xs+_host_v7.db
PX04SMB040 already exists in rs4021xs+_host_v7.db.new
PX05SMB040 already exists in rs4021xs+_host_v7.db
PX05SMB040 already exists in rs4021xs+_host_v7.db.new
WD_BLACK SN850X 2000GB already exists in rs4021xs+_host_v7.db
WD_BLACK SN850X 2000GB already exists in rs4021xs+_host_v7.db.new

ERROR No drives found!

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+

The script doesnt run

Runing this on Xpenology redpill loader
920+ DSM 7.1.1-42962 Update 4
I am new to this and would like to run this script. I know nothing about how to run the script.
I putty into the machine like you would.
I did run however a python one and it worked but this shows up as:


root@NAS-SLIM:~# cd /tmp
root@NAS-SLIM:/tmp# sudo script.sh
sudo: script.sh: command not found

Downgrading from DSM7.2 to DSM6.24 is not supported!

The system has detected that one or more hard disks are not supported by the current DSM version, it is recommended to reinsert the hard disks into the original device to continue using.

The following is the record of executing the script.

root@Brong:~# ./syno_hdd_db.sh -nrf --showedits
Synology_HDD_db v3.0.56
DS916+-j DSM 6.2.4-25556-7

Using model: ds916+
Using options: -nrf --showedits

HDD/SSD models found: 1
WD80EFZX-68UW8N0,83.H0A83

No M.2 drives found

No M.2 PCIe cards found

No Expansion Units found

WD80EFZX-68UW8N0 already exists in ds916+_host_v7.db
WD80EFZX-68UW8N0 already exists in ds916+_host_v7.db.new

Support disk compatibility already disabled.

Disabled drive db auto updates.

"WD80EFZX-68UW8N0": {
  "83.H0A83": {
    "compatibility_interval": [
      {
        "compatibility": "support",
        "not_yet_rolling_status": "support",
        "fw_dsm_update_status_notify": false,
        "barebone_installable": true
      }
    ]
  },
  "default": {

You may need to reboot the Synology to see the changes.

Unknown database type

Hello,
Thanks for your work!
I've tried the script on a 2421rp+ and I get this :

ERROR Unknown database type rs2421rp+_host_v7.db!
WD120EFBX-68B0EN0 already exists in rs2421rp+_host_v7.db.new
ERROR Unknown database type rs2421rp+_host_v7.db!
WD4003FFBX-68MU3N0 already exists in rs2421rp+_host_v7.db.new
ERROR Unknown database type rs2421rp+_host_v7.db!
SNV3510-800G already exists in rs2421rp+_host_v7.db.new

Any idea?

If I run the script with -f at the end, it's working perfectly!

ERROR Memory size is not numeric: 'No'

Running the latest script with -nr flags. I get the following output error

Screenshot 2023-06-21 at 13 45 26

$ sudo dmidecode -t memory | grep "[Ss]ize" Size: 8192 MB Size: No Module Installed Size: 16384 MB Size: No Module Installed

Huge thanks for this script btw, it's an essential!

double free or corruption (out)

Dear @007revad ,
I wanted to test your script on my DS918+ NAS running DSM 7.1.1-42962 Update 5.

Unfortunately, it doesn't like it. I am getting a "double free or corruption (out)" message and I don't know what it is.
I have exactly the same error message with your other script "syno_create_m2_volume.sh" as well.

example below:
$ sudo -i /volume1/docker/syno_hdd_db.sh -h
Password:
double free or corruption (out)
Aborted

Disks not getting verified on a RS2821RP+

Hello!,

First and foremost thank you for the effort you've put into making this.

I ran this on my own NAS with the following hardware:

  • RS2821RP+
  • 4 x ST10000NM001G-2MW103

Using your script it does add them, but it keeps saying Not-verified:

afbeelding

E10M20-T1 Integration

First, many thanks for all the hard work you do here, it's much appreciated and very useful.

I've just added a E10M20-T1 card to my DS1823xs+ (DSM 7.2-64570-1) and although the script appears to have run without issue and found the new card, none of it's functionality appears to be present i.e. the two M2 SSD drives and/or the 10Gb network port.

I've attached a couple pictures of my current setup and also the latest run of the script for your information.

I'm expecting to see the two additional M2 SSD's from the card, in addition to the built-in M2 SSD's, making 4 in total, all are using the KINGSTON SFYRD4000G,EIFK31.6 SSD.

I don't know if it's possible to use the 10Gb network port on the card as well, as that also seems to not be present.

Any help would be appreciated.

001.txt
001a
001b

M2D20 or FireCuda 530 now detected

Inserted a M2D20 cache card and 2x Seagate FireCuda 530 ZP500GM3A013
The firecudas seem undetected by syno_hdd_db scirpt

myadm@ds1621xs:~$ sudo -i /volume1/apps/mac/drv_osx/synology/Synology_HDD_db-main/syno_hdd_db.sh -rm
Password: 
Synology_HDD_db v3.0.56
DS1621xs+ DSM 7.2-64570-1 
Using options: -rm

HDD/SSD models found: 1
IronWolf ZA2000NM10002-2,SU3SC011

No Expansion Units found

IronWolf ZA2000NM10002-2 already exists in ds1621xs+_host_v7.db
IronWolf ZA2000NM10002-2 already exists in ds1621xs+_host.db
IronWolf ZA2000NM10002-2 already exists in ds1621xs+_host.db.new

Support disk compatibility already enabled.

Support memory compatibility already disabled.

Max memory already set to 32 GB.

Drive db auto updates already enabled.

DSM successfully checked disk compatibility.

You may need to reboot the Synology to see the changes.

however they are detected by the syno_create_m2_volume script

myadm@ds1621xs:/$ sudo -i /volume1/apps/mac/drv_osx/synology/Synology_M2_volume-main/syno_create_m2_volume.sh
Password: 
Synology_M2_volume v1.2.14
DS1621xs+ DSM 7.2-64570-1 

Using options: 
Type yes to continue. Type anything else to do a dry run test.
yes

NVMe M.2 nvme0n1 is Seagate FireCuda 530 ZP500GM30013
WARNING Drive has a volume partition

NVMe M.2 nvme1n1 is Seagate FireCuda 530 ZP500GM30013
WARNING Drive has a volume partition

Unused M.2 drives found: 2

End result is that I cannot use them.....

myadm@ds1621xs:~$ ls /run/synostorage/disks
sda  sdb  sdc  sdd  sde  sdf

myadm@ds1621xs:~$ ls /sys/block | grep nvme
nvme0n1
nvme1n1

myadm@ds1621xs:~$ sudo synodisk --enum -t cache



myadm@ds1621xs:~$ sudo synonvme --model-get /dev/nvme1
Model name: Seagate FireCuda 530 ZP500GM300

myadm@ds1621xs:~$ sudo synonvme --model-get /dev/nvme0
Model name: Seagate FireCuda 530 ZP500GM300

myadm@ds1621xs:~$ sudo ls -I ram -I loop* -I dm-* /sys/block
Password: 
md0  md2      nvme1n1  ram1   ram11  ram13  ram15  ram3  ram5  ram7  ram9  sdb  sdd  sdf       zram0  zram2
md1  nvme0n1  ram0     ram10  ram12  ram14  ram2   ram4  ram6  ram8  sda   sdc  sde  synoboot  zram1  zram3

myadm@ds1621xs:~$ cat /sys/block/nvme0n1/device/model
Seagate FireCuda 530 ZP500GM30013       
myadm@ds1621xs:~$ cat /sys/block/nvme0n1/device/firmware_rev
SU6SM003
myadm@ds1621xs:~$ cat /sys/block/nvme1n1/device/model
Seagate FireCuda 530 ZP500GM30013       
myadm@ds1621xs:~$ cat /sys/block/nvme1n1/device/firmware_rev
SU6SM003

Still getting the Firmware message :(

Hi there,

awesome scripts - thank you for your work! I was successful in activating my Crucial NVME SSD for pool storage on my DS920+.
However I do it, though, I still get the following error message:

Bildschirmfoto 2023-07-09 um 15 02 19

What can I do about that? Other than that, everything is working fine, so it's not the end of the world. But would be nice to get it fixed. :)

Thank you again!!!

v1.2.19 hangs

I replaced my flash drives with new ones and went to run the latest version of the script and now it just hangs.

sudo ./syno_hdd_db.sh 
Synology_HDD_db v1.2.19
DS1817+-j DSM 6.2.4 

Calculation of mixed units will fail in RAM total size

Environment

script version: v3.0.56
OS: DSM 7.2
Device: 1522+
RAM: 1x 8GB, 1x 32GB; Total: 40 GB

Problem description

On this device the command for RAM size determintation will return the following size.

dmidecode -t memory | grep "[Ss]ize"

# Result
Size: 8192 MB
Size: 32 GB

The total ram size will therfore calculated as 8192 + 32 = 8224 and the unit of the last occurrence form the loop will win. In this case the unit is determined as GB. Unfortunatelly the system is providing values with different units.
Therefore the result is:

ramtotal: 8224
bytes: GB

This will lead to the assumption that all determined values have the unit GB and therefore the value will be multiplied with the factor 1024.

if [[ $bytes == "GB" ]]; then      # DSM 7.2 dmidecode returns GB
    ramtotal=$((ramtotal * 1024))  # Convert to MB
fi

At the end the calculated total RAM size will reported wrongly with 8421376 bytes.

Proposed solution

Avoid mixing units in calculation.
Consider the evaluation of the units for each value inside the loop before adding those whit different units.

Nvme detected but no disk

Hi,

I don't know what i'm doing wrong.
after running script my nvme installed on pci card is detected and added to compatibility list. However disk is not shown in dsm 7 under hdd/ssd and can't create pool or cache.
Can it be that i'm using some simple pci converter to nvme ? Not approved by Synology.

RS1221+
DSM 7.1.1 u4
Script - latest
M2 drive ssd 960 pro samsung

Also when running script: i have error on line 500 /run/synostorage/disk/$(basename -- "$d")/m2_pool_support: No such file or directory

Script also reporting:
No M.2 cards found
No Expansion Units found

ERROR 6a Failed to update ds1821+_host_v7.db

Trying to update the drive listing and I get this error message.

Synology_HDD_db v2.2.45
DS1821+ DSM 7.2-64551 RC
Using options: -nr

HDD/SSD models found: 6
CT2000BX500SSD1,061
CT2000MX500SSD1,033
WD80EFAX-68KNBN0,0A81
WD80EFAX-68LHPN0,0A83
WD80EFBX-68AZZN0,0A85
WD80EFZX-68UW8N0,0A83

M.2 drive models found: 2
KINGSTON SA2000M8/1000G,V0304B0
SA2000M8/1TB,T1103F0L

No M.2 cards found

No Expansion Units found

CT2000BX500SSD1 already exists in ds1821+_host_v7.db
CT2000MX500SSD1 already exists in ds1821+_host_v7.db
WD80EFAX-68KNBN0 already exists in ds1821+_host_v7.db
WD80EFAX-68LHPN0 already exists in ds1821+_host_v7.db
WD80EFBX-68AZZN0 already exists in ds1821+_host_v7.db
WD80EFZX-68UW8N0 already exists in ds1821+_host_v7.db
sed: -e expression #1, char 33: unknown option to `s'

ERROR 6a Failed to update ds1821+_host_v7.db
sed: -e expression #1, char 21: unknown option to `s'

ERROR 6a Failed to update ds1821+_host_v7.db

Support disk compatibility already enabled.

Support memory compatibility already disabled.

Max memory already set to 32 GB.

M.2 volume support already enabled.

Drive db auto updates already disabled.

DSM successfully checked disk compatibility.

Script Command Not Found

I downloaded the tar file to /volume1/scripts/Synology_HDD_db-2.2.45/syno_hdd_db.sh

I am on an RS2423+ on the newest firmware

I used the command
sudo /volume1/scripts/Synology_HDD_db-2.2.45/syno_hdd_db.sh -nr

Error I get:
sudo: /volume1/scripts/Synology_HDD_db-2.2.45/syno_hdd_db.sh: command not found

Any reason why or is it just something I'm doing wrong?

Lost access to Storage Manager on DSM 7.2-64561 (DS923+)

Hi,

I have ran the syno_hdd_db.sh script on my DS923+ and after reboot I still couldn't create an M2 storage pool. I have then run the script again to restore the previous settings before trying anything else. After another reboot the Storage Manager was gone.
This seems similar to #73 but on the final version of 7.2.

The model is missing within the Info Center: https://imgur.com/a/B8SV4WU

I run get_syno_model.sh and this is the output:

unamee:
synology_r1000_923+

/etc/synoinfo.conf unique:
synology_r1000_923+

/etc.defaults/synoinfo.conf unique:
synology_r1000_923+

/etc/synoinfo.conf upnpmodelname:
DS923+

/etc.defaults/synoinfo.conf upnpmodelname:
DS923+

/proc/cmdline syno_hw_version:
DS923+

/rpco/sys/kernel syno_hw_version:
DS923+

I have also checked to see if the config file was corrupt in some way, but this is the only thing diff could see:

max-admin@SynologyNAS:~$ sudo diff syno_conf_after_first_attempt.txt /etc.defaults/synoinfo.conf
Password: 
204c204
< support_memory_compatibility="no"
---
> support_memory_compatibility="yes"
328a329
> 

I have tried the "Restore DSM configurations" from the "Update & Restore" menu but that didn't help...

Do you have any pointers on how to fix my config?
Thank you

Syntax Error?

/volume1/homes/name/syno_hdd_db.sh -showedits
/volume1/homes/name/syno_hdd_db.sh: line 8: syntax error near unexpected token `newline'

/volume1/homes/name/syno_hdd_db.sh: line 8: !DOCTYPE html

Am I doing something wrong? I'm trying to run this on an RS3618xs.

Cheers!

Routine of RAM size evaluation not sufficient and might cause issues

Environment

script version: v3.0.56
OS: DSM 7.2
Device: 1817+
RAM: 2x 8GB

Problem description

The evaluation of RAM size might cause issues because the condition of the grep command for dmidecode is not clear enough.

Example:
On my system the command dmidecode -t memory | grep "[Ss]ize" will return the following content.

Size: 8192 MB
Size: No Module Installed
Size: 8192 MB
Size: No Module Installed

Now you can imagine what will happen with the variables $ramsize and $bytes when evaluating with awk.

ramsize=$(printf %s "${array[num]}" | awk '{print $2}')
bytes=$(printf %s "${array[num]}" | awk '{print $3}')

The result is:

ramsize: 8192
bytes: MB
ramsize: No
bytes: Module
ramsize: 8192
bytes: MB
ramsize: No
bytes: Module

At the end of the loop we will have fortunately the correct numeric value for the variable $ramtotal. But the unit for $bytes is inconsitent.

ramtotal: 16384
bytes: Module

Proposed solution

My proposal is to make the grep command with an extended regular expression much more precise that will return only the size with numeric values and additionally with a valid unit either MB or GB as postfix at the end of the line.

#Proposal
dmidecode -t memory | grep -E "[Ss]ize: [0-9]+ [MG]{1}[B]{1}$"

# Return
Size: 8192 MB
Size: 8192 MB

I haven´t checked other systems yet, but it could also lead to an error in the calculation of $ramtotal size.
Please have a look and check if the improvement can be implemented.

Samsung 970 listed as incompatible on 1621+ when trying to create storage pool

Screen Shot 2023-03-09 at 5 16 48 PM

I've run the script (and tried running it again):

Samsung SSD 970 EVO Plus 2TB already exists in ds1621+_host_v7.db
Samsung SSD 970 EVO Plus 2TB already exists in ds1621+_host_v7.db.new

Is there a different database that gets checked for the new feature in DSM 7.2 where creating storage pools from NVME drives is supported in the 1621+?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.