易陆发现互联网技术论坛

 找回密码
 开始注册
查看: 2|回复: 0
收起左侧

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

[复制链接]
发表于 2025-2-22 13:31:39 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?开始注册

x
[root@streamcontroller ~]# cinder service-list ) P# N: c7 i0 `( G7 Y3 e/ `
+------------------+-----------------------+------+----------+-------+----------------------------+-----------------+
, A9 G0 a8 L8 x( b1 J8 e| Binary           | Host                  | Zone | Status   | State | Updated_at                 | Disabled Reason |
  ]- }9 U6 d4 T8 @0 V/ h+------------------+-----------------------+------+----------+-------+----------------------------+-----------------+. m3 t& o6 g! `# H/ V& Q3 A
| cinder-scheduler | streamcontroller      | nova | enabled  | up    | 2025-02-22T05:23:32.000000 | -               |
5 T4 }  k, q  u1 `| cinder-volume    | rbd:images@images     | nova | enabled  | up    | 2025-02-22T05:23:32.000000 | -               |9 ]) G. [+ \% N8 t
| cinder-volume    | rbd:volumes@volumes   | nova | enabled  | up    | 2025-02-22T05:23:32.000000 | -               |: m  d$ r/ A% V3 t6 F. Y* `" |
| cinder-volume    | streamcontroller@ceph | nova | disabled | down  | 2025-02-22T05:02:19.000000 | -               |' g) _" r3 `+ d) m4 |. |
+------------------+-----------------------+------+----------+-------+----------------------------+-----------------+
7 r8 T: a" Q* e/ d+ f" ~[root@streamcontroller ~]# mysql -uroot -p
7 V: r5 P6 J5 L) \/ D6 yEnter password:
* d% Q& z' E9 [4 e, j, gWelcome to the MariaDB monitor.  Commands end with ; or \g.$ }3 m) P* @9 @' ^! X1 f
Your MariaDB connection id is 316
1 j" Q! V5 Q8 U$ U6 l3 U8 k4 yServer version: 10.5.27-MariaDB MariaDB Server
, `3 K; k( y  ?2 d5 `1 o$ L
5 W4 B; {( n. A9 WCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.& ?3 A2 V! w. ]% I4 y# S7 e5 v6 ~
) @8 V3 \" f3 w# w
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.* H; i$ K3 J% |$ F! w

8 C! }# W# E+ b" F5 eMariaDB [(none)]> user cinder9 m# q$ @8 a, }" p
    -> ;
5 ^# y# @5 ^) Q, P6 D, E$ f; rERROR 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
' f$ H) f/ `  R- a; ZMariaDB [(none)]> show databases;1 f; j8 E3 A# k8 v3 C
+--------------------+
' L, q5 c- V2 G' B  n| Database           |. h& e7 k' i+ t! M4 [; K* Y
+--------------------+2 r! c* F8 V" [( c1 P2 x8 S
| cinder             |
8 m5 N- u9 l0 f5 A/ m| glance             |
  O; D. w7 B8 w0 p) ^, a0 Y: o! k| information_schema |
8 c& J3 g1 Z( j8 K* g( l| keystone           |; X) b. ?) y: d$ T
| mysql              |
% d  O2 @% N* A/ ^| neutron            |$ J) H& z  N2 @$ f
| nova               |& q+ S$ b0 v5 t2 I, ^) ?9 X" `
| nova_api           |* J4 O$ g' P! Q0 k0 a
| nova_cell0         |7 n- O$ a+ s) ~- a1 e
| performance_schema |
. [7 w) K0 h' b1 j8 M$ y; {| placement          |
7 N/ t; U+ X- w7 u& T& I+--------------------+0 h4 r2 H1 v& L$ Z9 j4 z0 T. U
11 rows in set (0.044 sec)
  U  w' L1 A$ C- m. ^. v
