650) this.width=650; "Title=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160707-1467841051403098784.png "src=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160707-1467841225838035078.jpg "style=" border:0px;float:none; "/>
Today's discussion cinder how to delete volume.
A volume with a status of Available can be deleted. If volume is currently attach to instance, it needs to be detach before delete.
The delete operation is relatively simple and the flowchart is as follows:
650 "this.width=650;" title= "/HTTP// 7xo6kd.com1.z0.glb.clouddn.com/upload-ueditor-image-20160707-1467841111197088239.png "src=" http// 7xo6kd.com1.z0.glb.clouddn.com/upload-ueditor-image-20160707-1467841226002062206.jpg "alt=" Image413.png "style=" border:0px; "/>
Send Delete request to Cinder-api
Cinder-api sending messages
Cinder-volume performing a delete operation
Let's discuss each step in detail below.
Send Delete request to Cinder-api
The customer (which can be an OpenStack end user, or another program) sends a request to Cinder-api: "Delete the specified volume.
Here we will delete volume "Vol-2"
Enter the GUI operation menu, Compute, Project, Volumes.
650) this.width=650; "Title=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160707-1467841051370002979.png "src=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160707-1467841226126062513.jpg "style=" border:0px;white-space:normal;float:none; "/>
Select Volume "Vol-2" and click "Delete Volume".
650) this.width=650; "Title=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160707-1467841051371025181.png "src=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160707-1467841226210021921.jpg "style=" border:0px;white-space:normal;float:none; "/>
Confirm again.
650) this.width=650; "Title=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160707-1467841051470043768.png "src=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160707-1467841226277006659.jpg "style=" border:0px;white-space:normal;float:none; "/>
CINDER-API will receive a request for the delete volume. The log file is in/opt/stack/logs/c-api.log.
650) this.width=650; "Title=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160707-1467841051514039271.png "src=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160707-1467841226362066996.jpg "style=" border:0px;white-space:normal;float:none; "/>
Cinder-api sending Messages
CINDER-API sends a message delete message. CINDER-API does not print the log that sends the message, only the source code to view the/opt/stack/cinder/cinder/volume/api.py, the method is extend.
650) this.width=650; "Title=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160707-1467841051524072869.png "src=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160707-1467841226468086058.jpg "style=" border:0px;white-space:normal;float:none; "/>
Cinder-volume Delete Volume
Cinder-volume executes the lvremove command Delete volume. The log is/opt/stack/logs/c-vol.log.
650) this.width=650; "Title=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160707-1467841051551060037.png "src=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160707-1467841226540090315.jpg "style=" border:0px;float:none; "/>
What's interesting here is thatCinder-volume performs a "safe" removal . The so-called "security" is actually erasing the data in volume, and LVM driver uses the DD operation to zero the LV's data. The logs are as follows:
650) this.width=650; "Title=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160707-1467841051639046049.png "src=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160707-1467841226604008565.jpg "style=" border:0px;white-space:normal;float:none; "/>
Then delete the LV.
650) this.width=650; "Title=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160707-1467841051652006270.png "src=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160707-1467841226737022584.jpg "style=" border:0px;white-space:normal;float:none; "/>
The above is the analysis of delete volume, the next section we discuss the snapshot operation.
650) this.width=650; "title=" "src=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160707-1467841226815089200.jpg "style=" Border:0px;vertical-align:middle;color:rgb ( 63,63,63); font-family: ' Microsoft Yahei '; Font-size:15px;line-height:21.75px;text-align:justify;background-color: RGB (246,246,246); "/>
Delete Volume operation-5 minutes a day to play OpenStack (57)