Start a Conversation

Unsolved

This post is more than 5 years old

746

November 20th, 2014 08:00

Scripting: how can I check that the unbind is finished (and continue with the delete)


G'Day,

I have a existing script in which the unbind is done and that a sleep follows, after that the script

trys to delete the disc - and if this fails (because the unbind isn't done yet) it trys the delete

again (8 times).

The script "works" but to be honest: there must be an other way to start an unbind and receive

a result to continue with the delete

Hope someone can help (thats my first post here...)

Cu

2 Intern

 • 

20.4K Posts

November 20th, 2014 10:00

For pull it’s only needed on the array that’s pulling.

2 Intern

 • 

20.4K Posts

November 20th, 2014 11:00

Sorry ..i replied via email to the thread for VNX SANCopy, odd that ended up here

812 Posts

November 20th, 2014 11:00

I am not sure if there are some other ways, but what I used to do is to wait for some time - depending on the device size -  and check the symdev show for the device and see if the pool name became N/A or not. We are doing it manually but can be used in scripting I think.

Seems dynamox entered the comment for a different post here by mistake.

226 Posts

November 20th, 2014 11:00

There's a "verify -unbound|-bound" feature in symcfg that can help with this --

    symcfg -sid [-i ] [-c ]

          <-pool               |

          -g                     |

          -sg                   |

          -cg                   |

          -devs < : |

              [,< : | >...]>>

        verify -tdev

          <-bound | -binding | -allocating | -deallocating |

          -unbound | -unbinding | -reclaiming | -compressing |

          -uncompressing>

When you use -i and -c , sycmfg will loop & pool every for number of times to verify that the devs you specified are in the state you're looking for. When the devs reach the desired state, the loop will exit with return code 0. If the devs never reach the desired state in the specified timeframe (i multiplied by c), then the loop will exit with a nonzero return code (the actual return code is documented in the SE CLI guide).

Here are a few examples:

# Against a range of devices that are in an unbound state:

sandy# symcfg -sid 0277 -i 60 -c 5 -devs 2078:207a verify -tdev -unbound

All device(s) in the list are in 'Unbound' state.

# Against a single device that is in a bound state:

sandy# symcfg -sid 0277 -i 60 -c 5 -dev 2071 verify -tdev -bound

All device(s) in the list are in 'Bound' state.

# Against a single device that is in a bound state:

sandy# symcfg -sid 0277 -i 60 -c 5 -dev 2071 verify -tdev -unbound

None of the device(s) in the list are in 'Unbound' state.

None of the device(s) in the list are in 'Unbound' state.

None of the device(s) in the list are in 'Unbound' state.

None of the device(s) in the list are in 'Unbound' state.

No Events found!

Top