码迷,mamicode.com
首页 > 移动开发 > 详细

虚拟机移动磁盘中途服务器断电,导致磁盘锁定的处理办法

时间:2017-10-26 15:25:55      阅读:279      评论:0      收藏:0      [点我收藏+]

标签:ovirt

可以通过修改数据库,步骤如下

1、OVIRT进入数据库
[root@vmhost2 ~]# su postgres 进入数据库
bash-4.2$ psql
could not change directory to "/root"
psql (9.2.23)
Type "help" for help.

2、postgres=# \c engine 切换都ENGINE库
You are now connected to database "engine" as user "postgres".
engine=# select *from job;执行查询
                job_id                |  action_type   |                  description                  | status  |               owner_id               | visible |     
    start_time         | end_time |      last_update_time      |            correlation_id            | is_external | is_auto_cleared | engine_session_seq_id
--------------------------------------+----------------+-----------------------------------------------+---------+--------------------------------------+---------+-----
-----------------------+----------+----------------------------+--------------------------------------+-------------+-----------------+-----------------------
 95fa3391-6977-4831-98c3-271f7190d51c | MoveOrCopyDisk | Moving Disk Defined_Disk0 from Data3 to Data2 | STARTED | 59e01206-011b-0136-0358-0000000001b2 | t       | 2017
-10-25 22:35:30.489+08 |          | 2017-10-25 23:17:46.181+08 | 181a6153-484a-45a4-871c-b2730546ab9e | f           | t               |                   275
 88332f83-428c-4245-80d6-0a5b3f95f879 | MoveOrCopyDisk | Moving Disk Defined_Disk0 from Data3 to Data2 | STARTED | 59e01206-011b-0136-0358-0000000001b2 | t       | 2017
-10-25 22:56:51.72+08  |          | 2017-10-25 23:17:46.204+08 | cd32c5c2-0086-4fae-bab1-1bb4b3aca444 | f           | t               |                   275
 5b23ea48-a9e9-4ec9-a581-1a5735a54dcf | MoveOrCopyDisk | Moving Disk Defined_Disk0 from Data3 to Data2 | STARTED | 59e01206-011b-0136-0358-0000000001b2 | t       | 2017
-10-25 22:55:29.521+08 |          | 2017-10-25 23:17:49.86+08  | 7d1b72e8-e93d-47e2-912f-c5d26ed78029 | f           | t               |                   275
 5ef82c6d-b3ce-4bda-9d77-b711d44b1b29 | MoveOrCopyDisk | Moving Disk Defined_Disk0 from Data3 to Data2 | STARTED | 59e01206-011b-0136-0358-0000000001b2 | t       | 2017
-10-25 22:55:48.659+08 |          | 2017-10-25 23:17:46.24+08  | 6042d610-ba99-4817-968e-bee9f01bb9fc | f           | t               |                   275
(4 rows)

3、engine=# update job set status=‘FINISHED‘;更改为FINISHED状态
UPDATE 4
engine=# select *from job;
                job_id                |  action_type   |                  description                  |  status  |               owner_id               | visible |    
     start_time         | end_time |      last_update_time      |            correlation_id            | is_external | is_auto_cleared | engine_session_seq_id
--------------------------------------+----------------+-----------------------------------------------+----------+--------------------------------------+---------+----
------------------------+----------+----------------------------+--------------------------------------+-------------+-----------------+-----------------------
 95fa3391-6977-4831-98c3-271f7190d51c | MoveOrCopyDisk | Moving Disk Defined_Disk0 from Data3 to Data2 | FINISHED | 59e01206-011b-0136-0358-0000000001b2 | t       | 201
7-10-25 22:35:30.489+08 |          | 2017-10-25 23:17:46.181+08 | 181a6153-484a-45a4-871c-b2730546ab9e | f           | t               |                   275
 88332f83-428c-4245-80d6-0a5b3f95f879 | MoveOrCopyDisk | Moving Disk Defined_Disk0 from Data3 to Data2 | FINISHED | 59e01206-011b-0136-0358-0000000001b2 | t       | 201
7-10-25 22:56:51.72+08  |          | 2017-10-25 23:17:46.204+08 | cd32c5c2-0086-4fae-bab1-1bb4b3aca444 | f           | t               |                   275
 5b23ea48-a9e9-4ec9-a581-1a5735a54dcf | MoveOrCopyDisk | Moving Disk Defined_Disk0 from Data3 to Data2 | FINISHED | 59e01206-011b-0136-0358-0000000001b2 | t       | 201
7-10-25 22:55:29.521+08 |          | 2017-10-25 23:17:49.86+08  | 7d1b72e8-e93d-47e2-912f-c5d26ed78029 | f           | t               |                   275
 5ef82c6d-b3ce-4bda-9d77-b711d44b1b29 | MoveOrCopyDisk | Moving Disk Defined_Disk0 from Data3 to Data2 | FINISHED | 59e01206-011b-0136-0358-0000000001b2 | t       | 201
7-10-25 22:55:48.659+08 |          | 2017-10-25 23:17:46.24+08  | 6042d610-ba99-4817-968e-bee9f01bb9fc | f           | t               |                   275
(4 rows)
修改后尝试启动虚拟机,提示磁盘正在被移动或复制
待续.....

虚拟机移动磁盘中途服务器断电,导致磁盘锁定的处理办法

标签:ovirt

原文地址:http://2833238.blog.51cto.com/2823238/1976329

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!