mirror of
https://github.com/007revad/Synology_enable_Deduplication.git
synced 2026-04-25 12:46:03 +03:00
[GH-ISSUE #67] Deduplication info not visible for volumes in storage manager #12
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Synology_enable_Deduplication#12
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 @ThomasGoering on GitHub (Apr 29, 2024).
Original GitHub issue: https://github.com/007revad/Synology_enable_Deduplication/issues/67
Originally assigned to: @007revad on GitHub.
I successfully enabled btrfs data deduplication for my two hdd volumes with the script on my DS920+ running DSM 7.2.1-69057 Update 3. I use it for my two volumes that are on hdd-only storage pools and it seems that it is working fine.
But I don't see any deduplication info. I just see file system and total capacity. Deduplication status and savings are missing.
From what I found out so far in file storage_panel.js, it seems that this.dedup_info.show is always false. Even if it would be true it wouldn't display the correct status because this.dedup_info.status is "disable" (but it should be "auto" for two volumes). Unfortunately I have not found out where these values come from.
Is something missing on my DS920+? It would be great if the deduplication info can be displayed in storage manager.
@007revad commented on GitHub (Apr 29, 2024):
I can't test it until tomorrow because my DS1821+ is doing a data scrub, and the drives from my DS720+ are currently connected to a PC for developing my Synology_Recover_Data script.
What we need to change may be in storage_panel.js or
storage_wizard.jsstorage.js@007revad commented on GitHub (Apr 29, 2024):
I don't know which image from #25 you are referring to because I can't see your screenshot. All I get is a webpage saying "This private-user-images.githubusercontent.com page can’t be found".
@007revad commented on GitHub (Apr 30, 2024):
Out the 43,000 lines in storage_panel.js only 371 line contain the word dedupe.
If we search for dedupe related functions there are only 23.
My javascript knowledge is very basic so I use ChatGPT to tell me what the function is doing 😄
ChatGPT said:
"This JavaScript function showDedupInfo seems to be a getter function for a property dedup_info within some object. Here's what it does:
It checks if this.dedup_info exists and is truthy (!!this.dedup_info). The double negation !! is a common way to coerce any value to a Boolean.
If this.dedup_info is truthy, it then checks if this.dedup_info.show is also truthy.
It returns true if both conditions are met (both this.dedup_info and this.dedup_info.show are truthy), otherwise it returns false.
So, essentially, this function is checking whether dedup_info exists and if its show property is also truthy, returning true if both conditions are met, and false otherwise."
So I would try:
Or this:
Or even this:
showDedupRate may also play a part in what is shown or when:
@ThomasGoering commented on GitHub (Apr 30, 2024):
I'm sorry, the link included my session data I assume. Here's the screenshot I was referring to:
@ThomasGoering commented on GitHub (Apr 30, 2024):
In the meantime I looked deeper into storage_panel.js and I doubt that the deduplication info can fully be enabled just by changing the JavaScript. It's like with "&&e.dedup_info.show_config_btn" that you removed to enable hdd support.
debug_infoget its values from a web service call:Then
dis an array (of volumes). In my case it contains (in reverse order!) my three volumes (one ssd volume and the two hdd volumes mentioned above) and e.g.d[2].dedup_infolooks like this (this is one of my hdd volumes - in fact it is volume1 - that has data deduplication enabled and already ran it manually and automatic at the moment as well):So all these values indicate that data deduplication is not active for this volume but it is! This might be because it's an hdd volume.
Only for my ssd volume
dedup_info.show_config_btnis true. That's why you removed the check for it: To support data deduplication for hdd volumes.With that being said, in my opinion it doesn't help to remove or change checks for
dedup_info.showordedup_info.status. Even if this would display something it wouldn't display the correct values, because e.g. the real savings are not indedup_info.To fix all this it must be fixed in the web service implementation on the DS. Is it known if this is something that can be achieved?
@007revad commented on GitHub (Apr 30, 2024):
What are we looking at in that screenshot? Is something missing?
@ThomasGoering commented on GitHub (Apr 30, 2024):
Nothing is missing in the screenshot, which I took from issue #25 just to show what is missing in my Storage Manager.
In the screenshot there's the expanded volume, and its "Info" includes "Deduplication status:" and "Deduplication savings:".
These two are missing for my dedupe-enabled hdd volumes. I only see "File system:" and "Total capacity:".
@007revad commented on GitHub (Apr 30, 2024):
Ah, that's what the screenshots in issue #25 were showing. I only noticed the choices in the ... menu. I didn't notice that the "Deduplication status:" and "Deduplication savings:" were missing under the "Info" section. I don't think I've seen them before. I never realised something was missing.
I can't find SYNO.Storage.CGI.Storage in DSM 7.2.1 with Update 1 or in Storage Manager 1.0.0-0017
Storage Manager 1.0.0-0017 does have /usr/local/packages/@appstore/StorageManager/webapi/SYNO.Storage.CGI.lib
And for DSM 7.2 where Storage Manager was part of DSM it's /usr/syno/synoman/webman/modules/StorageManager/SYNO.Storage.CGI.lib
@ThomasGoering commented on GitHub (Apr 30, 2024):
My understanding so far is:
SYNO.Storage.CGI.Storageis "defined" in SYNO.Storage.CGI.lib (which is JSON). It is an API and has a methodload_info. If it is called it returns a JSON that includes - among all the other storage pool and volume information - thededup_infoobject for each volume.libStorage.so also contains
load_infobut then I don't know. I haven't founddedup_infoin a file yet on the DS (other than in storage_panel.js). And if found it might be the JSON renderer which wouldn't probably help a lot. But I'll keep digging...This is another way of calling
load_info:There is another API called when you click "Configure Data Deduplication" in Storage Manager. Using
synowebapiand two volumes - instead of one volume when called from Storage Manager - it would be:It is strange that deduplication works in general but
load_infodoesn't seem to be aware of it...Last update here:
I found
dedup_infoin/lib/libsynostoragemgmt.so. It contains symbolSYNOBtrfsDedupeAllowedSSDModelsGet, so it seems it does something similar in the web service than the Storage Manager does in the browser (see issue #46). I had a quick look at the file with IDA free (first time using it) but don't know if it is implemented in this lib or it is called in another one. Here my capabilities are limited but maybe it helps whoever wants to dig into it...@007revad commented on GitHub (May 1, 2024):
I just played around with deduplication on an NVMe volume.
For manual deduplication "Deduplication status" shows the last run time and there is no "Deduplication savings".
For automatic deduplication "Deduplication status" shows Automatic and "Deduplication savings" shows either:
For the NVMe volume with automatic deduplication enabled but not run yet
debug_infois:For the same NVMe volume with automatic deduplication disabled, and after manually running deduplication
debug_infois:It sounds like I need to edit /lib/libsynostoragemgmt.so so that SYNOBtrfsDedupeAllowedSSDModelsGet returns true.
@007revad commented on GitHub (May 1, 2024):
When I run the following command with just HDD volumes in the NAS:
the first line is always:
But when I run that command with an SSD volume in the NAS there was no [Line 295] error.
SYNO.Storage.CGI.lib contains a single line, so I'm not sure if it's a synowebapi error or not.
@ThomasGoering commented on GitHub (May 1, 2024):
Maybe it's not indicating an error but just echoing what it's doing?
I have two HDD volumes and one SSD volume in my DS920+ (and DX517) and get
[Line 295] Exec WebAPI...in the first line of the output from bothsynowebapicalls that I mentioned in my last comment.@007revad commented on GitHub (May 2, 2024):
The results from googling for
[Line 295] +"Exec WebAPI"seem to suggest that[Line 295] Exec WebAPI...is normal. It's just strange that it was missing after I created an SSD volume. Though I am getting that first line today even thought I've changed nothing (I still have 2 HDD volumes and an NVMe volume).@cb12tre commented on GitHub (Sep 4, 2024):
I also tried creating two volumes with deduplication, one on an HDD and one on an NVMe. However, deduplication info is not displayed for the HDDs. The system is a 920+ running DSM 7.2.1-69057 Update 5, with Storage Manager 1.0.0-0017.
While not essential for functionality, having this information would be very convenient.
@cb12tre commented on GitHub (Sep 14, 2024):
I was wondering if it's possible to view deduplication statistics via SSH since they aren't directly visible in the graphical interface?
@ChengYen-Tang commented on GitHub (Oct 22, 2024):
Hi @007revad,


Why, I don't see any deduplication information
@ChengYen-Tang commented on GitHub (Oct 22, 2024):
By the way, my deduplication rate feels pathetic.😥


My ISO folder contains a large number of Windows, Windows Server, Office ISOs. In theory, this should have a high deduplication rate.
@007revad commented on GitHub (Nov 4, 2024):
@ChengYen-Tang
I haven't figured out how to show "Deduplication status" and "Deduplication savings" in the volume's info panel for HDDs.