mirror of
https://github.com/007revad/Synology_HDD_db.git
synced 2026-04-25 13:45:59 +03:00
[GH-ISSUE #9] [Enhancement] Change vendor on drives to Synology to enable volume deduplication capabilities #510
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Synology_HDD_db#510
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.
@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.
@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.
https://packages.synocommunity.com/Then run the script and let the script reboot the NAS.
sudo -i /volume1/scripts/syno_enable_m2_volume.shIf 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@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.
@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:
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.
@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"@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
@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"