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.
Or via SSH as your regular user:
cd $HOME
wget https://github.com/007revad/Synology_HDD_db/archive/refs/heads/main.zip -O syno_hdd_db.zip
7z x syno_hdd_db.zip
cd Synology_HDD_db-main && ls -ali
The following files from the downloaded zip file must be in the same folder:
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.
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
-p, --pcie Enable creating volumes on M2 in unknown PCIe adaptor
-e, --email Disable colored text in output scheduler emails
-S, --ssd=DRIVE Enable write_mostly on slow internal drives so DSM
runs from the fast internal drive(s).
-S automatically sets internal SSDs as DSM preferred
--ssd=DRIVE requires the fast drive(s) as argument,
or restore as the argument to reset drives to default
--ssd=sata1 or --ssd=sata1,sata2 or --ssd=sda etc
--ssd=restore
--restore Undo all changes made by the script (except -S --ssd)
--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:
See How to schedule a script in Synology Task Scheduler
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.
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 |
If you get a "No such file or directory" error check the following:
sudo -s "/volume1/my scripts/syno_hdd_db.sh -n"
sudo chmod +x "/volume1/scripts/syno_hdd_db.sh"
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.
Thank you to the PayPal and Buy Me a Coffee donators, GitHub sponsors and hardware donators
Alexander Machatschek | |||
YeongNuno | Joe | Torben Schreiter | Anthony McMurray |
Abhishek | Steven Haskell | Malte Müller | Aaron Thomas |
DENNIS BRAZIL | kunvanimals | Arnaud Costermans | dealchecker |
Michael Carras | Alan | speedyyyyyy | Jordi Chavarria Fibla |
Qwerty.xyz | Max | Mark Rohde | Someone |
vaadmin | Sebastiaan Mulder | Nico Stark | Oleksandr Antonishak |
Marcel Siemienowski | Dave Smart | dweagle79 | lingyinsam |
Vojtech Filkorn | Craig Sadler | Po-Chia Chen | Jean-François Fruhauf |
Sven 'ctraltdelete' | Thomas Horn | 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 |
侯永政 | CHENHAN-YING | Eric Wells | Massimiliano Pesce |
JasonEMartin | Gerrit Klussmann | Alain Aube | Robert Kraut |
Charles-Edouard Poisnel | Oliver Busch | anonymous donors | private sponsors |