找回密码
 注册
查看: 19|回复: 0

cinder volume状态因配置错误无法删除,通过调整数据库update数据删除

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2025-2-22 13:31:39 | 显示全部楼层 |阅读模式
[root@streamcontroller ~]# cinder service-list
# H9 v" q( l& p, u+------------------+-----------------------+------+----------+-------+----------------------------+-----------------+3 ^5 i* K7 t- K& [/ q; b9 p
| Binary           | Host                  | Zone | Status   | State | Updated_at                 | Disabled Reason |& ~" j0 C0 S: g% D: J+ N
+------------------+-----------------------+------+----------+-------+----------------------------+-----------------+7 a! ~0 G& r1 `& t" J( E
| cinder-scheduler | streamcontroller      | nova | enabled  | up    | 2025-02-22T05:23:32.000000 | -               |
  u/ Z% z% l, d; K| cinder-volume    | rbd:images@images     | nova | enabled  | up    | 2025-02-22T05:23:32.000000 | -               |; z% ?" o, ~- [  W. V# x
| cinder-volume    | rbd:volumes@volumes   | nova | enabled  | up    | 2025-02-22T05:23:32.000000 | -               |6 M+ E# r$ ]' `9 P) k' _
| cinder-volume    | streamcontroller@ceph | nova | disabled | down  | 2025-02-22T05:02:19.000000 | -               |
) X; X4 y6 H( D+------------------+-----------------------+------+----------+-------+----------------------------+-----------------+7 v+ K: ?' M+ \
[root@streamcontroller ~]# mysql -uroot -p$ c( Z- M9 V* N  J" U
Enter password:
2 e7 b% C! T" O" W' ZWelcome to the MariaDB monitor.  Commands end with ; or \g.' L- ]7 H, v) S+ O8 v0 {
Your MariaDB connection id is 316
  d- w9 t% w8 Z5 _$ @. sServer version: 10.5.27-MariaDB MariaDB Server: ^" ^, ~" _; `" n% |' A. D/ }( C
7 C$ Y* M- Y7 i# e: h: F4 c
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.' ~, ^, Z! i; @0 V2 L8 Y+ K& C
( o0 _4 {- |  v
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.$ _; U# Z1 J% z( p7 s, ?5 A9 ^! d
6 x; f# W) V# Q' a' I
MariaDB [(none)]> user cinder3 f& q9 i9 i$ `
    -> ;, q7 |& s+ _' w: @( i& k# |
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'user cinder' at line 1
" {- u1 B; c, w" u$ J' G8 JMariaDB [(none)]> show databases;
2 x$ _8 e  z( Q; b* w$ v+--------------------+
5 h' |  A& h8 E  x: I: n| Database           |
8 v6 R3 Q% X, N7 X! M6 K9 d, o+--------------------+5 v) ^! P4 N! Z) Z/ ^$ e/ F$ M3 }
| cinder             |, J1 P% k* j. L# w5 h1 v+ c
| glance             |
0 l8 k, j+ q7 |9 {. W2 x| information_schema |
* b/ ~; Z: U' P& T/ @| keystone           |3 Y, E5 ?2 p% J9 [3 m! R
| mysql              |. a0 I. {% Q- R- E& k
| neutron            |4 q9 B8 E9 X  \
| nova               |: @. ^8 a4 e7 t* \% l# \3 a: A2 C
| nova_api           |5 E! g" A4 M- E5 d7 u7 S0 A
| nova_cell0         |+ M  l0 b- D. p9 u2 p' ]
| performance_schema |
8 W8 @/ }5 |5 {6 X7 D6 X& t5 A| placement          |
) D3 D" {) Q& Q% p$ r( x+--------------------+( O5 N9 q9 _% ^- {
11 rows in set (0.044 sec)
5 u7 h9 ^2 W9 G; a5 B% A: m0 x6 Q) b7 u( |- a7 _
MariaDB [(none)]> use cinder
% G; B: s3 x& D* sReading table information for completion of table and column names
9 M) j9 \% W5 s1 q0 O5 ~You can turn off this feature to get a quicker startup with -A1 f5 q- M& j* _- N' c8 y, O. k