2 P7 n  {: y* [9 H! A2 m1 t7 nMariaDB [(none)]> use cinder7 F1 X, [  i& A7 f- O1 c) X% q
Reading table information for completion of table and column names
0 w( r) @  C9 ~( N9 B2 u& tYou can turn off this feature to get a quicker startup with -A0 y8 A8 g3 l- L  b% y
# {6 e& F% }9 [& i. R9 r
Database changed
, w% l( ]+ X8 cMariaDB [cinder]> show tables;
/ b; Q. W; s" m) |( t) _- X$ e+----------------------------+* t  @: G' m9 G( S  B( B
| Tables_in_cinder           |' b" c# [/ I* p7 A1 e  s
+----------------------------+/ d/ `) d( \3 u$ M
| alembic_version            |
. T: @+ l/ A" Y| attachment_specs           |+ h/ Z- Q1 `0 @9 \  F
| backup_metadata            |
! O2 Q4 m# ^* y+ N| backups                    |$ v* [2 U( {7 s; ~. _
| cgsnapshots                |
# E# j- D( G& s6 J# K* O9 k* \| clusters                   |5 w. u8 |6 y8 b
| consistencygroups          |
' {) j, N% I! {& t6 i* `; D| default_volume_types       |
$ ^2 a& F+ p5 @, T. Y7 ]8 q0 N8 `' Z| driver_initiator_data      |
- i- ?& @5 ]* K' t- S: c) T| encryption                 |+ a# q! S5 w, U+ ]: i$ }4 ]
| group_snapshots            |
' U7 Q8 T. E6 D' [' z| group_type_projects        |
; M" O3 }/ u; i6 b3 `1 a, {| group_type_specs           |
; I( D; A' J. C| group_types                |
& ]! s9 M2 P. E9 o- i| group_volume_type_mapping  |
4 @# ?8 x7 R5 S& o# m| groups                     |5 _: l& Q2 u- }% n' P  f+ H2 F
| image_volume_cache_entries |
- e+ t4 h3 \( c# `- K8 V. W" h6 {| messages                   |4 D( X, k3 ?1 ?" M0 F
| quality_of_service_specs   |, i" _/ Q7 x8 ?* L2 D( X
| quota_classes              |
+ c1 }+ r6 ^) v| quota_usages               |" _- P& l5 R/ l% p
| quotas                     |) t8 ]6 o/ M0 ]4 a4 t
| reservations               |8 o5 ~7 J5 X4 n& s& M, i; G
| services                   |* D9 ~3 I0 O* |$ o
| snapshot_metadata          |
% d" x/ g2 D2 ?' e| snapshots                  |
- T2 W) q8 U3 A( p| transfers                  |! v& L9 {7 }3 S" T0 o; h/ L  m
| volume_admin_metadata      |
; ?1 D! L3 ^6 W8 l/ z4 k- R! c| volume_attachment          |
+ y7 t  X: d7 y7 f8 N  y| volume_glance_metadata     |
* e% ~: I0 Z. m2 J! k$ O| volume_metadata            |
  S' g4 O6 h6 w; M| volume_type_extra_specs    |, `+ S( x6 d" @4 Y
| volume_type_projects       |
' O. p$ J: X( Q| volume_types               |
6 R& p4 b7 E0 W| volumes                    |' ]6 N; f8 G6 y6 y9 u
| workers                    |
! o0 T, o  I$ x. F6 X+----------------------------+& D# X2 V* e/ X2 x
36 rows in set (0.001 sec)
5 ]2 O# A5 Z) x- O$ g& t4 O" ]2 W  t3 M
MariaDB [cinder]> select * from services;
' M" B. f, r8 ~2 W7 g4 T1 ?+---------------------+---------------------+------------+---------+----+-----------------------+------------------+------------------+--------------+----------+-------------------+-----------------+---------------------+---------------------+------------------------+--------------------+--------+-------------------+--------------+--------------------------------------+
5 {/ D7 T( W3 B6 J9 r, y5 n| 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                                 |
* c! y$ g! e5 G. D0 L$ n# u+---------------------+---------------------+------------+---------+----+-----------------------+------------------+------------------+--------------+----------+-------------------+-----------------+---------------------+---------------------+------------------------+--------------------+--------+-------------------+--------------+--------------------------------------+. g) N: h) _( E/ y: _
| 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 |
+ e1 J# B6 _" k| 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 |
- e" o1 p" u/ e0 e| 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 |+ p: b2 D! E* h9 M
| 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 |
6 O: \9 O, B5 j* X- Q( c6 W3 D7 S+---------------------+---------------------+------------+---------+----+-----------------------+------------------+------------------+--------------+----------+-------------------+-----------------+---------------------+---------------------+------------------------+--------------------+--------+-------------------+--------------+--------------------------------------+
( a  T9 s  R- g/ F. @$ r4 rows in set (0.001 sec)
# x8 |8 }: F. `- ]- |; E5 w/ I; D7 N. }8 R' G9 v, ^
MariaDB [cinder]> select * from services\G;! B; B, V6 |% _2 k0 m) z7 c7 P
*************************** 1. row ***************************1 z" g# h3 x$ M$ \" k. B2 w& d2 |1 L
            created_at: 2025-02-21 08:46:15
1 O; ~1 H1 g& X, B            updated_at: 2025-02-22 05:24:52
, c- n0 s0 w% @, J) O            deleted_at: NULL
2 c" K& |9 y  M& X/ ^: d8 z               deleted: 0/ {* q1 l  n4 N1 ?
                    id: 1
* K8 t. f. ^0 S* J                  host: streamcontroller: G% T% v; z: X. ?# |: O7 W
                binary: cinder-scheduler! O- z5 b1 F& b+ C4 U, B
                 topic: cinder-scheduler
: g! R$ v1 T# @          report_count: 7312
' T& K7 e1 g3 K: G0 H6 I              disabled: 0" f  Q# F* X9 x; b
     availability_zone: nova  e) a6 l  C# o0 ?# g. R
       disabled_reason: NULL
7 z+ k- G6 T6 G           modified_at: NULL. C$ r- q' }5 C# Q
   rpc_current_version: 3.12; c% ]' a% ]. @) X/ O) {
