Data Backup and Recovery

I am trying to use %SNAP_TIME to automatically mount lun inside a flexclone vol.

ASHWINPAWARTESL
4,272 Views

Hi ,

Any suggestions here.

I am trying to use %SNAP_TIME to automatically mount lun inside a flexclone vol. I created a flexclone vol and I can connect to lun using exact cloned name (date&time). But, when I use %SNAP_TIME. it fails.

VOL CLONE:SUCCESS
Volume Clone Create of cl_test_iscsi_20130203230600 from test-hourly_20130203230600 on fas01 Created Successfully

Now, I want to mount the cloned lun with script automatically.


Command I use:
snapdrive storage connect -lun fas01:/vol/cl_test_iscsi_%SNAP_TIME/lun_test


Issue:
When I give snap time variable, I get an error, service call to sdu deamon failed

But, If I use:
snapdrive storage connect -lun fas01:/vol/cl_test_iscsi_20130203230600/lun_test

It works. I would want to supply the %TIME so that I dont have to manually run the this command after the clone operation.  I can use snapdrive snap wizard connect and supply the test-hourly_20130203230600 and it works well, but in this case I am connecting to the lun in a snaphost of the parent  lun and it creates lun_test_0, whereas I want to connect to the lun_test in a flexcloned vol.

Thanks,

-Ashwin

1 ACCEPTED SOLUTION

ASHWINPAWARTESL
4,272 Views

Hi Siva,

I tried setting env variable but it didn't work. But, as you pointed out '%SNAP_TIME' is available only within snapcretor config environment, that gave me a direction to test it inside the config file. Thanks a lot.

.

This is what I did to work.

Step1:

Added my remote UNIX host (192.168.1.65) where I wanted to connect the cloned LUN (For backup purpose) in the following 'section' of config file on snapcreator server.

SC_CLONE_TARGET=192.168.1.65:9090


Step2:

Added post clone create command:

POST_CLONE_CREATE_CMD01=snapdrive storage connect -lun darfas01:/vol/cl_test_iscsi_%SNAP_TIME/lun_test


Step3:

On the remote host (192.168.1.65) edited agent.conf file and added "*" to allow the command to run. Otherwise it will fail with this error.

[192.168.1.65:9090(3.6.0.1)] ERROR: [agt-00011] Command [snapdrive storage connect -lun fas01:/vol/cl_test_iscsi_20130205163815/lun_test] is not allowed


command:*

View solution in original post

7 REPLIES 7

sivar
4,273 Views

Hello Ashwin,

Could you please email your config file to sivar at netapp.com

I would like to see how you are issuing the command "snapdrive storage connect -lun fas01:/vol/cl_test_iscsi_%SNAP_TIME/lun_test"  inside the config file.

Did you try wrapping the whole command inside double quotes?

ASHWINPAWARTESL
4,273 Views

Hi Siva,

I haven't yet put this in the config file. I am doing it from the console using standard snapdrive for unix commands.  I guess, if it works from the console, I can then use this command in the POST_CLONE section.

Thanks,

-Ashwin

sivar
4,273 Views

%SNAP_TIME is available only within snapcreator config/environment.

You can try setting an (UNIX/Windows) environment variable SNAP_TIME=<> and then calling it from snapdrive.

Are you trying that way?

ASHWINPAWARTESL
4,273 Views

Hi Siva,

I tried setting env variable but it didn't work. But, as you pointed out '%SNAP_TIME' is available only within snapcretor config environment, that gave me a direction to test it inside the config file. Thanks a lot.

.

This is what I did to work.

Step1:

Added my remote UNIX host (192.168.1.65) where I wanted to connect the cloned LUN (For backup purpose) in the following 'section' of config file on snapcreator server.

SC_CLONE_TARGET=192.168.1.65:9090


Step2:

Added post clone create command:

POST_CLONE_CREATE_CMD01=snapdrive storage connect -lun darfas01:/vol/cl_test_iscsi_%SNAP_TIME/lun_test


Step3:

On the remote host (192.168.1.65) edited agent.conf file and added "*" to allow the command to run. Otherwise it will fail with this error.

[192.168.1.65:9090(3.6.0.1)] ERROR: [agt-00011] Command [snapdrive storage connect -lun fas01:/vol/cl_test_iscsi_20130205163815/lun_test] is not allowed


command:*

ktenzer
4,273 Views

This is a current limitation

the %VARS must always be followed by a space

In the future we are going to do something like %{VAR}

My recommendation is to do following:

POST_CLONE_CREATE_CMD01=snapdrive storage connect -lun %USER_DEFINED

and then pass in --user_defined fas01:/vol/cl_test_iscsi_20130203230600/lun_test

I know this isnt quite as slick as you want but better than hard-coding in config

Regards,

Keith

ktenzer
4,273 Views

BTW this is addressed and fixed in SC 4.0 which releases with NetApp support in March 2013

The community release (which has no netapp support community only) is already available. I would encourage at minimum testing and ensuring things work to your desire.

https://snapcreator.netapp.com/download

Regards,

Keith

ASHWINPAWARTESL
4,273 Views

Thanks Keith for this information. I appreciate it. I am excited to test 4.0 version.

Public