4 a4 t& d& e) F+ u2 {5 qDatabase changed3 U1 ?/ T% `; ]8 Z6 ~* O
MariaDB [cinder]> show tables;
. C7 d; W& P7 ]8 @+----------------------------+# T  D( X9 \, _7 c: a# o
| Tables_in_cinder           |! F1 @6 }) L" _& K
+----------------------------+
3 @9 y' L/ S4 T" _! A6 a: a| alembic_version            |+ U  z! b; Y  ?1 H2 J
| attachment_specs           |, Z) i/ R' i6 m* b; h; {
| backup_metadata            |# B  u7 M. I) `1 K4 e
| backups                    |
2 U0 R5 ^3 x  w| cgsnapshots                |0 f' m( |! G0 n6 l
| clusters                   |+ Z6 k4 q; _+ l
| consistencygroups          |
3 F0 c- c0 c  d; V/ N8 V! W2 r| default_volume_types       |
) {9 x; a8 M0 s9 o& F/ p| driver_initiator_data      |
$ E0 I9 b1 O  D. h8 A: || encryption                 |2 ?5 w+ i& Y( ~: r7 _/ @
| group_snapshots            |9 g! H' @4 T5 G
| group_type_projects        |9 c4 }+ w# j  B# i
| group_type_specs           |, O# u8 e2 Q7 h" F
| group_types                |' ^! E( n' Z; {/ E: r6 y( K" m
| group_volume_type_mapping  |' Y2 F- b* e7 n7 b1 F' h
| groups                     |
6 O4 b1 h) T0 h" ]. j! T+ \  Q| image_volume_cache_entries |+ J  \8 \' k; h# A4 i: z# Z
| messages                   |+ E) b- a, \' i  q8 p& C
| quality_of_service_specs   |
5 Y+ K! \5 u/ f/ x| quota_classes              |
8 B, D* L0 [, g, B2 s| quota_usages               |
. O, D( o6 b: o5 f  I" e| quotas                     |
8 F7 F6 p* w2 y# M& A| reservations               |; H5 z+ M/ w7 R( F" w" a
| services                   |: t% b/ @  N' w8 S
| snapshot_metadata          |
9 s9 [. a( p1 A2 h) D5 V+ O6 c+ i| snapshots                  |
/ L4 r( j3 G/ P/ Q5 p| transfers                  |* W/ a, U/ e0 z
| volume_admin_metadata      |
) O- ?) S# {. A% E| volume_attachment          |
+ a& G0 M9 V7 E% J3 ?/ ~| volume_glance_metadata     |! i) a3 ]( B9 @
| volume_metadata            |
/ W1 ^" V7 R+ h  B0 `| volume_type_extra_specs    |3 D/ v3 [# K) I' S  ~: j
| volume_type_projects       |9 X' n) K5 u' T0 {
| volume_types               |7 X2 L$ k0 M1 \5 e( W& h
| volumes                    |4 _4 \1 \6 d! z( e& h
| workers                    |
5 X! O* K1 _% R/ e! j( H/ y+----------------------------+1 Q& d5 c1 ~# A* s0 E
36 rows in set (0.001 sec). X# H/ J: P7 w) i

) m& n0 ~: n  d) O/ g1 @& X% gMariaDB [cinder]> select * from services;
) b/ E- W; a+ P+---------------------+---------------------+------------+---------+----+-----------------------+------------------+------------------+--------------+----------+-------------------+-----------------+---------------------+---------------------+------------------------+--------------------+--------+-------------------+--------------+--------------------------------------+8 i: R" ^  {& t( y1 _! ~( l" k8 d
| created_at          | updated_at          | deleted_at | deleted | id | host                  | binary           | topic            | report_count | disabled | availability_zone | disabled_reason | modified_at         | rpc_current_version | object_current_version | replication_status | frozen | active_backend_id | cluster_name | uuid                                 |
+ C6 j, K" u) R1 |+---------------------+---------------------+------------+---------+----+-----------------------+------------------+------------------+--------------+----------+-------------------+-----------------+---------------------+---------------------+------------------------+--------------------+--------+-------------------+--------------+--------------------------------------+0 Y" T9 J% E3 G! g8 {  V
| 2025-02-21 08:46:15 | 2025-02-22 05:24:42 | NULL       |       0 |  1 | streamcontroller      | cinder-scheduler | cinder-scheduler |         7311 |        0 | nova              | NULL            | NULL                | 3.12                | 1.39                   | not-capable        |      0 | NULL              | NULL         | 25a9a766-4a38-4865-a579-20fc13311a1d |& O& c# K- t4 Q. i, \& Q+ f9 T
| 2025-02-21 08:54:12 | 2025-02-22 04:21:32 | NULL       |       0 |  2 | streamcontroller@ceph | cinder-volume    | cinder-volume    |            0 |        1 | nova              | NULL            | 2025-02-22 05:02:19 | 3.18                | 1.39                   | not-capable        |      0 | NULL              | NULL         | 0842668e-c3d1-46e4-a06a-d49220948c49 |" j' D) d+ f2 u0 ^  n/ m5 X1 h
| 2025-02-22 05:00:22 | 2025-02-22 05:24:42 | NULL       |       0 |  3 | rbd:volumes@volumes   | cinder-volume    | cinder-volume    |           39 |        0 | nova              | NULL            | NULL                | 3.18                | 1.39                   | disabled           |      0 | NULL              | NULL         | 7cb2a139-c176-4195-8f8d-fffc81872145 |- X; c: E9 ]5 w# y# }
| 2025-02-22 05:00:22 | 2025-02-22 05:24:42 | NULL       |       0 |  4 | rbd:images@images     | cinder-volume    | cinder-volume    |           39 |        0 | nova              | NULL            | NULL                | 3.18                | 1.39                   | disabled           |      0 | NULL              | NULL         | 14a90401-32ec-482e-94fd-d36e46e8f823 |4 Y3 Y; h1 [+ @% l3 a  A8 f
+---------------------+---------------------+------------+---------+----+-----------------------+------------------+------------------+--------------+----------+-------------------+-----------------+---------------------+---------------------+------------------------+--------------------+--------+-------------------+--------------+--------------------------------------+
/ C. W( o9 t2 @5 K4 rows in set (0.001 sec)' O2 k! y7 \4 J( y6 p* C! W$ a/ g& R

+ U; O& l8 [! D" ^0 |MariaDB [cinder]> select * from services\G;
2 M2 t3 ?7 Q$ Z7 i! r) l6 D*************************** 1. row ***************************
  k3 k" T( W: f3 [1 i. L9 A            created_at: 2025-02-21 08:46:15
2 B! n% V6 c9 |% f            updated_at: 2025-02-22 05:24:52
' f* t3 ~/ w' e$ F1 E3 y- ]5 x            deleted_at: NULL8 N, o. `) P8 ^
               deleted: 0
4 t/ _- ^! b6 ^7 p! u7 P                    id: 1
9 `& r0 k1 ?7 [  i4 K                  host: streamcontroller
) B6 U( I+ X7 _                binary: cinder-scheduler
7 s" A& W! |3 H9 \; k                 topic: cinder-scheduler
' V  K) G6 y6 s/ e$ W$ ^) a4 `          report_count: 7312
, Q+ v/ D3 w7 o, q/ E& ~              disabled: 0
, b/ p/ E: \, l+ S& ?0 Z     availability_zone: nova
4 ~" S  B, `. y: [  N/ {2 N       disabled_reason: NULL! e/ Y" I6 Q( d; e4 W& A- s2 z" d
           modified_at: NULL
% `* |) B9 `1 Z5 Q" r: o. ]   rpc_current_version: 3.12. T, ~2 ~2 g7 n
object_current_version: 1.39
# Y+ y- G$ b5 {7 o- e6 |    replication_status: not-capable! r7 e  d0 ^2 {! p% {3 }
                frozen: 0
+ Y4 y6 P; f0 o+ {) X# Q% Z. \% u, M     active_backend_id: NULL+ w1 R/ m0 C) S# o1 P- F& F
          cluster_name: NULL3 b9 V  Y$ a  f  y9 ]
                  uuid: 25a9a766-4a38-4865-a579-20fc13311a1d
: y# V" U  B" Z/ E/ @) [# w, Z, x& b" c
查询相关语句:
9 Y. \6 V4 ^' o( q; JMariaDB [cinder]> select id,uuid,host,deleted from services;' A7 M% x, l4 n. s- _* n: ^6 T
+----+--------------------------------------+-----------------------+---------+
' Z; r! E! r7 X| id | uuid                                 | host                  | deleted |" \1 S9 |% z9 ^, M) l4 ?. p
+----+--------------------------------------+-----------------------+---------+) }! d! R" t8 Y* d5 y! F  Z
|  1 | 25a9a766-4a38-4865-a579-20fc13311a1d | streamcontroller      |       0 |$ i- d) ?- M* e
|  2 | 0842668e-c3d1-46e4-a06a-d49220948c49 | streamcontroller@ceph |       0 |$ |/ S& L* L4 \, k5 x
|  3 | 7cb2a139-c176-4195-8f8d-fffc81872145 | rbd:volumes@volumes   |       0 |, s4 U  X5 u3 \! V' v
|  4 | 14a90401-32ec-482e-94fd-d36e46e8f823 | rbd:images@images     |       0 |
& f$ R$ j1 W) o. K( B# ^: t5 R' _+----+--------------------------------------+-----------------------+---------+- o. p4 i; k  ~2 c- v
4 rows in set (0.001 sec)
- q( ?  c) v' ^$ _# o* z6 d. ]3 t8 g6 s/ m  T, u" l
设置状态deleted为1:6 H: \( g1 n+ G# ~& S; t

7 e: \+ N2 z5 F1 L# gMariaDB [cinder]> update cinder.services set deleted='1' where uuid='0842668e-c3d1-46e4-a06a-d49220948c49';. K( v5 v5 P7 t2 T$ l# [5 q
Query OK, 1 row affected (0.001 sec)9 D6 Q9 t: D) p" g8 Z) M# C
Rows matched: 1  Changed: 1  Warnings: 0* S! s" {+ O- f" M* _/ W

: R1 r( ?4 k( I% K3 Z5 @MariaDB [cinder]> select id,uuid,host,deleted from services;
; L5 ]; ?6 q( o9 ~" @+----+--------------------------------------+-----------------------+---------+
$ e+ \1 @9 m1 y! }' t5 a| id | uuid                                 | host                  | deleted |
9 Q6 ?3 i* Y% c+ L! k, A# g; G+----+--------------------------------------+-----------------------+---------+; T% R$ F6 h0 s9 I6 Z) N+ @
|  1 | 25a9a766-4a38-4865-a579-20fc13311a1d | streamcontroller      |       0 |
) H) C* T2 y) Q: P  t) q+ Z|  2 | 0842668e-c3d1-46e4-a06a-d49220948c49 | streamcontroller@ceph |       1 |
8 Z: H4 j+ X$ x( T% ~3 O$ x) m|  3 | 7cb2a139-c176-4195-8f8d-fffc81872145 | rbd:volumes@volumes   |       0 |
$ A: d2 f5 d2 i! n|  4 | 14a90401-32ec-482e-94fd-d36e46e8f823 | rbd:images@images     |       0 |
) V- \. Y1 o1 r9 R3 i# Y+----+--------------------------------------+-----------------------+---------+
$ y/ l# n) r9 ?4 rows in set (0.001 sec)+ Q: C. G, u; O: F7 p) k% _

