VMware Cloud Community
sagarnikam123
Contributor
Contributor

How to validate Deduplication and Compression for vSAN using different methods ?

- My encryption is enabled for vSAN & then I enabled deduplication & compression. I don't find any difference for storage before & after (instead I found opposite results)

If I enabled the feature deduplication & compression on vSAN,

How should I validate/check if this works ( I can view vCenter graphical UI charts, but I want another way)

- viewing from ESX cli or using any powerCLI command/script.

- or any other method.

Reply
0 Kudos
2 Replies
ac4gc
VMware Employee
VMware Employee

Hello,

Here is the ESXi CLI script to check the per disk deduplication ratio. Please note that you may not see the saving immediately. Rather start providing the workload and vSAN will save space for you if it can.

localcli vsan storage list | grep 'Group UUID:' | awk '{print $5}'| sort | uniq | while read cache; do dgTotalInflate=''; echo -en "\nCache Tier Disk: $cache\n"; localcli vsan storage list | grep -B1 "Group UUID: $cache"| grep "VSAN UUID:"| awk '{print $3}' | grep -v $cache | while read cap; do diskLogUsed=$(cmmds-tool find -f json -t DISK_STATUS -u $cap | grep content | awk '{print $37}' | sed -e 's/[\t\n\r,]//g'); diskPhysUsed=$(cmmds-tool find -fjson -t DISK_USAGE -u $cap | grep content | awk '{print $19}' | sed -e 's/[\t\n\r,]//g'); dedupRatio=$( awk "BEGIN{ print "$diskLogUsed" / "$diskPhysUsed" }"); dgTotalInflate=$(awk "BEGIN{ print "$dgTotalInflate" + "$diskLogUsed"}"); echo -en "   Capacity Disk: $cap : Dedup Ratio ${dedupRatio}x\n"; dgTotalInflateGB=$(awk "BEGIN{ print "$dgTotalInflate" / 1073741824 * 1.25}"); echo "$dgTotalInflateGB" > /tmp/dgtigb.txt; done; echo -en "      Total Expected Space Inflation: $(cat /tmp/dgtigb.txt)GB\n" ; done

-Ashish

Reply
0 Kudos
Marmotte94
Enthusiast
Enthusiast

Hi,

You can use Console Ruby for vSphere.

Look at this post https://www.virten.net/2017/05/vsan-6-6-rvc-guide-part-1-basic-configuration/

Thank you,

Please, visit my blog http://www.purplescreen.eu/
Reply
0 Kudos