object_current_version: 1.39" ~& b( _# y0 N: B7 u
    replication_status: not-capable& z! u0 o- |4 g  E
                frozen: 0
$ S9 X1 v( E" X) z% R  ?     active_backend_id: NULL( E" {" {) U( B
          cluster_name: NULL
1 i9 ?' o6 W0 @4 [3 ~                  uuid: 25a9a766-4a38-4865-a579-20fc13311a1d) q3 B! d: Y$ O

" a* E+ E9 x( `3 A查询相关语句:
  f* s) F) k# w" N. qMariaDB [cinder]> select id,uuid,host,deleted from services;6 u( x  g: ]1 a: {
+----+--------------------------------------+-----------------------+---------+" A( S# u. \$ j0 d0 [4 `
| id | uuid                                 | host                  | deleted |9 j3 ^. c% k9 H9 d8 t; V
+----+--------------------------------------+-----------------------+---------+
, U# I0 z6 X9 g5 X|  1 | 25a9a766-4a38-4865-a579-20fc13311a1d | streamcontroller      |       0 |1 H9 b. u9 ^" F! c% w
|  2 | 0842668e-c3d1-46e4-a06a-d49220948c49 | streamcontroller@ceph |       0 |
4 P. _+ l8 K$ X( F( J. d, A|  3 | 7cb2a139-c176-4195-8f8d-fffc81872145 | rbd:volumes@volumes   |       0 |1 [; p. s) }4 l* ?
|  4 | 14a90401-32ec-482e-94fd-d36e46e8f823 | rbd:images@images     |       0 |( R4 r7 u. h& P, p1 Z0 ?
+----+--------------------------------------+-----------------------+---------+
2 A) D6 z; H  G* X- R4 rows in set (0.001 sec)
; t: i4 b+ R: I8 h+ a& O& s- i# w$ p3 @' }0 U5 I
设置状态deleted为1:1 {* K" X% n+ t8 s
1 O1 C! m1 I+ _; A" v' W
MariaDB [cinder]> update cinder.services set deleted='1' where uuid='0842668e-c3d1-46e4-a06a-d49220948c49';
9 U3 h# U& f% m2 g4 d0 AQuery OK, 1 row affected (0.001 sec)
7 D, b3 k1 t4 Z9 w) ~5 ?, rRows matched: 1  Changed: 1  Warnings: 0+ M5 y. s& g' k

6 a2 X( Q# }9 ?: aMariaDB [cinder]> select id,uuid,host,deleted from services;2 t" I1 E6 t: n2 X
+----+--------------------------------------+-----------------------+---------+$ _5 D8 |( ^5 ?- }# g/ t
| id | uuid                                 | host                  | deleted |' J  x/ H$ Z0 Q& A1 u7 x. e
+----+--------------------------------------+-----------------------+---------+
; q+ s# w, h. Z5 `8 H3 n. \|  1 | 25a9a766-4a38-4865-a579-20fc13311a1d | streamcontroller      |       0 |
, k" z% m3 [0 l0 s/ ?|  2 | 0842668e-c3d1-46e4-a06a-d49220948c49 | streamcontroller@ceph |       1 |  d6 L2 ]9 B" G5 ?
|  3 | 7cb2a139-c176-4195-8f8d-fffc81872145 | rbd:volumes@volumes   |       0 |8 i8 U. o  N) v3 \
|  4 | 14a90401-32ec-482e-94fd-d36e46e8f823 | rbd:images@images     |       0 |# ?9 S' b& n0 {4 r& b2 a
+----+--------------------------------------+-----------------------+---------+
! T" d8 b: ?. _- _& w4 rows in set (0.001 sec)
) t/ W. S! |+ t
2 r& c+ l2 v; ]/ O4 @. G! Y$ T再次检查状态:6 F: B5 T9 M6 E% s* A- h4 Y$ K
[root@streamcontroller ~]# cinder service-list ( v/ W7 X8 M& m& Y. |8 B+ w8 C* L
+------------------+---------------------+------+---------+-------+----------------------------+-----------------+; ~* s$ T- r+ P% {. m; \
| Binary           | Host                | Zone | Status  | State | Updated_at                 | Disabled Reason |9 w8 c7 Z9 j2 L3 G# `
+------------------+---------------------+------+---------+-------+----------------------------+-----------------+8 G# ^% ~! V/ k1 q8 v5 c: R
| cinder-scheduler | streamcontroller    | nova | enabled | up    | 2025-02-22T05:31:32.000000 | -               |
4 x/ H- h0 h+ a( p9 {+ B6 a- l| cinder-volume    | rbd:images@images   | nova | enabled | up    | 2025-02-22T05:31:32.000000 | -               |
) m/ Q0 b7 s0 ^8 @  A0 E+ R| cinder-volume    | rbd:volumes@volumes | nova | enabled | up    | 2025-02-22T05:31:32.000000 | -               |
0 K" C2 [% M7 P9 k, B/ x/ Q5 X+------------------+---------------------+------+---------+-------+----------------------------+-----------------+3 r, f5 q& d0 a. ^4 t$ M
3 J$ U, W/ Q' _/ w
& z- i: W% K+ f# _

5 J+ V& e* [3 _! f/ m
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

站长推荐上一条 /4 下一条

北京云银创陇科技有限公司以云计算运维,代码开发

QQ|返回首页|Archiver|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )点击这里给我发消息

GMT+8, 2026-4-8 19:57 , Processed in 0.051472 second(s), 21 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

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