007revad / Synology_enable_M2_volume

Enable creating volumes with non-Synology M.2 drives
MIT License
501 stars 36 forks source link
diskstation dsm rackstation synology synology-disk-station synology-dsm synology-nas

Synology enable M2 volume

Donate committers.top badge

Description

Enable creating volumes with non-Synology M.2 drives

This script will:

It will work for DSM 7.2 and some models running DSM 7.1.1. As for a full list of which models it will work with, I don't know yet. I do know it does work on models listed by Synology as supported for creating M.2 volumes, and some '21 and newer enterprise models.

Confirmed working on

Click here to see list | Model | Platform | DSM version | Works | Note | | ------------ |----------|--------------------------|-------|------| | **E10M20-T1** | | DSM 7.2.1 and later | **No** | Use Synology_HDD_db instead | | **M2D20** | | DSM 7.2.1 and later | **No** | Use Synology_HDD_db instead | | **M2D18** | | DSM 7.2.1 and later | **No** | Use Synology_HDD_db instead | | **E10M20-T1** | | ALL | **No** | Use Synology_M2_volume instead | | **M2D20** | | ALL | **No** | Use Synology_M2_volume instead | | **M2D18** | | ALL | **No** | Use Synology_M2_volume instead | || | **23 Series** | | DS1823xs+ | V1000 | DSM 7.2.1 and later | **No** | Use Synology_HDD_db instead | | DS923+ | R1000 | DSM 7.2.1-69057 Update 5 | yes | Can use Synology_HDD_db instead | | DS923+ | R1000 | DSM 7.2.1-69057 Update 4 | yes | Can use Synology_HDD_db instead | | DS923+ | R1000 | DSM 7.2-64570 Update 3 | yes | Can use Synology_HDD_db instead | | DS923+ | R1000 | DSM 7.2-64570 | yes | Can use Synology_HDD_db instead | | DS923+ | R1000 | DSM 7.1.1-42962 Update 4 | yes | Can use Synology_HDD_db instead | | DS723+ | R1000 | DSM 7.2-64570 Update 3 | yes | Can use Synology_HDD_db instead | | DS423+ | Geminilake | DSM 7.1.1-42962 Update 5 | yes | Can use Synology_HDD_db instead | | **22 Series** | | DS3622xs+ | Broadwellnk | DSM 7.2.1-69057 Update 4 | **No** | M.2 panel missing in storage manager | | DS3622xs+ | Broadwellnk | DSM 7.2-64570 Update 3 | **No** | M.2 panel missing in storage manager | | DS3622xs+ | Broadwellnk | DSM 7.2-64570 | yes | | DS3622xs+ | Broadwellnk | DSM 7.1.1-42962 Update 4 | yes | | DS3622xs+ | Broadwellnk | DSM 7.1.1-42962 Update 1 | **No** | Use newer DSM version | | DS1522+ | R1000 | DSM 7.2.1-69057 Update 4 | yes | Can use Synology_HDD_db instead | | DS1522+ | R1000 | DSM 7.2-64570 | yes | Can use Synology_HDD_db instead | | DS1522+ | R1000 | DSM 7.1.1-42962 Update 4 | **No** | Use newer DSM version | | **21 Series** | | RS4021xs+ | Broadwellnk | DSM 7.2.1-69057 Update 4 | **No** | M.2 panel missing in storage manager | | RS4021xs+ | Broadwellnk | DSM 7.2-64570 Update 3 | **No** | M.2 panel missing in storage manager | | RS4021xs+ | Broadwellnk | DSM 7.2-64570 | yes | | RS4021xs+ | Broadwellnk | DSM 7.1.1-42962 Update 2 | yes | | DS1821+ | V1000 | DSM 7.2.1-69057 Update 4 | yes | Can use Synology_HDD_db instead | | DS1821+ | V1000 | DSM 7.2-64570 Update 3 | yes | Can use Synology_HDD_db instead | | DS1821+ | V1000 | DSM 7.2-64570 Update 2 | yes | Can use Synology_HDD_db instead | | DS1821+ | V1000 | DSM 7.2-64570 Update 1 | yes | Can use Synology_HDD_db instead | | DS1821+ | V1000 | DSM 7.2-64570 | yes | Can use Synology_HDD_db instead | | DS1621xs+ | Broadwellnk | DSM 7.2.1-69057 Update 5 | yes | Can use Synology_HDD_db instead | | DS1621xs+ | Broadwellnk | DSM 7.2.1-69057 Update 4 | yes | Can use Synology_HDD_db instead | | DS1621xs+ | Broadwellnk | DSM 7.2-64570 Update 3 | yes | Can use Synology_HDD_db instead | | DS1621xs+ | Broadwellnk | DSM 7.2-64570 Update 1 | yes | Can use Synology_HDD_db instead | | DS1621+ | V1000 | DSM 7.2.1-69057 Update 5 | yes | Can use Synology_HDD_db instead | | DVA3221 | Denverton | DSM 7.x | **No** | Not working with any DSM version | | **20 Series** | | DS1520+ | Geminilake | DSM 7.2.1-69057 Update 4 | yes | | DS1520+ | Geminilake | DSM 7.2.1-69057 | yes | | DS920+ | Geminilake | DSM 7.2.1-69057 Update 5 | yes | | DS920+ | Geminilake | DSM 7.2.1-69057 Update 4 | yes | | DS920+ | Geminilake | DSM 7.2.1-69057 Update 3 | yes | | DS920+ | Geminilake | DSM 7.2.1-69057 Update 2 | yes | | DS920+ | Geminilake | DSM 7.2.1-69057 Update 1 | yes | | DS920+ | Geminilake | DSM 7.2.1-69057 | yes | | DS920+ | Geminilake | DSM 7.2-64570 Update 3 | yes | | DS920+ | Geminilake | DSM 7.2-64570 Update 1 | yes | | DS920+ | Geminilake | DSM 7.2-64570 | yes | | DS920+ | Geminilake | DSM 7.1.1-42962 Update 5 | **No** | Use newer DSM version | | DS920+ | Geminilake | DSM 7.1.1-42962 Update 4 | **No** | Use newer DSM version | | DS720+ | Geminilake | DSM 7.2.1-69057 Update 4 | yes | | DS720+ | Geminilake | DSM 7.2.1-69057 | yes | | DS720+ | Geminilake | DSM 7.2-64570 Update 3 | yes | | DS720+ | Geminilake | DSM 7.2-64570 | yes | | DS620slim | Apollolake | DSM 7.2.1-69057 Update 4 | **No** | M.2 panel missing in storage manager | | DS420+ | Geminilake | DSM 7.2.1-69057 Update 4 | yes | | DS420+ | Geminilake | DSM 7.2-64570 | yes | | **19 Series** | | DS1019+ | Apollolake | DSM 7.2.1-69057 Update 4 | yes | Only one M.2 NVMe is supported | | DS1019+ | Apollolake | DSM 7.2-64570 Update 3 | yes | Only one M.2 NVMe is supported | | DS1019+ | Apollolake | DSM 7.2-64570 Update 1 | yes | Only one M.2 NVMe is supported | | DS1019+ | Apollolake | DSM 7.2-64570 | yes | Only one M.2 NVMe is supported | | **18 Series** | | DS918+ | Apollolake | DSM 7.2.1-69057 Update 4 | yes | | DS918+ | Apollolake | DSM 7.2-64570 Update 3 | yes | | DS918+ | Apollolake | DSM 7.2-64570 | yes | | DS918+ | Apollolake | DSM 7.1.1-42962 Update 5 | **No** | Use newer DSM version | | **17 Series** | | DS3617xs | Broadwell | DSM 7.x | **No** | Not working with any DSM version | | **15 Series** | | DS3615xs | Bromolow | DSM 7.x | **No** | Not working with any DSM version | | **SA Series** | | SA6400 | EPYC7002 | DSM 7.2.1-69057 Update 4 | yes |

