Delete Volume operation-5 minutes a day to play OpenStack (57)

Source: Internet
Author: User

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:

    1. Send Delete request to Cinder-api

    2. Cinder-api sending messages

    3. 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.

Select Volume "Vol-2" and click "Delete Volume".

Confirm again.

CINDER-API will receive a request for the delete volume. The log file is in/opt/stack/logs/c-api.log.

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.

Cinder-volume Delete Volume

Cinder-volume executes the lvremove command Delete volume. The log is/opt/stack/logs/c-vol.log.

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:

Then delete the LV.

The above is the analysis of delete volume, the next section we discuss the snapshot operation.


Delete Volume operation-5 minutes a day to play OpenStack (57)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.