White Papers
13 Standards-based storage management for Dell EMC PowerEdge servers
3.3 Deleting a virtual drive (VD) by using Redfish 2016
VDs can also be deleted by using Redfish 2016 standard storage API. By using a selected VD URI of form
“redfish/v1/Systems/System.Embedded.1/Storage/Volumes/{virtual disk instance id}”, with no payload
required, use a DELETE command to delete the VD.
Here is an example, taken from the “DeleteVirtualDiskRedfish.py” script, of the form of the URI and DELETE
command for deleting VD from Python GitHub script.
url = 'https://%s/redfish/v1/Systems/System.Embedded.1/Storage/Volumes/%s' %
(idrac_ip, virtual_disk)
headers = {'content-type': 'application/json'}
response = requests.delete(url, headers=headers,
verify=False,auth=(idrac_username,idrac_password))
The following example uses the “DeleteVirtualDiskRedfish.py” script from the Dell EMC Redfish Scripting
Github repository to delete a RAID 0 VD:
1. Check for VDs detected on the target server.
C:\Python27>DeleteVirtualDiskRedfish.py -ip 192.168.0.130 -u root -p calvin -v
RAID.Slot.6-1
- Supported virtual disk(s) detected to delete for controller RAID.Slot.6-1 -
Disk.Virtual.0:RAID.Slot.6-1, Volume Type: NonRedundant
2. Using the VD instance ID, perform the VD delete operation.
C:\Python27>DeleteVirtualDiskRedfish.py –ip 192.168.0.130 -u root -p calvin -D
Disk.Virtual.0:RAID.Slot.6-1
- PASS: DELETE command passed to delete "Disk.Virtual.0:RAID.Slot.6-1" virtual
disk, status code 202 returned
- PASS, "realtime" JID_264179257876 jid successfully created for delete virtual
disk
- WARNING, JobStatus not completed, current status is: "Job in progress.",
precent completion is: "1"
<Output edited for brevity>
- WARNING, JobStatus not completed, current status is: "Job in progress.",
precent completion is: "99"
--- PASS, Final Detailed Job Status Results ---
JobState: Completed
Description: Job Instance
CompletionTime: 2018-05-15T15:59:58
PercentComplete: 100
StartTime: TIME_NOW
MessageId: PR19
Message: Job completed successfully.
EndTime: TIME_NA
Id: JID_264179257876