06-26-2016 08:18 PM
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'>
<inConfig>
<storageVirtualDriveCreatorUsingUnusedPhysicalDrive
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'/>
</inConfig>
</configConfMo>
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
06-26-2016 09:22 PM
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.
08-03-2016 09:13 AM
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.
Regards,
John
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide