007revad/Synology_enable_M2_volume

Enable creating volumes with non-Synology M.2 drives

784

stars

548

commits

Shell

primary language

Aug 26, 2026

updated

diskstation
dsm
rackstation
synology
synology-disk-station
synology-dsm
synology-nas

README

Synology enable M2 volume

Badge Donate

Description

Enable creating volumes with non-Synology M.2 drives

This script will:

  • Enable creating M.2 storage pools and volumes all from within Storage Manager.
  • Enable Health Info for non-Synology NVMe drives (not in DSM 7.2.1 or later).

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
ModelPlatformDSM versionWorksNote
E10M20-T1DSM 7.2.1 and laterNoUse Synology_HDD_db instead
M2D20DSM 7.2.1 and laterNoUse Synology_HDD_db instead
M2D18DSM 7.2.1 and laterNoUse Synology_HDD_db instead
E10M20-T1Older DSM versionsNoUse Synology_M2_volume instead
M2D20Older DSM versionsNoUse Synology_M2_volume instead
M2D18Older DSM versionsNoUse Synology_M2_volume instead
23 Series
DS1823xs+V1000DSM 7.2.1 and laterNoUse Synology_HDD_db instead
DS923+R1000DSM 7.4-90075yesUse only Synology_HDD_db instead
DS923+R1000DSM 7.3.2-86009 Update 1yesUse only Synology_HDD_db instead
DS923+R1000DSM 7.2.1-69057 Update 5yesUse only Synology_HDD_db instead
DS923+R1000DSM 7.2.1-69057 Update 4yesUse only Synology_HDD_db instead
DS923+R1000DSM 7.2-64570 Update 3yesUse only Synology_HDD_db instead
DS923+R1000DSM 7.2-64570yesUse only Synology_HDD_db instead
DS923+R1000DSM 7.1.1-42962 Update 4yesUse only Synology_HDD_db instead
DS723+R1000DSM 7.2-64570 Update 3yesUse only Synology_HDD_db instead
DS423+GeminilakeDSM 7.1.1-42962 Update 5yesUse only Synology_HDD_db instead
22 Series
DS3622xs+BroadwellnkDSM 7.2.1-69057 Update 4NoM.2 panel missing in storage manager
DS3622xs+BroadwellnkDSM 7.2-64570 Update 3NoM.2 panel missing in storage manager
DS3622xs+BroadwellnkDSM 7.2-64570yes
DS3622xs+BroadwellnkDSM 7.1.1-42962 Update 4yes
DS3622xs+BroadwellnkDSM 7.1.1-42962 Update 1NoUse newer DSM version
DS1522+R1000DSM 7.2.1-69057 Update 4yesUse only Synology_HDD_db instead
DS1522+R1000DSM 7.2-64570yesUse only Synology_HDD_db instead
DS1522+R1000DSM 7.1.1-42962 Update 4NoUse newer DSM version
21 Series
RS4021xs+BroadwellnkDSM 7.2.1-69057 Update 4NoM.2 panel missing in storage manager
RS4021xs+BroadwellnkDSM 7.2-64570 Update 3NoM.2 panel missing in storage manager
RS4021xs+BroadwellnkDSM 7.2-64570yes
RS4021xs+BroadwellnkDSM 7.1.1-42962 Update 2yes
DS1821+V1000DSM 7.2.1-69057 Update 4yesUse only Synology_HDD_db instead
DS1821+V1000DSM 7.2-64570 Update 3yesUse only Synology_HDD_db instead
DS1821+V1000DSM 7.2-64570 Update 2yesUse only Synology_HDD_db instead
DS1821+V1000DSM 7.2-64570 Update 1yesUse only Synology_HDD_db instead
DS1821+V1000DSM 7.2-64570yesUse only Synology_HDD_db instead
DS1621xs+BroadwellnkDSM 7.2.1-69057 Update 5yesUse only Synology_HDD_db instead
DS1621xs+BroadwellnkDSM 7.2.1-69057 Update 4yesUse only Synology_HDD_db instead
DS1621xs+BroadwellnkDSM 7.2-64570 Update 3yesUse only Synology_HDD_db instead
DS1621xs+BroadwellnkDSM 7.2-64570 Update 1yesUse only Synology_HDD_db instead
DS1621+V1000DSM 7.2.1-69057 Update 5yesUse only Synology_HDD_db instead
DVA3221DenvertonDSM 7.xNoNot working with any DSM version
20 Series
DS1520+GeminilakeDSM 7.2.1-69057 Update 4yes
DS1520+GeminilakeDSM 7.2.1-69057yes
DS920+GeminilakeDSM 7.3.2-86009 Update 1yes
DS920+GeminilakeDSM 7.2.2-72806 Update 2yes
DS920+GeminilakeDSM 7.2.1-69057 Update 6yes
DS920+GeminilakeDSM 7.2.1-69057 Update 5yes
DS920+GeminilakeDSM 7.2.1-69057 Update 4yes
DS920+GeminilakeDSM 7.2.1-69057 Update 3yes
DS920+GeminilakeDSM 7.2.1-69057 Update 2yes
DS920+GeminilakeDSM 7.2.1-69057 Update 1yes
DS920+GeminilakeDSM 7.2.1-69057yes
DS920+GeminilakeDSM 7.2-64570 Update 3yes
DS920+GeminilakeDSM 7.2-64570 Update 1yes
DS920+GeminilakeDSM 7.2-64570yes
DS920+GeminilakeDSM 7.1.1-42962 Update 5NoUse newer DSM version
DS920+GeminilakeDSM 7.1.1-42962 Update 4NoUse newer DSM version
DS720+GeminilakeDSM 7.2.1-69057 Update 4yes
DS720+GeminilakeDSM 7.2.1-69057yes
DS720+GeminilakeDSM 7.2-64570 Update 3yes
DS720+GeminilakeDSM 7.2-64570yes
DS620slimApollolakeDSM 7.2.1-69057 Update 4NoM.2 panel missing in storage manager
DS420+GeminilakeDSM 7.2.1-69057 Update 4yes
DS420+GeminilakeDSM 7.2-64570yes
19 Series
DS1019+ApollolakeDSM 7.2.1-69057 Update 4yesOnly one M.2 NVMe is supported
DS1019+ApollolakeDSM 7.2-64570 Update 3yesOnly one M.2 NVMe is supported
DS1019+ApollolakeDSM 7.2-64570 Update 1yesOnly one M.2 NVMe is supported
DS1019+ApollolakeDSM 7.2-64570yesOnly one M.2 NVMe is supported
18 Series
DS918+ApollolakeDSM 7.2.1-69057 Update 4yes
DS918+ApollolakeDSM 7.2-64570 Update 3yes
DS918+ApollolakeDSM 7.2-64570yes
DS918+ApollolakeDSM 7.1.1-42962 Update 5NoUse newer DSM version
17 Series
DS3617xsBroadwellDSM 7.xNoNot working with any DSM version
15 Series
DS3615xsBromolowDSM 7.xNoNot working with any DSM version
SA Series
SA6400EPYC7002DSM 7.2.1-69057 Update 4yes

How is this different to the Synology_M2_volume script?

  • Synology_HDD_db:

    • Allows creating an M.2 storage pool and volume all from within Storage Manager with any brand M.2 drive.
    • Works with most '20 series and newer model Synology NAS using DSM 7.2 or later without needing Synology_enable_M2_volume or Synology_M2_volume.
  • Synology_enable_M2_volume:

    • Allows creating an M.2 storage pool and volume all from within Storage Manager with any brand M.2 drive.
    • Gives you the option of SHR and JBOD, as well as RAID 0, RAID 1 and Basic.
    • Enables Health Info for non-Synology NVMe drives.
    • Add drive(s) and change RAID type work from within Storage Manager.
    • RAID repair and expansion work from within Storage Manager.
    • Easy to run as there a no questions to answer.
    • Works with DSM 7.2 beta and 7.1.1 (may work with DSM 7.1 and 7.0).
    • Works with any brand M.2 drives.
    • May only work with models Synology listed as supporting M.2 volumes.
    • Can be scheduled to run at boot or shut down.
    • Does NOT work for M.2 drives in a M2D20, M2D18, M2D17 or E10M20-T1.
    • Does NOT allow creating a storage pool/volume spanning internal NVMe drives and NVMe drives in a Synology M.2 PCIe card.
  • Synology_M2_volume:

    • Creates the synology partitions.
    • Creates the storage pool.
    • Requires you to do an Online Assemble in Storage Manager before you can create your volume.
    • A little more complicated as there are questions that you need to answer.
    • Gives you the option of Basic, RAID 0, RAID 1, RAID 5, RAID 6 and RAID 10.
    • Works with any DSM version.
    • Works with any brand M.2 drives.
    • Works with any Synology model that has M.2 slots or can install a Synology PCIe M.2 card.
    • Works for M.2 drives in a M2D20, M2D18, M2D17 or E10M20-T1.
    • Works for creating a storage pool/volume spanning internal NVMe drives and NVMe drives in a Synology M.2 PCIe card.
    • Can NOT be scheduled to run at boot or shut down.