How is this different to the Synology_M2_volume script?

Feature Synology_HDD_db Synology_enable_M2_volume Synology_M2_volume
DSM version DSM 7.2 and later (7.1.1 for some NAS models) DSM 7.2 and later (7.1.1 for some NAS models) Any DSM version
Non-Synology M.2 drives Yes Yes Yes
Ease of use Easy Easy Medium
Prompts for answers No No Yes, multiple times
Can be scheduled Yes Yes No
Online Assemble required No No DSM 7 Yes - DSM 6 No
RAID levels supported Basic, RAID 0, 1, 5, 6, 10, SHR, SHR-2, JBOD and RAID F1 (see Notes 1 and 2) Basic, RAID 0, 1, SHR, JBOD and RAID F1 (see Note 1) Basic, RAID 0, 1, 5, 6, 10, SHR, SHR-2, JBOD and RAID F1 (see Notes 1, 2 and 3)
Add drive(s) to RAID Yes, via Storage Manager Yes, via Storage Manager No
Change RAID type Yes, via Storage Manager Yes, via Storage Manager No
RAID repair Yes, via Storage Manager Yes, via Storage Manager No
RAID expansion Yes, via Storage Manager Yes, via Storage Manager No
NVMe Health Info Yes Yes No
M.2 drive location Internal M.2 and Synology M.2 PCie cards Internal M.2 slots only Internal M.2 and Synology M.2 PCie cards
Span internal and PCIe NVMes Yes No Yes
What it does Edits a few files in DSM Edits 1 file in DSM Creates partitons on M.2 drive(s)

