Giter Site home page Giter Site logo

synology_hdd_db's Introduction

Synology HDD db

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 M.2 card and Expansion Unit databases.

The script works in DSM 7 and DSM 6.

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.
  • 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.
  • 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?).
  • Makes DSM recheck disk compatibility so rebooting is not needed (DSM 7 only).
  • Reminds you that you may need to reboot the Synology after running the script (DSM 6 only).
  • 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

See How to download the script for the easiest way to download the script.

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: For DSM 6, 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:

  • --showedits or -s to show you the changes it made to the Synology's compatible-drive database.
  • --noupdate or -n to prevent DSM updating the compatible drive databases.
  • --m2 or -m to prevent processing M.2 drives.
  • --force or -f to disable "support_disk_compatibility". This should only be needed if any of your drives weren't detected.
    • If you run the script without --force or -f it will re-eanble "support_disk_compatibility".
  • --ram or -r to disable "support_memory_compatibility".
    • If you run the script without --ram or -r it will re-eanble "support_memory_compatibility".

Scheduling the script in Synology's Task Scheduler

See How to schedule a script in Synology Task Manager

Running the script via SSH

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

sudo -i /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 -i /path-to-script/syno_hdd_db.sh -nr -showedits

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

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

  • A big thank you to Gummibando on reddit for their donation.

synology_hdd_db's People

Contributors

007revad avatar

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.