0 / 0
Skip to content

Unlocking NVMe SSDs as Storage Volumes in Synology DS920+

Introduction

When Synology released the DS920+, many users (myself included) were excited about the two built-in NVMe slots. However, we quickly discovered a limitation: through the DSM interface, these NVMe SSDs can only be configured as cache drives, not as dedicated storage volumes.

This restriction is unfortunate because NVMe SSDs offer exceptional performance that would be ideal for running applications like Docker containers, virtual machines, or databases. While SSD caching can improve performance in some scenarios, having a dedicated high-speed storage volume is often more beneficial for specific workloads.

Update (March 2024): This guide has been tested and confirmed working with DSM 7.2.1-69057 Update 3. For users who experienced errors after rebooting, the script that updates DSM devices has resolved these issues.

Storage Manager Overview - M.2 Slot Transparent

NVMe SSD in DSM - Initial State

Storage Manager Overview - M.2 Slot Transparent

Why Use NVMe SSDs as Storage Instead of Cache?

Before we dive into the technical steps, let’s understand why you might want to use your NVMe drives as storage volumes rather than cache:

  1. Direct Performance Benefits: Applications stored on NVMe drives get the full speed advantage without the overhead of cache management.
  2. Predictable Performance: Cache performance depends on hit rates and algorithms, while direct storage provides consistent performance.
  3. Better for Specific Workloads: Docker containers, databases, and VMs benefit more from dedicated high-speed storage than from caching.
  4. Full Capacity Utilization: Use the entire capacity of your NVMe drives rather than just a portion for caching.

Prerequisites

  • A Synology DS920+ (or similar model with NVMe slots)
  • One or two NVMe SSDs installed in the M.2 slots
  • SSH access enabled on your Synology NAS
  • Basic knowledge of Linux command line
  • A complete backup of your important data (this procedure involves some risk)

Step 1: Install Your NVMe SSDs

If you haven’t already, install your NVMe SSDs in the M.2 slots on the bottom of your DS920+ and boot up the system. When you check Storage Manager, you’ll notice:

  • In the Overview, the M.2 slots will appear with a transparent or outlined icon
  • The system recognizes the NVMe drives but only offers them as cache devices

NVMe SSD shown as cache device

Step 2: Enable SSH Access

If you haven’t already enabled SSH access:

  1. Open the Control Panel
  2. Navigate to Terminal & SNMP
  3. Select the Terminal tab
  4. Check Enable SSH service
  5. Click Apply

Enable SSH in DSM

Step 3: Connect via SSH and Prepare the NVMe Drives

Connect to your Synology NAS using SSH with an admin account, then switch to root:

bash
ssh admin@your-nas-ip
sudo -i

First, identify your NVMe drives:

bash
ls -la /dev/nvme*

You should see devices like /dev/nvme0n1 and /dev/nvme1n1 (if you have two NVMe drives installed).

Check the current partition status:

bash
fdisk -l /dev/nvme0n1

Now, we’ll create the proper Synology partitions on the NVMe drive(s):

bash
synopartition --part /dev/nvme0n1 12

If you have two NVMe drives and want to use them in RAID 1 for redundancy, repeat for the second drive:

bash
synopartition --part /dev/nvme1n1 12

Verify the partitions were created correctly:

bash
fdisk -l /dev/nvme0n1

You should see multiple partitions including /dev/nvme0n1p1, /dev/nvme0n1p2, and /dev/nvme0n1p3.

Step 4: Create a Storage Pool

Now we’ll create a storage pool using the NVMe drive(s). First, check the current RAID configuration:

bash
cat /etc/space_dev_list

For a Single NVMe Drive (Basic Volume):

bash
mdadm --create /dev/md2 --level=single --raid-devices=1 /dev/nvme0n1p3

For Two NVMe Drives (RAID 1):

bash
mdadm --create /dev/md2 --level=raid1 --raid-devices=2 /dev/nvme0n1p3 /dev/nvme1n1p3

Monitor the RAID creation process:

bash
cat /proc/mdstat

Wait until the process completes (it should be relatively quick for new drives).

Step 5: Mark the Drives as SSDs

By default, Synology might treat these as spinning drives. Let’s mark them correctly as SSDs:

bash
echo "1" > /sys/block/nvme0n1/queue/rotational

If you have two drives:

bash
echo "1" > /sys/block/nvme1n1/queue/rotational

Step 6: Create a File System

Create a Synology-compatible file system on the new RAID device:

bash
mkfs.ext4 -O extent,64bit -E lazy_itable_init=1 /dev/md2

Step 7: Reboot and Assemble the Volume in DSM

Now reboot your Synology NAS:

bash
reboot

After the reboot:

  1. Open Storage Manager
  2. Navigate to Storage tab
  3. You should see a new Available Pool
  4. Click the three-dot menu (...) next to it and select Online Assemble
  5. Click Apply to confirm

Available Pool in Storage Manager

The system will process for a moment, and you’ll have a new storage pool and volume available in DSM.

Storage Pool 2 being optimized

Step 8: Optimizing Your New NVMe Storage

Now that you have a high-performance NVMe storage volume, here are some ideal uses for it:

Healthy Storage Pool

Moving Docker to NVMe Storage

Docker containers benefit tremendously from the speed of NVMe storage. To move your Docker data:

  1. Stop the Docker package in Package Center
  2. Navigate to Control Panel > Shared Folders
  3. Create a new shared folder on your NVMe volume (e.g., "docker")
  4. Copy your existing Docker data:
    bash
    cp -rp /volume1/docker/* /volume2/docker/
  5. Update the Docker configuration to use the new location
  6. Restart the Docker package

Other Ideal Uses for NVMe Storage

  • Virtual Machines: Move your VMs to the NVMe volume for faster boot and operation
  • Databases: Databases like MariaDB, MongoDB, or PostgreSQL
  • Media Transcoding: Temporary transcoding directories for Plex or other media servers
  • Development Environments: Code repositories and build environments

Troubleshooting

Issue: Volume Disappears After DSM Update

After a DSM update, you might need to reassemble the volume:

  1. Connect via SSH
  2. Run cat /proc/mdstat to check RAID status
  3. If needed, reassemble the RAID:
    bash
    mdadm --assemble /dev/md2 /dev/nvme0n1p3
    or for RAID 1:
    bash
    mdadm --assemble /dev/md2 /dev/nvme0n1p3 /dev/nvme1n1p3
  4. Reboot and use the Online Assemble option in DSM

Issue: Performance Degradation

If you notice performance degradation over time:

  1. Check SMART data for your NVMe drives
  2. Consider enabling TRIM:
    bash
    fstrim -v /volume2
  3. Add a scheduled task to run TRIM weekly

Conclusion

By following this guide, you’ve unlocked the full potential of your NVMe SSDs in the Synology DS920+, converting them from limited cache devices to high-performance storage volumes. This configuration is particularly beneficial for I/O-intensive applications like Docker containers, databases, and virtual machines.

While this approach isn’t officially supported by Synology, it has proven stable across multiple DSM updates for many users. Just remember to keep good backups of your data, especially before major DSM updates.

Have you tried using NVMe drives as storage on your Synology NAS? Share your experience in the comments below!


Note: The original version of this guide was published on my blog in February 2022. This is an updated and expanded version with clearer instructions and additional troubleshooting tips.