% E+ R! j8 V  C3 ^, k# L7 ?再次检查状态:
+ Q9 i8 s6 N5 v: d) a- |9 ~3 Q$ V[root@streamcontroller ~]# cinder service-list
0 [7 D; T9 V# y; |4 o+------------------+---------------------+------+---------+-------+----------------------------+-----------------+) h! Z) Q+ Y% \, w/ V
| Binary           | Host                | Zone | Status  | State | Updated_at                 | Disabled Reason |
/ d% w( o9 Y! L+ l( Y9 t/ Q+------------------+---------------------+------+---------+-------+----------------------------+-----------------+
0 M. ~5 K  T; b+ m| cinder-scheduler | streamcontroller    | nova | enabled | up    | 2025-02-22T05:31:32.000000 | -               |% q/ }1 J. f4 x% j$ E
| cinder-volume    | rbd:images@images   | nova | enabled | up    | 2025-02-22T05:31:32.000000 | -               |
) o. c. n9 X' R3 v| cinder-volume    | rbd:volumes@volumes | nova | enabled | up    | 2025-02-22T05:31:32.000000 | -               |
3 |+ X, X! ?. P. Z7 S+------------------+---------------------+------+---------+-------+----------------------------+-----------------+% P2 D2 r6 ?0 N) N* {
6 p  u( z8 v2 u4 O% t' o5 A
+ u  E" v) G" [8 ^4 q

6 F! Y: {" p! B+ h# _4 ]5 B0 a
您需要登录后才可以回帖 登录 | 注册

本版积分规则

返回首页|Archiver|手机版|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )

GMT+8, 2026-6-12 02:03 , Processed in 0.021448 second(s), 22 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表