Software Development Kit (SDK) and API Discussions

Setup SiS using API

viralpatel
4,345 Views

how can we scan/dedup old data on volume? i mean all data, if we move volume from 7 mode to c-DOT, we need to scan entire volume and old data.

 

in cli there is options -scan-old-data true, but in API sis-start i dont see this options.

if we start sis with out this, it is compressing new coming data but not old one.

6 REPLIES 6

richard_payne
4,329 Views

Hello,

 

You use the same sis_start API call but you need to set 'scan' to be 'true' (default is false). From the API docs for Cmode:

 

    • scan => boolean, optional

 

    If this is "true", the sis operation will scan the file system to process all the existing data.

 

 

--rdp

viralpatel
4,326 Views

i ithought same but if we compare same with CLI cmd..

 

volume efficiency start -dedupe true -compression true -qos-policy background  -scan-old-data true -scan-all true -snapshot-blocks true -vserver vserver1 -volume vol1

 

it has -scan-old-data true  options, does that mean "scan" in api is equivalent to "-scan-old-data" in CMD?

wh_slayer
4,312 Views

Here is a copy & paste from the NMSDK 5.4 documentation:

scan boolean
optional
If this is "true", the sis operation will scan the file system to process all the existing data.

The scan will include whatever is enabled on the volume. For example: If compression is not enabled on the volume, the scan will not include compression. This default behavior can be changed by using the run-dedupe-scan and run-compression-scan parameters.

If scan is false only data added since the last sis operation will be processed. Default value: "false"

scan-all boolean
optional
If this argument is "true", scanner will scan entire volume without applying shared block optimization. This argument is valid only if scan argument is set to "true". Look at the documentation for scan parameter for more details. Default value: "false"

 

viralpatel
4,298 Views

Thanks, any idead where did we specify run-dedupe-scan and run-compression-scan parameter?

asulliva
4,247 Views

Hello @viralpatel,

 

I'm not sure I understand your question.  Can you please elaborate?

 

Andrew

If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

viralpatel
4,239 Views

scan=true

 

If this is "true", the sis operation will scan the file system to process all the existing data.

The scan will include whatever is enabled on the volume. For example: If compression is not enabled on the volume, the scan will not include compression. This default behavior can be changed by using the run-dedupe-scan and run-compression-scan parameters.

If scan is false only data added since the last sis operation will be processed. Default value: "false"

 

if scan is true, it will scan entire volume but that does not mean it will compress entire volume, it said " This default behavior can be changed by using the run-dedupe-scan and run-compression-scan parameters."

 

Now question is where we can find that parameter?

 

when we move volume from 7 mod to CDOT, first need to dedup and compress old data.

 

as of now i am doing this way but tyring to find how can we do this using proper API call.

 

api = NaElement("system-cli")
xi = NaElement("args")
s1="set -privilege advanced;volume efficiency start -vserver vserver1-volume vol1-dedupe true -compression true -qos-policy background -scan-old-data true -scan-all true -snapshot-blocks true"
xi.child_add(NaElement("arg",s1))

 

if you see command line has 2 parameter "-dedupe true" and "-compression true" with "-scan-old-data true".

 

now api has option for "-scan-old-data true", you can use scan bollean "true" but donot see options for other 2.

 

Public