[GH-ISSUE #9] [Enhancement] Change vendor on drives to Synology to enable volume deduplication capabilities #510

Closed
opened 2026-03-11 11:31:04 +03:00 by kerem · 7 comments
Owner

Originally created by @jayanty on GitHub (Mar 14, 2023).
Original GitHub issue: https://github.com/007revad/Synology_HDD_db/issues/9

DSM 7 allows volume deduplication to be enabled for selected NAS models, but only if Synology branded drives are used. I was wondering if there's a way to change the vendor name returned by a drive to make it look like a Synology drive. My test NAS is a Xpenology RS4021xs+ which should be capable of deduplication if the correct drive is presented.

Originally created by @jayanty on GitHub (Mar 14, 2023). Original GitHub issue: https://github.com/007revad/Synology_HDD_db/issues/9 DSM 7 allows volume deduplication to be enabled for selected NAS models, but only if Synology branded drives are used. I was wondering if there's a way to change the vendor name returned by a drive to make it look like a Synology drive. My test NAS is a Xpenology RS4021xs+ which should be capable of deduplication if the correct drive is presented.
kerem 2026-03-11 11:31:04 +03:00
Author
Owner

@007revad commented on GitHub (Mar 30, 2023):

I think there may be another way to get deduplication to work with non-Synology drives.

I'm currently working on getting DSM to allow creating NVMe storage pools on non-Synology M.2 drives by editing 2 bytes in a file (after backing it up). I have it working by doing a lot of manual work to find the correct bytes to edit because they are different, and in a different location, in each DSM build. To automate this I am writing a script to find the correct bytes to edit so the script can edit them.

I suspect there may be similar bytes that can be edited to enable deduplication to work with non-Synology drives.

<!-- gh-comment-id:1491054559 --> @007revad commented on GitHub (Mar 30, 2023): I think there may be another way to get deduplication to work with non-Synology drives. I'm currently working on getting DSM to allow creating NVMe storage pools on non-Synology M.2 drives by editing 2 bytes in a file (after backing it up). I have it working by doing a lot of manual work to find the correct bytes to edit because they are different, and in a different location, in each DSM build. To automate this I am writing a script to find the correct bytes to edit so the script can edit them. I suspect there may be similar bytes that can be edited to enable deduplication to work with non-Synology drives.
Author
Owner

@007revad commented on GitHub (Apr 2, 2023):

The more I think about it the more I think my new Synology_enable_M2_volume script might allow using Btrfs deduplication with no-Synology SSD drives. Do you want to try it?

https://github.com/007revad/Synology_enable_M2_volume

Because the bc command is not included in DSM you need to install SynoCli misc. Tools from SynoCommunity for this script to work.

  1. Package Center > Settings > Package Sources > Add
  2. Name: SynoCommunity
  3. Location: https://packages.synocommunity.com/
  4. Click OK and OK again.
  5. Click Community on the left.
  6. Install SynoCli misc. Tools

Then run the script and let the script reboot the NAS.

sudo -i /volume1/scripts/syno_enable_m2_volume.sh

If it doesn't enable using deduplication with non-Synology SSDs you can run the script again with the --restore option to undo the change it made. Make sure you let the script reboot the NAS, or use the power button on the NAS.

sudo -i /volume1/scripts/syno_enable_m2_volume.sh --restore

<!-- gh-comment-id:1493193378 --> @007revad commented on GitHub (Apr 2, 2023): The more I think about it the more I think my new Synology_enable_M2_volume script might allow using Btrfs deduplication with no-Synology SSD drives. Do you want to try it? https://github.com/007revad/Synology_enable_M2_volume Because the bc command is not included in DSM you need to install SynoCli misc. Tools from SynoCommunity for this script to work. 1. Package Center > Settings > Package Sources > Add 2. Name: SynoCommunity 3. Location: `https://packages.synocommunity.com/` 4. Click OK and OK again. 5. Click Community on the left. 6. Install SynoCli misc. Tools Then run the script and let the script reboot the NAS. `sudo -i /volume1/scripts/syno_enable_m2_volume.sh` If it doesn't enable using deduplication with non-Synology SSDs you can run the script again with the --restore option to undo the change it made. Make sure you let the script reboot the NAS, or use the power button on the NAS. `sudo -i /volume1/scripts/syno_enable_m2_volume.sh --restore`
Author
Owner

@jayanty commented on GitHub (Apr 2, 2023):

That works on my unit. Deduplication is now available to me!
Curious if this will work on a Synology unit that does not have M.2 slots in it, just to enable deduplication. I have a couple RS815+ units that store infrequently used data - Those units don't even have a deduplication option available.

Script output below

Synology_enable_M2_volume v1.0.3
RS4021xs+ DSM 7.1.1-42962-2

Backup successful.

Checking file.
181950 = 2c6be
0002c6be: 803E 00B8 0100 0000 7520 488B

Editing file.

Checking if file was successfully edited.
181950 = 2c6be
0002c6be: 803E 00B8 0100 0000 9090 488B
File successfully edited.

You can now create your M.2 storage pool in Storage Manager.

The Synology needs to restart.
You MUST reboot via SSH or the power button on the NAS.
Type yes to reboot now.

<!-- gh-comment-id:1493199253 --> @jayanty commented on GitHub (Apr 2, 2023): That works on my unit. Deduplication is now available to me! Curious if this will work on a Synology unit that does not have M.2 slots in it, just to enable deduplication. I have a couple RS815+ units that store infrequently used data - Those units don't even have a deduplication option available. Script output below Synology_enable_M2_volume v1.0.3 RS4021xs+ DSM 7.1.1-42962-2 Backup successful. Checking file. 181950 = 2c6be 0002c6be: 803E 00B8 0100 0000 7520 488B Editing file. Checking if file was successfully edited. 181950 = 2c6be 0002c6be: 803E 00B8 0100 0000 9090 488B File successfully edited. You can now create your M.2 storage pool in Storage Manager. The Synology needs to restart. You MUST reboot via SSH or the power button on the NAS. Type yes to reboot now.
Author
Owner

@007revad commented on GitHub (Apr 2, 2023):

What DSM version are your RS815+ NASes running?

The bytes that need editing exist in DSM versions from 6.2.4 to 7.2 beta

Data deduplication requires 2 SSD drives. They can be SATA SSDs, SATA M.2 drives or NVMe drives.

Officially only the following Synology models support data deduplication:

  • RS4021xs+, RS3621xs+, RS3621RPxs (the last 2 require 16GB of memory)
  • FS6400, FS3600, FS3410, FS3400
  • SA6400, SA3610, SA3600, SA3410, SA3400

It would be interesting to see the data deduplication capability exists in DSM versions for other models. Maybe it's a setting that needs to be enabled.

<!-- gh-comment-id:1493218730 --> @007revad commented on GitHub (Apr 2, 2023): What DSM version are your RS815+ NASes running? The bytes that need editing exist in DSM versions from 6.2.4 to 7.2 beta Data deduplication requires 2 SSD drives. They can be SATA SSDs, SATA M.2 drives or NVMe drives. Officially only the following Synology models support data deduplication: - RS4021xs+, RS3621xs+, RS3621RPxs (the last 2 require 16GB of memory) - FS6400, FS3600, FS3410, FS3400 - SA6400, SA3610, SA3600, SA3410, SA3400 It would be interesting to see the data deduplication capability exists in DSM versions for other models. Maybe it's a setting that needs to be enabled.
Author
Owner

@007revad commented on GitHub (Apr 2, 2023):

I've been able to make the Data Deduplication option appear on my DS1821+

All I did was run the following command, which should work on your RS815+ as long they're running some version of DSM 7 and have 16GB of memory or more.

echo 'support_btrfs_dedupe="yes"' >> "/etc.defaults/synoinfo.conf"

<!-- gh-comment-id:1493226362 --> @007revad commented on GitHub (Apr 2, 2023): I've been able to make the Data Deduplication option appear on my DS1821+ All I did was run the following command, which should work on your RS815+ as long they're running some version of DSM 7 and have 16GB of memory or more. `echo 'support_btrfs_dedupe="yes"' >> "/etc.defaults/synoinfo.conf"`
Author
Owner

@aferende commented on GitHub (Apr 2, 2023):

@007revad Data Dedplication could be also activated on classic HDDs different than NVME?
Can data be deduplicated without lossing data on existing storage pool?
I run script to enable data deduplication and rebooted NAS but in Storage Manager I cannot see any option (Configure Data Deduplication) in any volumes make data deduplication.
I have DS1821+ and all volumes are on brtfs

<!-- gh-comment-id:1493315945 --> @aferende commented on GitHub (Apr 2, 2023): @007revad Data Dedplication could be also activated on classic HDDs different than NVME? Can data be deduplicated without lossing data on existing storage pool? I run script to enable data deduplication and rebooted NAS but in Storage Manager I cannot see any option (Configure Data Deduplication) in any volumes make data deduplication. I have DS1821+ and all volumes are on brtfs
Author
Owner

@007revad commented on GitHub (Apr 2, 2023):

@aferende Data deduplication requires at least one Btrfs volume that only consists of SSDs. They can be SATA SSDs or NVMe SSDs.

You need to run the following command to enable depuduplication:

echo 'support_btrfs_dedupe="yes"' >> "/etc.defaults/synoinfo.conf"

<!-- gh-comment-id:1493411080 --> @007revad commented on GitHub (Apr 2, 2023): @aferende Data deduplication requires at least one Btrfs volume that only consists of SSDs. They can be SATA SSDs or NVMe SSDs. You need to run the following command to enable depuduplication: `echo 'support_btrfs_dedupe="yes"' >> "/etc.defaults/synoinfo.conf"`
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Synology_HDD_db#510
No description provided.