007revad / Synology_enable_Deduplication

Enable deduplication with non-Synology SSDs and unsupported NAS models
MIT License
95 stars 5 forks source link

DSM 7.2 DS2422 64GB #16

Closed techguruz closed 1 year ago

techguruz commented 1 year ago

I am currently getting the following message when trying to run the script ERROR Not enough memory installed for deduplication: 64 MB! I have 64GB of ram, but it's not working for some reason.

007revad commented 1 year ago

It sounds like dmidecode in DSM 7.2 on models with more than 8 drive bays reports memory in GB instead of MB.

What does the following command return? sudo dmidecode -t memory | grep -i 'size'

The Synology_enable_M2_volume also enables data deduplication, and doesn't check the amount of memory. As you've already the Synology_enable_M2_volume script you should have data deduplication available in storage manager.

techguruz commented 1 year ago

when I run sudo dmidecode -t memory | grep -i 'size' I get Size: 32 GB Size: 32 GB I don't have data deduplication available in the storage manager for some reason. Is this only available on NVMe drives or also SSD volumes?

007revad commented 1 year ago

when I run sudo dmidecode -t memory | grep -i 'size' I get Size: 32 GB Size: 32 GB

Excellent. I can change my script to check if it's GB or MB. I'll update the script so it works with MB or GB.

I've done data deduplication on a RAID 1 pair of NVMe drives on my DS1821+ with DSM 7.2 beta. I had to run Synology_HDD_db without the -f or --force option. If you use the -f or --force option you won't see the data deduplication option in storage manager.

Data deduplication requires the storage pool to be using Btrfs and only works on RAID 1 (and not on encrypted volumes). https://kb.synology.com/en-br/DSM/help/DSM/StorageManager/volume_btrfs_dedup?version=7

I just remembered that this script also enables or adds support_btrfs_dedupe="yes" to synoinfo.conf and as you weren't able to run this script due to the false "not enough memory" error support_btrfs_dedupe="yes" would be missing.

Run this command: sudo echo 'support_btrfs_dedupe="yes"' >> /etc.defaults/syninfo.conf

Then check the following command returns "yes": sudo synogetkeyvalue /etc.defaults/syninfo.conf support_btrfs_dedupe

You should now have deduplication available in storage manager for any RAID 1 Btrfs storage pool consisting of SSD/NVMe drives.

techguruz commented 1 year ago

When I Run this command: sudo echo 'support_btrfs_dedupe="yes"' >> /etc.defaults/syninfo.conf I get -sh: /etc.defaults/syninfo.conf: Permission denied

I think synology have put things in place to stop users from editing the file in the 7.2 update.

I am using Btrfs ut not raid 1 so that explains why I am not seeing that option.

007revad commented 1 year ago

Are you using the newest 7.2-64570 or the previous 7.2-64561 ?

techguruz commented 1 year ago

7.2-64570

007revad commented 1 year ago

Try the following commands:

sudo -i

synosetkeyvalue /etc.defaults/synoinfo.conf support_btrfs_dedupe yes

synogetkeyvalue /etc.defaults/synoinfo.conf support_btrfs_dedupe

007revad commented 1 year ago

Can you also try:

sudo -i synogetkeyvalue /etc.defaults/synoinfo.conf mem_max_mb

sudo -i synogetkeyvalue /etc.defaults/synoinfo.conf mem_max_gb

techguruz commented 1 year ago

that one did the trick cheers buddy

techguruz commented 1 year ago

Can you also try:

sudo -i synogetkeyvalue /etc.defaults/synoinfo.conf mem_max_mb

sudo -i synogetkeyvalue /etc.defaults/synoinfo.conf mem_max_gb

so sudo -i synogetkeyvalue /etc.defaults/synoinfo.conf mem_max_mb gives me 32768

but sudo -i synogetkeyvalue /etc.defaults/synoinfo.conf mem_max_gb give me nothing at all

techguruz commented 1 year ago

thinking about it could have something to do with the max officially supported memory being 32GB but I am running 64GB so could be throwing things off

007revad commented 1 year ago

It looks like dmidecode in 7.2-64570 reports the installed memory size in GB (instead of MB like in previous DSM 7 versions including 7.2-64561). But the max memory in synoinfo.conf is still in MB.

This is 4th or 5th thing I've seen in DSM 7.2 that looks like Synology is trying to break my scripts.

techguruz commented 1 year ago

To be fair it does seem like Synology change things just to make things difficult for people using scripts and unsupported hardware.

007revad commented 1 year ago

I've released a new version that fixes GB/MB issue. https://github.com/007revad/Synology_enable_Deduplication/releases/tag/v1.0.9

techguruz commented 1 year ago

cheers buddy working as intended

007revad commented 1 year ago

cheers buddy working as intended

Thanks for the feedback.