FeatureSynology_HDD_dbSynology_enable_M2_volumeSynology_M2_volume
DSM versionDSM 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 drivesYesYesYes
Ease of useEasyEasyMedium
Prompts for answersNoNoYes, multiple times
Can be scheduledYesYesNo
Online Assemble requiredNoNoDSM 7 Yes - DSM 6 No
RAID levels supportedBasic, 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 RAIDYes, via Storage ManagerYes, via Storage ManagerNo
Change RAID typeYes, via Storage ManagerYes, via Storage ManagerNo
RAID repairYes, via Storage ManagerYes, via Storage ManagerNo
RAID expansionYes, via Storage ManagerYes, via Storage ManagerNo
NVMe Health InfoYesYesNo
M.2 drive locationInternal M.2 and Synology M.2 PCie cardsInternal M.2 slots onlyInternal M.2 and Synology M.2 PCie cards
Span internal and PCIe NVMesYesNoYes
What it doesEdits a few files in DSMEdits 1 file in DSMCreates partitons on M.2 drive(s)

Note 1: RAID F1 requires a Synology model that supports RAID F1. Or you can enable RAID F1 on other models.

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.

TRIM support:

  • DSM 7.2 and later has no SSD TRIM setting for M.2 RAID 0 storage pools.
  • DSM 7.1.1. has no SSD TRIM setting for M.2 storage pools.

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 <a href=images/before_running_syno_hdd_db.png>unrecognised firmware warnings run <a href=https://github.com/007revad/Synology_HDD_db>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

  • K4LO from the XPenology forum.
  • prt1999 for pointing me to K4LO.
  • capull0 for replacing bc with xargs.

Contributors

007revad

539 commits

mateddy

2 commits

d0c-stranGE

1 commits

007revad/Synology_enable_M2_volume

Enable creating volumes with non-Synology M.2 drives

784

stars

548

commits

Shell

primary language

Aug 26, 2026

updated

diskstation
dsm
rackstation
synology
synology-disk-station
synology-dsm
synology-nas

README

Synology enable M2 volume

Badge Donate

Description

Enable creating volumes with non-Synology M.2 drives

