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.
It will work for DSM 7.2 beta 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:
Model | DSM version | Works |
---|---|---|
DS923+ | DSM 7.1.1-42962 Update 4 | yes |
DS3622xs+ | DSM 7.2-64216 Beta | yes |
DS3622xs+ | DSM 7.1.1-42962 Update 4 | yes |
RS4021xs+ | DSM 7.1.1-42962 Update 2 | yes |
DS1821+ | DSM 7.2-64216 Beta | yes |
DS1821+ | DSM 7.2-64213 Beta * | yes |
DS1821+ | DSM 7.1.1-42962 Update 4 | ? |
DS1522+ | DSM 7.1.1-42962 Update 4 | NO |
DS920+ | DSM 7.2-64216 Beta | yes |
DS920+ | DSM 7.1.1-42962 Update 5 | NO |
DS920+ | DSM 7.1.1-42962 Update 4 | NO |
DS918+ | DSM 7.1.1-42962 Update 5 | NO |
How is this different to the Synology_M2_volume script?
-
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. And maybe RAID 5 and SHR-2 if you have 4 M.2 drives.
- 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.
-
- 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 and RAID 5.
- Works with any DSM version (DSM 6 is still WIP).
- Works with any brand M.2 drives.
- Works with any Synology model that has M.2 slots or can install a PCIe M.2 card.
Feature | Synology_enable_M2_volume | Synology_M2_volume |
---|---|---|
Ease of use | Easy | Medium |
Prompts for answers | No | Yes, multiple times |
Online Assemble required | No | Yes |
RAID levels supported | Basic, RAID 0, RAID 1, SHR, JBOD, RAID F1 (see Note) | Basic, RAID 0, RAID 1, RAID 5 |
Non-Synology M.2 drives | Yes | Yes |
DSM version | DSM 7.2 beta and 7.1.1, and maybe DSM 7.1 and 7.0 | Any DSM version (DSM 6 is WIP) |
Synology Models | Maybe only models listed as supported by Synology | Any with M.2 slots or M.2 cards |
What it does | Temporarily changes 1 file in DSM | Creates partitons on M.2 drive(s) |
Note: RAID F1 requires that RAID F1 is enabled on your Synology model.
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.
Because the bc command is not included in DSM you need to install SynoCli misc. Tools from SynoCommunity for this script to work.
- Package Center > Settings > Package Sources > Add
- Name: SynoCommunity
- Location:
https://packages.synocommunity.com/
- Click OK and OK again.
- Click Community on the left.
- Install SynoCli misc. Tools
See How to download the script for the easiest way to download the script.
Note: Replace /volume1/scripts/ with the path to where the script is located.
- Run the script then reboot the Synology:
sudo -i /volume1/scripts/syno_enable_m2_volume.sh
- 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
-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 -i /path-to-script/syno_hdd_db.sh --noupdate
After any DSM update you will need to run this script, and the Synology_HDD_db script again.
Or you can schedule both Synology_enable_M2_volume and Synology_HDD_db to run when the Synology shuts down, to avoid having to remember to run both scripts after a DSM update.
See How to schedule a script in Synology Task Manager
Here's the result after running the script and rebooting. Note that the stroage 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