ONTAP Discussions

It seems that "snapmirror-get-volume-status" is working wrong...

YEGOR_FADEEV
5,465 Views

Hello,

I have a question about "snapmirror-get-volume-status" function. It seems that it's working wrong,

Lets assume that we already have established snapmirror relationship between source and destination endpoints

I would like to implement next flow by using ONTAP API in Java:

1. Break a relationship (snapmirror-break)

2. Resynchronize relationship backward (source becomes a destination and vise versa)

3. Get new destination volume status

     3.1 If it is still busy waiting for timeout and repeat step 3

     3.2 If it is idle go ahead

4. Update new destination from new source (snapmirror-update)

I assume that resync takes some time and during this period Im waiting for snapmirror-get-volume-status output param which is called: is-transfer-in-progress=true. But I always get is-transfer-in-progress=false. Nevertheless when I move on to the 4th step I get "Snapmirror error: transfer attempted for busy destination".

So, my question is how can I get to know when ether the destination(or source) is busy or not?

Thanks,

Yegor...

1 ACCEPTED SOLUTION

amirm
5,464 Views

Hi Yegor,

Its seems the in order to the operation that you intend to when volumes in relationship are idle. The param is-transfer-in-progressis-tran will only report in the transfer status but there may be other opertions that may be keeping the volume busy for example Quiescing, Resyncing, etc. which is-transfer-in-progress will not report on since these are not directly data transfer related operations/status.

Would like to suggest to use API "snapmirror-get-status" which returns more verbose information about status than is-transfer-in-progress API. The "snapmirror-get-status" API returns a param "snapmirror-status>snapmirror-status>snapmirror-status-info[]>status field that reports on all these status. Probably you need to check if this value is "Idle" and then move to next step.

Regards,

-Amir

View solution in original post

4 REPLIES 4

amirm
5,465 Views

Hi Yegor,

Its seems the in order to the operation that you intend to when volumes in relationship are idle. The param is-transfer-in-progressis-tran will only report in the transfer status but there may be other opertions that may be keeping the volume busy for example Quiescing, Resyncing, etc. which is-transfer-in-progress will not report on since these are not directly data transfer related operations/status.

Would like to suggest to use API "snapmirror-get-status" which returns more verbose information about status than is-transfer-in-progress API. The "snapmirror-get-status" API returns a param "snapmirror-status>snapmirror-status>snapmirror-status-info[]>status field that reports on all these status. Probably you need to check if this value is "Idle" and then move to next step.

Regards,

-Amir

YEGOR_FADEEV
5,464 Views

Hello amirm,

Great! It works!

Thanks..

amirm
5,464 Views

You are welcome Yegor! BTW could you please share more details on kind of use case/scenario you are trying to automate?

Regards,

-Amir

YEGOR_FADEEV
5,464 Views

Hello, amirm,

As far as our use case you can look at https://communities.netapp.com/message/89061.

We are still in investigation phase..

Thanks,

Yegor...

Public