This script will:

  • Enable creating M.2 storage pools and volumes all from within Storage Manager.
  • Enable Health Info for non-Synology NVMe drives (not in DSM 7.2.1 or later).

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
ModelPlatformDSM versionWorksNote
E10M20-T1DSM 7.2.1 and laterNoUse Synology_HDD_db instead
M2D20DSM 7.2.1 and laterNoUse Synology_HDD_db instead
M2D18DSM 7.2.1 and laterNoUse Synology_HDD_db instead
E10M20-T1Older DSM versionsNoUse Synology_M2_volume instead
M2D20Older DSM versionsNoUse Synology_M2_volume instead
M2D18Older DSM versionsNoUse Synology_M2_volume instead
23 Series
DS1823xs+V1000DSM 7.2.1 and laterNoUse Synology_HDD_db instead
DS923+R1000DSM 7.4-90075yesUse only Synology_HDD_db instead
DS923+R1000DSM 7.3.2-86009 Update 1yesUse only Synology_HDD_db instead
DS923+R1000DSM 7.2.1-69057 Update 5yesUse only Synology_HDD_db instead
DS923+R1000DSM 7.2.1-69057 Update 4yesUse only Synology_HDD_db instead
DS923+R1000DSM 7.2-64570 Update 3yesUse only Synology_HDD_db instead
DS923+R1000DSM 7.2-64570yesUse only Synology_HDD_db instead
DS923+R1000DSM 7.1.1-42962 Update 4yesUse only Synology_HDD_db instead
DS723+R1000DSM 7.2-64570 Update 3yesUse only Synology_HDD_db instead
DS423+GeminilakeDSM 7.1.1-42962 Update 5yesUse only Synology_HDD_db instead
22 Series
DS3622xs+BroadwellnkDSM 7.2.1-69057 Update 4NoM.2 panel missing in storage manager
DS3622xs+BroadwellnkDSM 7.2-64570 Update 3NoM.2 panel missing in storage manager
DS3622xs+BroadwellnkDSM 7.2-64570yes
DS3622xs+BroadwellnkDSM 7.1.1-42962 Update 4yes
DS3622xs+BroadwellnkDSM 7.1.1-42962 Update 1NoUse newer DSM version
DS1522+R1000DSM 7.2.1-69057 Update 4yesUse only Synology_HDD_db instead
DS1522+R1000DSM 7.2-64570yesUse only Synology_HDD_db instead
DS1522+R1000DSM 7.1.1-42962 Update 4NoUse newer DSM version
21 Series
RS4021xs+BroadwellnkDSM 7.2.1-69057 Update 4NoM.2 panel missing in storage manager
RS4021xs+BroadwellnkDSM 7.2-64570 Update 3NoM.2 panel missing in storage manager
RS4021xs+BroadwellnkDSM 7.2-64570yes
RS4021xs+BroadwellnkDSM 7.1.1-42962 Update 2yes
DS1821+V1000DSM 7.2.1-69057 Update 4yesUse only Synology_HDD_db instead
DS1821+V1000DSM 7.2-64570 Update 3yesUse only Synology_HDD_db instead
DS1821+V1000DSM 7.2-64570 Update 2yesUse only Synology_HDD_db instead
DS1821+V1000DSM 7.2-64570 Update 1yesUse only Synology_HDD_db instead
DS1821+V1000DSM 7.2-64570yesUse only Synology_HDD_db instead
DS1621xs+BroadwellnkDSM 7.2.1-69057 Update 5yesUse only Synology_HDD_db instead
DS1621xs+BroadwellnkDSM 7.2.1-69057 Update 4yesUse only Synology_HDD_db instead
DS1621xs+BroadwellnkDSM 7.2-64570 Update 3yesUse only Synology_HDD_db instead
DS1621xs+BroadwellnkDSM 7.2-64570 Update 1yesUse only Synology_HDD_db instead
DS1621+V1000DSM 7.2.1-69057 Update 5yesUse only Synology_HDD_db instead
DVA3221DenvertonDSM 7.xNoNot working with any DSM version
20 Series
DS1520+GeminilakeDSM 7.2.1-69057 Update 4yes
DS1520+GeminilakeDSM 7.2.1-69057yes
DS920+GeminilakeDSM 7.3.2-86009 Update 1yes
DS920+GeminilakeDSM 7.2.2-72806 Update 2yes
DS920+GeminilakeDSM 7.2.1-69057 Update 6yes
DS920+GeminilakeDSM 7.2.1-69057 Update 5yes
DS920+GeminilakeDSM 7.2.1-69057 Update 4yes
DS920+GeminilakeDSM 7.2.1-69057 Update 3yes
DS920+GeminilakeDSM 7.2.1-69057 Update 2yes
DS920+GeminilakeDSM 7.2.1-69057 Update 1yes
DS920+GeminilakeDSM 7.2.1-69057yes
DS920+GeminilakeDSM 7.2-64570 Update 3yes
DS920+GeminilakeDSM 7.2-64570 Update 1yes
DS920+GeminilakeDSM 7.2-64570yes
DS920+GeminilakeDSM 7.1.1-42962 Update 5NoUse newer DSM version
DS920+GeminilakeDSM 7.1.1-42962 Update 4NoUse newer DSM version
DS720+GeminilakeDSM 7.2.1-69057 Update 4yes
DS720+GeminilakeDSM 7.2.1-69057yes
DS720+GeminilakeDSM 7.2-64570 Update 3yes
DS720+GeminilakeDSM 7.2-64570yes
DS620slimApollolakeDSM 7.2.1-69057 Update 4NoM.2 panel missing in storage manager
DS420+GeminilakeDSM 7.2.1-69057 Update 4yes
DS420+GeminilakeDSM 7.2-64570yes
19 Series
DS1019+ApollolakeDSM 7.2.1-69057 Update 4yesOnly one M.2 NVMe is supported
DS1019+ApollolakeDSM 7.2-64570 Update 3yesOnly one M.2 NVMe is supported
DS1019+ApollolakeDSM 7.2-64570 Update 1yesOnly one M.2 NVMe is supported
DS1019+ApollolakeDSM 7.2-64570yesOnly one M.2 NVMe is supported
18 Series
DS918+ApollolakeDSM 7.2.1-69057 Update 4yes
DS918+ApollolakeDSM 7.2-64570 Update 3yes
DS918+ApollolakeDSM 7.2-64570yes
DS918+ApollolakeDSM 7.1.1-42962 Update 5NoUse newer DSM version
17 Series
DS3617xsBroadwellDSM 7.xNoNot working with any DSM version
15 Series
DS3615xsBromolowDSM 7.xNoNot working with any DSM version
SA Series
SA6400EPYC7002DSM 7.2.1-69057 Update 4yes

How is this different to the Synology_M2_volume script?

  • Synology_HDD_db:

    • Allows creating an M.2 storage pool and volume all from within Storage Manager with any brand M.2 drive.
    • Works with most '20 series and newer model Synology NAS using DSM 7.2 or later without needing Synology_enable_M2_volume or Synology_M2_volume.
  • Synology_enable_M2_volume:

    • Allows creating an M.2 storage pool and volume all from within Storage Manager with any brand M.2 drive.
    • Gives you the option of SHR and JBOD, as well as RAID 0, RAID 1 and Basic.
    • Enables Health Info for non-Synology NVMe drives.
    • Add drive(s) and change RAID type work from within Storage Manager.
    • RAID repair and expansion work from within Storage Manager.
    • Easy to run as there a no questions to answer.
    • Works with DSM 7.2 beta and 7.1.1 (may work with DSM 7.1 and 7.0).
    • Works with any brand M.2 drives.
    • May only work with models Synology listed as supporting M.2 volumes.
    • Can be scheduled to run at boot or shut down.
    • Does NOT work for M.2 drives in a M2D20, M2D18, M2D17 or E10M20-T1.
    • Does NOT allow creating a storage pool/volume spanning internal NVMe drives and NVMe drives in a Synology M.2 PCIe card.
  • Synology_M2_volume:

    • Creates the synology partitions.
    • Creates the storage pool.
    • Requires you to do an Online Assemble in Storage Manager before you can create your volume.
    • A little more complicated as there are questions that you need to answer.
    • Gives you the option of Basic, RAID 0, RAID 1, RAID 5, RAID 6 and RAID 10.
    • Works with any DSM version.
    • Works with any brand M.2 drives.
    • Works with any Synology model that has M.2 slots or can install a Synology PCIe M.2 card.
    • Works for M.2 drives in a M2D20, M2D18, M2D17 or E10M20-T1.
    • Works for creating a storage pool/volume spanning internal NVMe drives and NVMe drives in a Synology M.2 PCIe card.
    • Can NOT be scheduled to run at boot or shut down.
FeatureSynology_HDD_dbSynology_enable_M2_volumeSynology_M2_volume
DSM versionDSM 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 drivesYesYesYes
Ease of useEasyEasyMedium
Prompts for answersNoNoYes, multiple times
Can be scheduledYesYesNo
Online Assemble requiredNoNoDSM 7 Yes - DSM 6 No
RAID levels supportedBasic, 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 RAIDYes, via Storage ManagerYes, via Storage ManagerNo
Change RAID typeYes, via Storage ManagerYes, via Storage ManagerNo
RAID repairYes, via Storage ManagerYes, via Storage ManagerNo
RAID expansionYes, via Storage ManagerYes, via Storage ManagerNo
NVMe Health InfoYesYesNo
M.2 drive locationInternal M.2 and Synology M.2 PCie cardsInternal M.2 slots onlyInternal M.2 and Synology M.2 PCie cards
Span internal and PCIe NVMesYesNoYes
What it doesEdits a few files in DSMEdits 1 file in DSMCreates partitons on M.2 drive(s)

Note 1: RAID F1 requires a Synology model that supports RAID F1. Or you can enable RAID F1 on other models.

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.

TRIM support:

  • DSM 7.2 and later has no SSD TRIM setting for M.2 RAID 0 storage pools.
  • DSM 7.1.1. has no SSD TRIM setting for M.2 storage pools.

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 <a href=images/before_running_syno_hdd_db.png>unrecognised firmware warnings run <a href=https://github.com/007revad/Synology_HDD_db>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

  • K4LO from the XPenology forum.
  • prt1999 for pointing me to K4LO.
  • capull0 for replacing bc with xargs.

Contributors

007revad

539 commits

mateddy

2 commits

d0c-stranGE

1 commits

Languages

Shell

100.0%