Enabling Compression on a SnapVault Secondary Volume

I was a bit curious about the effects of doing this after having encountered a warning when doing it via the CLI, so did a quick experiment to learn nothing much really happens. Initially, everything is locked away by Snapshots; it is only as new data comes across that the compression can be applied followed by dedupe on the new data which is rehydrated (if required*) from the deduped source.

*If volume efficiency is run on the new source data after the new data has gone to the vault, that data has never been deduped, so doesn’t require rehydration (at least that’s my theory - set volume efficiency on the primary to run after the vault is taken)!

The Lab Output

1) Create a volume efficiency policy on the source:

PRICLU1::> volume efficiency policy create -vserver PRICLU1V1 -policy 0010_for_6hrs -schedule daily -enabled true -qos-policy background -duration 6
PRICLU1::> volume efficiency policy show -vserver PRICLU1V1

                      Job        Duration QoS
Vserver  Policy Name  Schedule   (Hours)  Policy      Enabled
-------- ------------ ---------- -------- ----------- -------
PRICLU1V1
         0010_for_6hrs
                      daily      6        background  true  

2) Show there is currently no deduped data:

PRICLU1::> volume show-space -vserver PRICLU1V1 -volume v_PKD

                        Vserver: PRICLU1V1
                    Volume Name: v_PKD
                      User Data: 253.3MB
              User Data Percent: 12%
                  Deduplication: -
          Deduplication Percent: -
        Temporary Deduplication: -
Temporary Deduplication Percent: -
                     Total Used: 312.3MB
             Total Used Percent: 15%

3) Enable volume efficiency on the source:

PRICLU1::> volume efficiency on -vserver PRICLU1V1 -volume v_PKD

Efficiency for volume "v_PKD" of Vserver "PRICLU1V1" is enabled.
Already existing data could be processed by running "volume efficiency start -vserver PRICLU1V1 -volume v_PKD -scan-old-data true".

PRICLU1::> volume efficiency start -vserver PRICLU1V1 -volume v_PKD -scan-old-data true

Warning: This operation scans all of the data in volume "v_PKD" of Vserver "PRICLU1V1". It may take a significant time, and may degrade performance during that time. Do you want to continue? {y|n}: y
The efficiency operation for volume "v_PKD" of Vserver "PRICLU1V1" has started.                                                                                

PRICLU1::> volume efficiency show -vserver PRICLU1V1

Vserver    Volume           State    Status       Progress           Policy
---------- ---------------- -------- ------------ ------------------ ----------
PRICLU1V1  v_PKD            Enabled  Active       257240 KB Scanned  -

PRICLU1::> volume efficiency show -vserver PRICLU1V1

Vserver    Volume           State    Status       Progress           Policy
---------- ---------------- -------- ------------ ------------------ ----------
PRICLU1V1  v_PKD            Enabled  Idle         Idle for 00:38:54  -

PRICLU1::> volume efficiency modify -vserver PRICLU1V1 -volume v_PKD -policy 0010_for_6hrs
PRICLU1::> volume show-space -vserver PRICLU1V1 -volume v_PKD

                        Vserver: PRICLU1V1
                    Volume Name: v_PKD
                      User Data: 253.3MB
              User Data Percent: 12%
                  Deduplication: 12KB
          Deduplication Percent: 0%
        Temporary Deduplication: -
Temporary Deduplication Percent: -
                     Total Used: 312.5MB
             Total Used Percent: 15%

Note: The dedupe is a tiny 12KB because dedupe was enabled after Snapshots - which had previously been taken. Best practice is to enable dedupe before Snapshots are taken - but it will still dedupe the new stuff if we turn it on after!

4) Create a Snapshot with a Snapmirror label that’s part of the SnapVault policy - so it will be vaulted when we do a SnapMirror update - and run the SnapMirror update from the SnapVault destination:

PRICLU1::> volume snapshot create -vserver PRICLU1V1 -volume v_PKD -snapshot daily.2014-08-19_2058 -snapmirror-label daily

PRICLU2::> snapmirror update *
Operation is queued: snapmirror update of destination "PRICLU2V1:v_PKD".
1 entry was acted on.

PRICLU2::> snapmirror show
                                                                      
Source            Destination  Mirror  Relationship  Total           
Path        Type  Path         State   Status        Progress  Healthy
----------- ---- ------------ ------- -------------- --------- -------
PRICLU1V1:v_PKD
            XDP  PRICLU2V1:v_PKD
                              Snapmirrored
                                      Idle           -         true  

5) Even though the data is deduped on the destination (deduped changes are carried across from the source), dedupe (Volume Efficiency) needs to be enabled so we can see it:

PRICLU2::> volume show-space -vserver PRICLU2V1 -volume v_PKD

                        Vserver: PRICLU2V1
                    Volume Name: v_PKD
                      User Data: 254.3MB
              User Data Percent: 12%
                  Deduplication: -
          Deduplication Percent: -
        Temporary Deduplication: -
Temporary Deduplication Percent: -
                     Total Used: 357.5MB
             Total Used Percent: 17%

PRICLU2::> volume efficiency on -vserver PRICLU2V1 -volume v_PKD

Efficiency for volume "v_PKD" of Vserver "PRICLU2V1" is enabled.
Already existing data could be processed by running "volume efficiency start -vserver PRICLU2V1 -volume v_PKD -scan-old-data true".

PRICLU2::> volume efficiency show

Vserver    Volume           State    Status       Progress           Policy
---------- ---------------- -------- ------------ ------------------ ----------
PRICLU2V1  v_PKD            Enabled  Idle         Idle for 00:00:09  -

PRICLU2::> volume show-space -vserver PRICLU2V1 -volume v_PKD

                        Vserver: PRICLU2V1
                    Volume Name: v_PKD
                      User Data: 254.3MB
              User Data Percent: 12%
                  Deduplication: 12KB
          Deduplication Percent: 0%
        Temporary Deduplication: -
Temporary Deduplication Percent: -
                     Total Used: 357.5MB
             Total Used Percent: 17%

Note: You cannot do a “volume efficiency start” on a SnapVault secondary:

PRICLU2::> volume efficiency start -vserver PRICLU2V1 -volume v_PKD

Error: command failed: Failed to start efficiency on volume "v_PKD" of Vserver "PRICLU2V1": Invalid operation on a SnapVault secondary volume.

6) Enable volume efficiency on the SnapVault destination, and see that even though there’s a very big warning, nothing much happens after running the command (keep in mind the above that we can’t manually start volume efficiency):

PRICLU2::> volume efficiency modify -vserver PRICLU2V1 -volume v_PKD -compression true

Warning: Enabling compression on a secondary volume is strongly discouraged. If compression is enabled on a secondary volume, storage efficiency present on the source will not be preserved during replication. The destination system needs to run offline storage efficiency scanner (compression and dedupe) to achieve storage savings. Additional compression savings on the destination comes at a cost of extra computation resources. In environments where there is a lot of shared data present on the source, (e.g., virtualized environments employing file clones), data inflation during transfer may lead to failed backups due to lack of space on the secondary volume.
Do you want to continue? {y|n}: y
Info: Volume "v_PKD" of Vserver "PRICLU2V1" is a SnapVault destination and the following volume efficiency schedule attributes are not applicable - "Job Schedule", "Duration", and "Enabled".

PRICLU2::> volume efficiency show -vserver PRICLU2V1

Vserver    Volume           State    Status       Progress           Policy
---------- ---------------- -------- ------------ ------------------ ----------
PRICLU2V1  v_PKD            Enabled  Idle         Idle for 00:03:02  -

PRICLU2::> volume show-space -vserver PRICLU2V1 -volume v_PKD

                        Vserver: PRICLU2V1
                    Volume Name: v_PKD
                      User Data: 253.3MB
              User Data Percent: 12%
                  Deduplication: 12KB
          Deduplication Percent: 0%
        Temporary Deduplication: -
Temporary Deduplication Percent: -
                     Total Used: 356.4MB
             Total Used Percent: 17%

7) We create and apply the volume efficiency policy on the destination:

PRICLU2::> volume efficiency policy show
This table is currently empty.

PRICLU2::> volume efficiency policy create -vserver PRICLU2V1 -policy 0010_for_6hrs -schedule daily -enabled true -qos-policy background -duration 6

PRICLU2::> volume efficiency modify -vserver PRICLU2V1 -volume v_PKD -policy 0010_for_6hrs
Info: Volume "v_PKD" of Vserver "PRICLU2V1" is a SnapVault destination and the following volume efficiency schedule attributes are not applicable - "Job Schedule", "Duration", and "Enabled".

PRICLU2::> volume efficiency show
Vserver    Volume           State    Status       Progress           Policy
---------- ---------------- -------- ------------ ------------------ ----------
PRICLU2V1  v_PKD            Enabled  Idle         Idle for 00:19:21  0010_for_6hrs

8) Finally confirm that compression is indeed enabled on the destination but not on the source:

PRICLU2::> volume efficiency show -fields compression
vserver   volume compression
--------- ------ -----------
PRICLU2V1 v_PKD  true

PRICLU1::> volume efficiency show -fields compression
vserver   volume   compression
--------- -------- -----------
PRICLU1V1 v_PKD    false

THE END!

Comments