在虚拟机详情确实有看到这个盘已经挂载了,
pvc-a2d5fdd1-b62c-49ae-aee4-8365be779eb8 位于 /dev/vdc 上尼桑跑车370z
但是虚拟机⾥确实没看到这块盘
cn-sz-common-s6-c1m2-4xl-asg-tvk-zzi-ppo-server-spc
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
vda 253:0 0 50G 0 disk
└─vda1 253:1 0 50G 0 part /
vdb 253:16 0 80G 0 disk
└─vdb1 253:17 0 80G 0 part /var/lib/docker
尝试解挂和挂载都会出问题
逍客评测解挂时,
Invalid volume: Invalid input received: Invalid volume: Unable to detach volume. Volume status must be 'in-use' and attach_status must be 'attached' to detach. (HTTP 400) (R
所以正确的处理⽅式,⼀律先解挂,再重建pod
select status,attach_status from volumes where id='051d57a7-40d7-4854-80b2-8e809088c060';
select * from volumes where id='051d57a7-40d7-4854-80b2-8e809088c060'\G;
+-----------+---------------+
| status | attach_status |
+-----------+---------------+
| available | detached |
+-----------+---------------+
| in-use | attached |
+-----------+---------------+
update volumes set status='in-use',attach_status='attached' where id='051d57a7-40d7-4854-80b2-8e809088c060';
update volumes set status='in-use',attach_status='attached' where id='';
不对卷本⾝是没有挂到虚拟机上的,libevirt vm xml 是没有显⽰的,但是nova show 可以看到这个盘,
所以cinder 的卷应该直接修改为未挂载状态,
nova的该盘应删掉
cinder reset-state --state available 051d57a7-40d7-4854-80b2-8e809088c060
update volumes set attach_status='detached' where id='051d57a7-40d7-4854-80b2-8e809088c060';
猎豹飞腾cs7update volumes set attach_status='detached' where id='051d57a7-40d7-4854-80b2-8e809088c060';
MariaDB [nova]> show tables;
+--------------------------------------------+
| Tables_in_nova |
高速公路路肩+--------------------------------------------+
| block_device_mapping | 有磁盘信息
| instances | ⽆磁盘信息
+--------------------------------------------+
MariaDB [nova]> select updated_at,device_name,volume_id,deleted,attachment_id from block_device_mapping where instance_uuid='c9b82e1e-6f57-467f-b4c8-fc1bbdf50 +---------------------+-------------+--------------------------------------+---------+--------------------------------------+
| updated_at | device_name | volume_id | deleted | attachment_id |
+---------------------+-------------+--------------------------------------+---------+--------------------------------------+
| 2022-01-16 15:45:15 | /dev/vda | 56565a16-5649-44f7-9bd3-7e0f405b8738 | 0 | dc62f3f6-c9a9-4ffe-bd5d-3c58432cd3ee |
| 2022-01-16 15:45:15 | /dev/vdb | 932aea2d-e21d-4b65-a11d-f3f2cc732841 | 0 | a0120e97-1282-45ff-9402-8d1f7e56c2ad |
| 2021-07-22 05:42:45 | /dev/vdc | fc9de015-4147-4287-9145-90e1b6999a8b | 336016 | e6fd4209-8eb3-42a2-825f-b4e7ce38db87 |
| 2021-07-22 06:47:12 | /dev/vdc | 31f4a0a9-c713-48fc-953f-32c02a785d0d | 336067 | ef0e05d3-c71d-4539-84e1-c7e1433f3b8d |
| 2021-07-23 02:38:26 | /dev/vdd | c11a3863-acde-447c-8c66-3e1f3dc8ce3a | 336139 | 8fdb1ebc-f0bb-4b99-8f9e-536c1b087d47 |
| 2021-07-23 03:02:38 | /dev/vde | c6f15852-9e60-4969-addb-db748a1218c8 | 336160 | 9ee286c5-5e31-4f29-9ad4-5d83a02d142e |
| 2021-07-26 05:54:39 | /dev/vdf | 61bd21df-0348-4ec1-91b5-bb6c1dddc641 | 336433 | d99c24b1-0af4-47e5-9049-b9bf10133713 |
现代北京| 2022-01-18 00:58:24 | /dev/vdc | 051d57a7-40d7-4854-80b2-8e809088c060 | 347818 | 84a6bd64-749f-4406-a4b4-57be9c01bb0f |
| 2022-01-18 01:01:13 | /dev/vdc | 051d57a7-40d7-4854-80b2-8e809088c060 | 347852 | 8f3e03a9-d940-477d-be12-6835dc572bc8 |
| 2022-01-18 01:03:37 | /dev/vdc | 051d57a7-40d7-4854-80b2-8e809088c060 | 347870 | 7a4fef5e-a13e-42e3-bda2-2160c4d06ffb |
| 2022-01-18 01:06:42 | /dev/vdc | 051d57a7-40d7-4854-80b2-8e809088c060 | 347896 | e055369d-7e86-490f-a594-66c9a3f8cf25 |
| 2022-01-18 01:10:48 | /dev/vdc | 051d57a7-40d7-4854-80b2-8e809088c060 | 347918 | e02bcf80-2ae8-4619-8dee-a4658cfd5fb8 |
| 2022-01-18 01:13:53 | /dev/vdc | 051d57a7-40d7-4854-80b2-8e809088c060 | 347944 | dd3b0b76-9cae-4032-9127-0dfa91547971 |
| 2022-01-18 01:15:57 | /dev/vdc | 051d57a7-40d7-4854-80b2-8e809088c060 | 347958 | 0eee90e5-3f40-48a9-85a8-73efaec13831 |
| 2022-01-18 01:17:00 | /dev/vdc | 051d57a7-40d7-4854-80b2-8e809088c060 | 347974 | d6bb0cc3-caf3-4f3c-9161-8f36a8125523 |
| 2022-01-18 01:18:59 | /dev/vdc | 051d57a7-40d7-4854-80b2-8e809088c060 | 347992 | NULL |
| 2022-01-18 01:22:03 | /dev/vdc | 051d57a7-40d7-4854-80b2-8e809088c060 | 348006 | 37360a51-26a9-44dc-95b0-d475ca633396 |
| 2022-01-18 01:24:06 | /dev/vdc | 051d57a7-40d7-4854-80b2-8e809088c060 | 348034 | d7d5db37-c2c5-48fb-b5bf-4738bbf6962c |
| 2022-01-18 01:29:19 | /dev/vdc | 051d57a7-40d7-4854-80b2-8e809088c060 | 348060 | fae11994-fb45-4e35-8ce0-26149bf51dc4 |
| 2022-01-18 01:31:21 | /dev/vdc | 051d57a7-40d7-4854-80b2-8e809088c060 | 348072 | 47aef71c-f85d-46c0-ab89-4ab494558cf7 |武汉车险
| 2022-01-18 01:35:24 | /dev/vdc | 051d57a7-40d7-4854-80b2-8e809088c060 | 348090 | aff7ec9a-ad1e-420a-8394-d02c074979cd |
| 2022-01-18 01:36:26 | /dev/vdc | 051d57a7-40d7-4854-80b2-8e809088c060 | 348108 | NULL |
| 2022-01-18 01:38:28 | /dev/vdc | 051d57a7-40d7-4854-80b2-8e809088c060 | 348114 | 1f554112-fb2c-40e4-8d50-c0c032d2cc08 |
| 2022-01-18 01:42:31 | /dev/vdc | 051d57a7-40d7-4854-80b2-8e809088c060 | 348138 | 5d53df66-ff9b-4ac6-8a52-87330fea1704 |
| 2022-01-18 01:44:34 | /dev/vdc | 051d57a7-40d7-4854-80b2-8e809088c060 | 348152 | 2b7d0571-c3df-4def-8057-6c6fd0725476 |
| 2022-01-18 01:46:37 | /dev/vdc | 051d57a7-40d7-4854-80b2-8e809088c060 | 348164 | 6a035859-8ed8-4cf8-955f-f4ab2a034b45 |
| 2022-01-18 01:48:38 | /dev/vdc | 051d57a7-40d7-4854-80b2-8e809088c060 | 348186 | 899900d2-2f5d-4412-b476-1e5fd32fe6d7 |
| 2022-01-18 01:52:39 | /dev/vdc | 051d57a7-40d7-4854-80b2-8e809088c060 | 348214 | d4a4355c-6a89-4e1a-8d81-16f0c485f688 |
| 2022-01-18 01:56:45 | /dev/vdc | 051d57a7-40d7-4854-80b2-8e809088c060 | 348246 | 02d2195e-dc3e-4ec9-88ae-b91b8efb0cdf |
| 2022-01-18 01:58:48 | /dev/vdc | 051d57a7-40d7-4854-80b2-8e809088c060 | 348258 | 8c0baa4f-c69c-44e6-95e0-159ec99f6cbb |
| 2022-01-18 02:00:45 | /dev/vdc | 051d57a7-40d7-4854-80b2-8e809088c060 | 0 | NULL |
+---------------------+-------------+--------------------------------------+---------+--------------------------------------+
确实该盘尚未删除,⽽且也未对应到⼀个attachment_id 数据是不完整的,所以重置该盘为未挂载态,
后续重新挂载
select instance_uuid,updated_at,device_name,volume_id,deleted,attachment_id from block_device_mapping where volume_id='051d57a7-40d7-4854-80b2-8e809088c06
发布评论