04-07-2016 11:27 PM
I am trying to research the fastest to clean up the C-series machines, the best way I thought is to directly delete all virtual drives using CIMC XML API. I know how to the method of creating virtual drives but don't know to how to delete
For example:
dn="sys/rack-unit-1/board/storage-SAS-SLOT-HBA/vd-1"
Solved! Go to Solution.
04-08-2016 12:25 AM
Hi Man Chung Lok,
If you want to delete all the virtual drives of the controller you need to specify adminAction=delete-all-vds-reset-pds.
For deleting all the virtual drives:
<configConfMo cookie="1460067895/e8ca7722-2fec-1fec-86ef-16752a2fa074" dn="sys/rack-unit-1/board/storage-SAS-SLOT-HBA" inHierarchical="false"><inConfig><storageController adminAction="delete-all-vds-reset-pds" dn="sys/rack-unit-1/board/storage-SAS-SLOT-HBA" status="modified" /></inConfig></configConfMo>
If you want to delete a particular virtual drive then you need to specify status=deleted for the storageVirtualDrive MO instance.
For deleting a particular virtual drive:
<configConfMo cookie="1460069519/40b0d7d2-2fed-1fed-86ff-16752a2fa074" dn="sys/rack-unit-1/board/storage-SAS-SLOT-HBA/vd-0" inHierarchical="false"><inConfig><storageVirtualDrive status="deleted" /></inConfig></configConfMo>
If you have the Cisco IMC PowerTool module installed on your system then you can try the below cmdlet for deleting the virtual drives.
For deleting all the virtual drives:
PowerTool C:\> Get-ImcStorageController | Set-ImcStorageController -AdminAction delete-all-vds-reset-pds -Force -Xml
AdminAction : no-op
Id : SLOT-HBA
Model : Cisco 12G SAS Modular Raid Controller
PciSlot : SLOT-HBA
Presence : equipped
RaidSupport : yes
SelfEncryptEnabled : no
Serial : SV44532749
Type : SAS
Vendor : LSI Logic
Imc : C240-FCH1851V0YK
Dn : sys/rack-unit-1/board/storage-SAS-SLOT-HBA
Rn : storage-SAS-SLOT-HBA
Status : modified
XtraProperty : {}
For deleting a particular virtual drive:
PowerTool C:\> Get-ImcStorageVirtualDrive -Id 0 | Remove-ImcManagedObject -Force
Let us know if you need more information on this.
Thanks,
Sumanth
04-08-2016 12:25 AM
Hi Man Chung Lok,
If you want to delete all the virtual drives of the controller you need to specify adminAction=delete-all-vds-reset-pds.
For deleting all the virtual drives:
<configConfMo cookie="1460067895/e8ca7722-2fec-1fec-86ef-16752a2fa074" dn="sys/rack-unit-1/board/storage-SAS-SLOT-HBA" inHierarchical="false"><inConfig><storageController adminAction="delete-all-vds-reset-pds" dn="sys/rack-unit-1/board/storage-SAS-SLOT-HBA" status="modified" /></inConfig></configConfMo>
If you want to delete a particular virtual drive then you need to specify status=deleted for the storageVirtualDrive MO instance.
For deleting a particular virtual drive:
<configConfMo cookie="1460069519/40b0d7d2-2fed-1fed-86ff-16752a2fa074" dn="sys/rack-unit-1/board/storage-SAS-SLOT-HBA/vd-0" inHierarchical="false"><inConfig><storageVirtualDrive status="deleted" /></inConfig></configConfMo>
If you have the Cisco IMC PowerTool module installed on your system then you can try the below cmdlet for deleting the virtual drives.
For deleting all the virtual drives:
PowerTool C:\> Get-ImcStorageController | Set-ImcStorageController -AdminAction delete-all-vds-reset-pds -Force -Xml
AdminAction : no-op
Id : SLOT-HBA
Model : Cisco 12G SAS Modular Raid Controller
PciSlot : SLOT-HBA
Presence : equipped
RaidSupport : yes
SelfEncryptEnabled : no
Serial : SV44532749
Type : SAS
Vendor : LSI Logic
Imc : C240-FCH1851V0YK
Dn : sys/rack-unit-1/board/storage-SAS-SLOT-HBA
Rn : storage-SAS-SLOT-HBA
Status : modified
XtraProperty : {}
For deleting a particular virtual drive:
PowerTool C:\> Get-ImcStorageVirtualDrive -Id 0 | Remove-ImcManagedObject -Force
Let us know if you need more information on this.
Thanks,
Sumanth
04-08-2016 01:57 AM
Awesome, thank you so much
for deleting all VD, it works~!!!
deleting single VD, not working but no error returning, just did nothing.
04-25-2017 02:47 AM
Hi Sumanth,
We have two flavors of controllers one SLOT-MEZZ and second SLOT-HBA .Which XML API i need to use to get this information. Based on the response, I need to construct the XML Request for Creating VD.
After VD is created , How can i achieve following
First, Initialize the VD
Second , Set the VD as Boot Drive
Regards,
Suparn Bector
04-25-2017 03:13 AM
Hi Suparn,
You can run the Get-ImcStorageController cmdlet to get the list of storage controllers present on the server.
To initialise the VD
For fast initialization:
Get-ImcStorageVirtualDrive -Id 0 | Set-ImcStorageVirtualDrive -AdminAction start-fast-initialization
For full initialization:
Get-ImcStorageVirtualDrive -Id 0 | Set-ImcStorageVirtualDrive -AdminAction start-full-initialization
To set the boot drive for a particular VD (For ex: ID 0)
Get-ImcStorageVirtualDrive -Id 0 | Set-ImcStorageVirtualDrive -AdminAction set-boot-drive
Let me know if need further help on this.
Thanks,
Sumanth BR
04-25-2017 03:43 AM
Thanks Sumanth,
I am looking for XML API's which can be called from a Java Client.
I was able to find these but only one XML API is left , which is to get the Controller Name.
I believe i need to change the "dn" value based on controller . Please correct me if i am wrong
create virtual drive
curl -k -d "<configConfMo cookie='COOKIE' inHierarchical='false' dn='sys/rack-unit-1/board/storage-SAS-SLOT-MEZZ/virtual-drive-create'><inConfig><storageVirtualDriveCreatorUsingUnusedPhysicalDrive dn='sys/rack-unit-1/board/storage-SAS-SLOT-MEZZ/virtual-drive-create' virtualDriveName='RAID10_12345678' raidLevel='10' size='3810880 MB' driveGroup='[1,2,3,4][5,6,7,8]' writePolicy='Write Through' adminState='trigger'/></inConfig></configConfMo>" https://<IP>/nuova
Initiating Virtual Drive
curl -k -d "<configConfMo dn='sys/rack-unit-1/board/storage-SAS-SLOT-MEZZ/vd-0' inHierarchical='true' cookie='COOKIE'> <inConfig><storageVirtualDrive dn='sys/rack-unit-1/board/storage-SAS-SLOT-MEZZ/vd-0' id='0' adminAction='start-fast-initialization'/></inConfig></configConfMo>" https://IP/nuova
Setting Virtual Drive as Boot Drive
curl -k -d "<configConfMo dn='sys/rack-unit-1/board/storage-SAS-SLOT-MEZZ/vd-0' inHierarchical='true' cookie='COOKIE'><inConfig><storageVirtualDrive dn='sys/rack-unit-1/board/storage-SAS-SLOT-MEZZ/vd-0' id='0' adminAction='set-boot-drive'/></inConfig></configConfMo>" https://IP/nuova
Regards,
Suparn Bector
04-25-2017 04:30 AM
Hi Suparn,
Yes you need to form the appropriate DN based on controller and virtual disk IDs.
If you are looking for XML request and response for a particular action you can use -Xml parameter as part of any of UCS PowerTool cmdlets.
Thanks,
Sumanth
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: