Showing results for 
Search instead for 
Did you mean: 

How to create Raid-5 Virtual Drive without specifying total size in IMC SDK

Cisco Employee
Cisco Employee

If I create a RAID-1 Virtual Drive through XML API/ IMC SDK, it makes sense to specify the total size of VD.

<configConfMo cookie='1392018227/7ffe1220-f208-1208-8005-93536d0df730'

inHierarchical='false' dn='sys/rack-unit-1/board/storage-SAS-SLOT-5/virtual-drive-create'> 




  virtualDriveName='test3' raidLevel='1' size='2000 MB' driveGroup='[1,2]'

  writePolicy='Write Through' adminState='trigger'/>



If I create a RAID-5 in CIMC webgui, it will automatically calculate and popup total size.

However, I do the same to create RAID-5 VD through XML API or IMC SDK Python, it actually requires to specify the total size of VD but this is what I don't know.

is there any trick that I can bypass this argument 'size', and let the system to pick the max size?

This is standalone C-series 220/240 M3/4 (without UCSM)

Thanks in advance

2 Replies 2

Jeffrey Foster
Cisco Employee
Cisco Employee

There is an API Helper on the Create Virtual Drive Pop-Up where you can input desired VD configuration parameters and the "Generate XML API Request" button will provide you with the right API call (including VD size attribute). There is no way to auto-optimize the VD size via the XML API since it requires the size to be specified as part of the API call - this is the reason that the API helper was added to the GUI, and assuming you have the same drives and VD configuration across systems, this is something that can be re-used.

Cisco Employee
Cisco Employee

There is no trick to get the API to use the maximum shared size across all the specified drive for your RAID 5 config.

The size is a required field.

You would have to first query for the drives by classId

configResolveClass classId="StorageLocalDisk"

From the returned objects find the drives that are going to be part of the RAID 5 config and determine the maximum size that could be specified or if all the same size use the value in coercedSize attribute. Since the attribute is a text value with two letter size category (MB, GB, TB) you'll have to do some splitting and converting of the value.

Are you using the Python SDK or creating XML documents?

Hope that helps.



Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Recognize Your Peers