Recovery from cloud hard disk when openstack host machine fails

Source: Internet
Author: User

1. Find the virtual machine to be restored on the web interface

2. view the cloud disk ID of the VM.

3. For example, the cloud hard disk ID is 49a415c8-6a9c-4047-a100-8ad07885952c.

4. Detach the cloud hard disk and virtual machine from the cinder Database

1) view the cloud disk Information

Mysql> select * From volumes where id = "49a424c8-6a9c-4047-a100-8ad07885952c ";

+ Accept + ------------ + --------- + accept + -------- + accept + ---------- + accept + ------------ + accept + -------- + ----------------- + accept + ------------- + -------------- + hour + ------------------- + --------------- + hour + -------------- + ------------ + --------------- + ------------------- + ---------- + ------------------- + ----------------

| Created_at | updated_at | deleted_at | deleted | ID | ec2_id | user_id | project_id | host | size | mounts | mountpoint | attach_time | status | attach_status | mounts | terminated_at | display_name | display_description | provider_location | provider_auth | snapshot_id | volume_type_id | source_volid | bootable | attached_host | provider_geometry | _ name_id | encryption_key_id | migration_status |

+ Accept + ------------ + --------- + accept + -------- + accept + ---------- + accept + ------------ + accept + -------- + ----------------- + accept + ------------- + -------------- + hour + ------------------- + --------------- + hour + -------------- + ------------ + --------------- + ------------------- + ---------- + ------------------- + ----------------

| 14:54:04 | 14:54:08 | null | 0 | optional | null | 84a36a3ff48a44e89ef2d29b05f902bf | average | os-node1 | 100 | Nova | average | VDA | 2014-08-07t14: 54: 08.052233 | in-use | attached | 14:54:04 | 14:54:05 | null | bytes | 64efb028-794c-4a7c-9cdf-9e8895222fab | null | 1 | null |

+ Accept + ------------ + --------- + accept + -------- + accept + ---------- + accept + ------------ + accept + -------- + ----------------- + accept + ------------- + -------------- + hour + ------------------- + --------------- + hour + -------------- + ------------ + --------------- + ------------------- + ---------- + ------------------- + ----------------

1 row in SET (0.00 Sec)

2) unmount the attached relationship between the cloud disk and the Virtual Machine

Mysql> Update volumes set instance_uuid = NULL where id = "49a316c8-6a9c-4047-a100-8ad07885952c ";

Mysql> Update volumes set mountpoint = NULL where id = "49a316c8-6a9c-4047-a100-8ad07885952c ";

Mysql> Update volumes set attach_time = NULL where id = "49a316c8-6a9c-4047-a100-8ad07885952c ";

Mysql> Update volumes set status = "available" where id = "49a316c8-6a9c-4047-a100-8ad07885952c ";

Mysql> Update volumes set attach_status = "detached" where id = "49a450c8-6a9c-4047-a100-8ad07885952c ";


Mysql> Update volumes set instance_uuid = NULL where id = "49a316c8-6a9c-4047-a100-8ad07885952c ";

Query OK, 1 row affected (0.02 Sec)

Rows matched: 1 changed: 1 Warnings: 0


Mysql> Update volumes set mountpoint = NULL where id = "49a316c8-6a9c-4047-a100-8ad07885952c ";

Query OK, 1 row affected (0.01 Sec)

Rows matched: 1 changed: 1 Warnings: 0


Mysql> Update volumes set attach_time = NULL where id = "49a316c8-6a9c-4047-a100-8ad07885952c ";

Query OK, 1 row affected (0.03 Sec)

Rows matched: 1 changed: 1 Warnings: 0


Mysql> Update volumes set status = "available" where id = "49a316c8-6a9c-4047-a100-8ad07885952c ";

Query OK, 1 row affected (0.02 Sec)

Rows matched: 1 changed: 1 Warnings: 0


Mysql> Update volumes set attach_status = "detached" where id = "49a450c8-6a9c-4047-a100-8ad07885952c ";

Query OK, 1 row affected (0.02 Sec)

Rows matched: 1 changed: 1 Warnings: 0


3) View cloud hard disk information again

Mysql> select * From volumes where id = "49a424c8-6a9c-4047-a100-8ad07885952c ";

+ Accept + ------------ + --------- + accept + -------- + accept + ---------- + accept + --------------- + ------------ + ------------- + ----------- + accept + -------------- + hour + ------------------- + --------------- + hour + -------------- + ------------ + --------------- + ------------------- + ---------- + ------------------- + ----------------

| Created_at | updated_at | deleted_at | deleted | ID | ec2_id | user_id | project_id | host | size | mounts | mountpoint | attach_time | status | attach_status | mounts | terminated_at | display_name | display_description | provider_location | provider_auth | snapshot_id | volume_type_id | source_volid | bootable | attached_host | provider_geometry | _ name_id | encryption_key_id | migration_status |

+ Accept + ------------ + --------- + accept + -------- + accept + ---------- + accept + --------------- + ------------ + ------------- + ----------- + accept + -------------- + hour + ------------------- + --------------- + hour + -------------- + ------------ + --------------- + ------------------- + ---------- + ------------------- + ----------------

| 14:54:04 | 14:54:08 | null | 0 | Connecticut | null | Connecticut | os-node1 | 100 | Nova | null | available | detached | 14:54:04 | | null | bytes | 64efb028-794c-4a7c-9cdf-9e8895222fab | null | 1 | null |

+ Accept + ------------ + --------- + accept + -------- + accept + ---------- + accept + --------------- + ------------ + ------------- + ----------- + accept + -------------- + hour + ------------------- + --------------- + hour + -------------- + ------------ + --------------- + ------------------- + ---------- + ------------------- + ----------------

1 row in SET (0.00 Sec)


Mysql>

5. Check the status of the cloud disk on the dashboard interface. You can use this cloud disk to create a virtual machine.

6. Use the above cloud hard disk to create a virtual machine to recover the fault on another host.


This article is from the "zhanguo1110" blog, please be sure to keep this source http://zhanguo1110.blog.51cto.com/5750817/1543029

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.