Allen_Chew

updated

11 years ago

A

Allen_Chew

1 Rookie

•

21 Posts

0

1228

September 2nd, 2015 10:00

Mapping all volumes to new SDC

Greetings I'm running ScaleIO 1.32 on vmware 6.0

I was wondering if there's a way to map all volumes to the SDC plugin installed on the ESXi host?

I have a lot of scaleio volumes, and mapping them one by one will take a very long time. Is there a "select all" approach or script to map all the scaleio volumes to the sdc?

Thanks!

  • Allen_Chew

    1 Rookie

    •

    21 Posts

    870

    0

    Posted September 4th, 2015 08:00

    I was able to use python to map all 36 volumes to my new SDC! The Gateway VM has an api for POST REST calls to do all the commands in python. I found a python module called scaleiopy by Magnus Nilsson & Matt Cowger online that allows me to script this:

    from scaleiopy import scaleio

    sio = scaleio.ScaleIO("https://172.24.11.190/api", "admin", "password", False, "ERROR")

    # Get a list of all  volumes in your ScaleIO cluster

    all_volumes=sio.volumes

    server6=sio.get_sdc_by_ip("172.24.12.186")

    i=0

    for volume in all_volumes:    

      i+=1

      print "mapping volume "+i.__str__()

      sio.map_volume_to_sdc(volume, server6, True)

  • robh

    21 Posts

    870

    0

    Posted September 3rd, 2015 02:00

    Allen,

    I'm afraid there is currently no way to map multiple volumes to an SDC at the same time using the plugin or the CLI itself.

    It might be an option to script a procedure utilizing the CLI.