007revad / Synology_M2_volume

Easily create an M.2 volume on Synology NAS
MIT License
810 stars 56 forks source link

RAID 1 instead of Single with a single M2 device #96

Closed Fredzxda closed 10 months ago

Fredzxda commented 10 months ago

Hello, I try dry run mode and the result is surprising me. There is only a RAID1 mode instead of Single mode.

Synology_M2_volume v1.3.15
DS923+ DSM 7.2-64570-3

Using options: -all
Type yes to continue. Type anything else to do a dry run test.
mlkj
*** Doing a dry run test ***

NVMe M.2 nvme0n1 is WD Red SN700 500GB
WARNING Drive has a cache partition

Unused M.2 drives found: 1

1) nvme0n1
2) Done
Select the M.2 drive: 1
You selected nvme0n1

Ready to create RAID 1 volume group using nvme0n1

WARNING Everything on the selected M.2 drive(s) will be deleted.
        *** Not really because we're doing a dry run ***
Type yes to continue. Type anything else to quit.
yes
You chose to continue. You are brave! :)

Using md5 as it's the next available.

Creating Synology partitions on nvme0n1
synopartition --part /dev/nvme0n1 13

Creating the RAID array. This will take a while...
mdadm --create /dev/md5 --level=1 --raid-devices=1 --force /dev/nvme0n1p3
      [====================>]  resync = 100%

Resync Duration: 4 sec

Creating a physical volume (PV) on md5 partition
pvcreate -ff /dev/md5

Creating a volume group (VG) on md5 partition
vgcreate vg5 /dev/md5

M.2 volume support already enabled.

Steps you need to do after running this script:
  1. After the restart go to Storage Manager and select online assemble:
       Storage Pool > Available Pool > Online Assemble
  2. Create the volume as you normally would:
       Select the new Storage Pool > Create > Create Volume
  3. Optionally enable TRIM:
       Storage Pool > ... > Settings > SSD TRIM
     SSD TRIM option is only available in DSM 7.2 Beta for RAID 1

Important
If you later upgrade DSM and your M.2 drives are shown as unsupported
and the storage pool is shown as missing, and online assemble fails,
you should run the Synology HDD db script:
https://github.com/007revad/Synology_HDD_db

Online assemble option may not appear in storage manager     until you reboot.
Type yes to reboot now.
Type anything else to quit (if you will reboot it yourself).
lgh

Is it a problem ? Can I continue ? Thank you for your great job.

007revad commented 10 months ago

In DSM a single drive (Basic) actually uses RAID 1. So it will be okay....

With a DS923+ you don't need to use syno_m2_volume. Synology_HDD_db will allow you to create a NVMe storage pool and volume from Storage Manager.

Fredzxda commented 10 months ago

I confirm it is working. Thanks a lot for this awesome work.