Cloud Drive Error, error deleting, deleting status (Basic database operation)

Source: Internet
Author: User

The cause is to find that the cloud drive display erased, but still can't create a new cloud drive, on the API node with cinder list can see there is no hard disk, but the creation of the hard disk, will still prompt quota full, this is because the database records are not updated, the operation of the database records as follows, for later reference:

Log in to the 50 database node (you need to log in to the master node, you can enter the show master status in the MySQL database, or show slave status; To view, such as show master status; This command, if a table is returned, Then the proof is the Lord. At present, the L version of 50, 51, 52 are the main. )

Manually modify the database to identify it as deleted (typically not delete the record directly), modify the volumes table of the Cinder database, modify the deleted field to 1 (integer 1, not the string), change the Status field to "deleted", deleted_ At can be modified to "now ()" or it can not be modified.

update volumes set deleted=1where id = "xxx";

List all databases by show databases;

through use cinder; access to cinder database;

List all forms by show tables;

All contents are listed from the Quota_usages table by select * from Quota_usages;

Update quota_usages set in_use=0 where project_id= "xxx" and resource= "xxx";

Note When updating the information, update the data for the child and then update the parent's data, such as:

First Volumes_ssd\volumes_sata, then volumes.

For more details, see (refer to the content of someone else's article):

Many reasons may cause volume to enter the error or error_deleting state, and the delete operation cannot be performed at this time. This situation is broadly divided into two categories:

1. When cinder delete is executed, cinder cannot connect to ceph Mon, causing the deletion to fail. At this point we use the RBD command to find the corresponding image of the cinder volume:

rbd ls -p openstack-00| grep volume_id

If there is a record, it may be in this case, the process is relatively simple, we just reset-state and then execute:

cinder reset-state volume_idcinder delete volume_id

If the deletion fails, check whether the Cinder-volume ran a number of instances, such as 41 node run, 42 nodes also have, will delete the failure, this problem we have encountered, as long as the redundant Cinder-volume instances can be aborted, and then repeat the above steps.

2. When executing cinder Delete, cinder cannot connect to the database at this time, because there is no transaction synchronization, so Ceph has deleted the corresponding image, but there is no synchronization state to the database, at this time volume may be in available or deleting state, If the delete operation is performed again, it is clear that cinder has not found the corresponding image, so an error exception is thrown, at which point cinder volume will set it to error_deleting state and cannot be deleted by Reset-state. Verify the failure of this class by using the following script:

rbd ls -p openstack-00| grep volume_id

If the volume ID is not matched, the decision belongs to that class of failure.

Such a failure cannot be handled through the Cinder command-line tool, only manually modifying the database, identifying it as deleted (typically not deleting the record directly), modifying the volumes table of the Cinder database, modifying the deleted field to 1 (integer 1, not a string), The Status field is modified to "deleted", Deleted_at can be modified to "now ()" or not modified.

update volumes set deleted=1where id = "xxx";

Cloud Drive Error, error deleting, deleting status (Basic database operation)

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.