Note 1: RAID F1 requires a Synology model that supports RAID F1.

Note 2: RAID 5 requires 3 or more NVMe drives. RAID 6 and 10 require 4 or more NVMe drives.

Note 3: Synology_M2_volume requires DSM 7 for SHR, SHR-2, JBOD and RAID F1.

If you run this script then use Storage Manager to create your M.2 storage pool and volume and then run the script again with the --restore option to restore the original setting your storage pool and volume survive and the annoying notifications and warnings are gone.

Your volume also survives reboots and DSM updates.

Download the script

  1. Download the latest version Source code (zip) from https://github.com/007revad/Synology_enable_M2_volume/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.

How to run the script

Running the script via SSH

How to enable SSH and login to DSM via SSH

Note: Replace /volume1/scripts/ with the path to where the script is located.

  1. Run the script then reboot the Synology:
    sudo -s /volume1/scripts/syno_enable_m2_volume.sh
  2. Go to Storage Manager and create your M.2 storage pool and volume(s).

Options:

  -c, --check           Check value in file and backup file
  -r, --restore         Restore backup to undo changes
  -n, --noreboot        Don't reboot after script has run
  -e, --email           Disable colored text in output scheduler emails
      --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

Extra Steps:

To get rid of drive database outdated notifications and unrecognised firmware warnings run Synology_HDD_db which will add your drives to DSM's compatibile drive databases, and prevent the drive compatability databases being updated between DSM updates.

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

What about DSM updates?

After any DSM update you will need to run this script, and the Synology_HDD_db script again.

Schedule the script to run at shutdown

Or you can schedule Synology_enable_M2_volume to run when the Synology shuts down and Synology_HDD_db to run when the Synology boots up, to avoid having to remember to run both scripts after a DSM update.

See How to schedule a script in Synology Task Scheduler

Screenshots

Here's the result after running the script and rebooting. Note that the strorage pool is being created in Storage Manager and there's no Online Assembly needed. SHR and JBOD are also available.

After reboot I got some notifications saying the M.2 drives can be managed

No M2 Storage Pool or Volume yet

Non-Synology M.2 drives

Create Storage Pool 2

I wonder if RAID 5 and SHR-2 would be available if I had four M.2 drives.

RAID choices including SHR and JBOD

Select my non-Synology M.2 drives

We have an SHR M.2 storage pool

Create Volume 2

Finished Creating Volume 2

Credits