易陆发现互联网技术论坛

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

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

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

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

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

x
[root@streamcontroller ~]# cinder service-list ) A( {0 @  g7 u' w
+------------------+-----------------------+------+----------+-------+----------------------------+-----------------+2 u) y* S8 ~8 u, M# u
| Binary           | Host                  | Zone | Status   | State | Updated_at                 | Disabled Reason |
& ?# Z( b/ Z0 E4 e& a  j% j+------------------+-----------------------+------+----------+-------+----------------------------+-----------------+6 C# ]5 J' T! D+ ^, U2 A' B
| cinder-scheduler | streamcontroller      | nova | enabled  | up    | 2025-02-22T05:23:32.000000 | -               |
3 S3 {5 \# ]" X- S' f| cinder-volume    | rbd:images@images     | nova | enabled  | up    | 2025-02-22T05:23:32.000000 | -               |( o. F  m7 w7 r; Z
| cinder-volume    | rbd:volumes@volumes   | nova | enabled  | up    | 2025-02-22T05:23:32.000000 | -               |; z: D" u3 U4 C
| cinder-volume    | streamcontroller@ceph | nova | disabled | down  | 2025-02-22T05:02:19.000000 | -               |
+ V$ ?4 y7 e. m+------------------+-----------------------+------+----------+-------+----------------------------+-----------------+8 a9 u+ s2 c: ^4 u: N' k
[root@streamcontroller ~]# mysql -uroot -p
( q) ]% n5 a5 m1 D, P% a& W8 i0 DEnter password: 8 W3 ~* O7 o! m8 H  S0 \- P5 g1 V
Welcome to the MariaDB monitor.  Commands end with ; or \g.
2 F. I0 P* Y6 u& ZYour MariaDB connection id is 3169 G9 m0 t3 u+ E. z. |# O7 y; s
Server version: 10.5.27-MariaDB MariaDB Server
( J* C9 \% ]9 n2 w  a. K$ ?& a& O- E% [, ^' y
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.( m# `! D3 l0 [( u, |# ?

8 r, S5 R) S! d1 R1 B( I9 qType 'help;' or '\h' for help. Type '\c' to clear the current input statement.* d0 g$ R, n7 {! S9 F% X, x1 H" n

7 Y9 g' n. Y& R2 K3 w  EMariaDB [(none)]> user cinder
( ^% B$ a. \# U7 b0 c0 }    -> ;7 z$ _$ l3 \3 f! Q$ N0 N
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
$ r6 L0 o) [) N# V" `0 GMariaDB [(none)]> show databases;
) [0 @; k( |" [! g+--------------------+
5 H+ x5 ~3 m! t" k5 b| Database           |7 |& F3 u# i  z% M: k  [+ q
+--------------------+
9 t, q7 F# d9 V5 G7 M2 ]| cinder             |) v" }( X. f% P8 u
| glance             |
" G0 G) @% m; \- ?7 U$ }| information_schema |! m$ c/ O% A, f/ \# e2 t) n
| keystone           |9 \$ @2 d9 V0 r5 I1 |
| mysql              |) x- Q3 ^. A. K7 r8 H7 P# _4 r
| neutron            |- J7 h6 B, c5 i' _/ j- o7 V
| nova               |9 ?( e2 s- W5 ^! v! P
| nova_api           |
6 h; \; X- S; V5 F, l2 S) `| nova_cell0         |
; x! ]1 D) O! L| performance_schema |
- z1 z0 A1 N# r| placement          |
0 Z  f! p) i4 ~# R: \- }" t: a+--------------------+
+ R5 [8 k: y1 W7 v8 D) h11 rows in set (0.044 sec)
6 r& [5 b# M6 V9 i, B% d3 @" f8 e: D# G8 m* {
MariaDB [(none)]> use cinder
7 c9 C1 l2 A5 k! t  UReading table information for completion of table and column names
3 I( I, a2 }0 U" x: c. J  pYou can turn off this feature to get a quicker startup with -A
4 ?: o4 w% c- y9 B0 v  `
. f( w9 ^1 M2 w# _& ~; f2 ^9 VDatabase changed
' L: T/ x- x' o6 i. p' \. ~0 o5 WMariaDB [cinder]> show tables;' U; h# z% i% s( j; ^: Q! X7 |4 ]! l
+----------------------------+
& R1 R$ D8 k& y/ o8 L4 u| Tables_in_cinder           |
' x! \9 v$ q  S  r1 ]) _  Y3 [+----------------------------+
" Q" r4 r4 S$ v$ t| alembic_version            |8 N) M1 Z7 i1 i* ^; P' A
| attachment_specs           |
/ d9 Q6 X3 l, M- s; b( B| backup_metadata            |
/ E6 T& o9 z8 h. E| backups                    |3 B' ^4 U: _- ~! s7 I: u; d9 Q
| cgsnapshots                |
. }  ~/ J& x! j) V: V# P$ N1 C| clusters                   |
+ n) n; P* ]2 @9 i7 k/ B| consistencygroups          |7 T  b7 k+ x2 J: c$ E  s
| default_volume_types       |
3 Z: d  I' X7 a/ Z) e| driver_initiator_data      |
2 q4 {- Y: h8 J8 ]+ `" m| encryption                 |
- c0 n& }  }. S* L9 q- E" \| group_snapshots            |
$ y+ \* Y4 @0 P- [% P| group_type_projects        |
5 r' |. ?8 M8 q0 r9 t& a7 n  k| group_type_specs           |) g6 c5 d! F9 |: ?6 g9 Z  t9 r
| group_types                |
; k6 b5 q2 S* D, F- z8 r4 w, q7 A| group_volume_type_mapping  |
% {, z2 ~  ?" _% T+ t/ K| groups                     |
; P) R! I  a5 }6 L, Y) [0 Q  F| image_volume_cache_entries |
5 Y. Q) j; b5 Y4 S/ O| messages                   |
3 ?5 E9 _7 K+ M9 D/ `| quality_of_service_specs   |
- U; M' g2 {9 i2 Z+ i: x6 B3 U8 f3 t* H| quota_classes              |( Z+ h5 D5 V. e/ |
| quota_usages               |
2 U4 V( h6 y- ^$ \% N, c+ N0 u| quotas                     |
0 k% H5 k2 u. l4 I| reservations               |
) c8 x9 z& B8 a* F. U; Z| services                   |, l7 q0 R! P- q6 h- A' f
| snapshot_metadata          |8 R# d! H1 c$ d0 X
| snapshots                  |2 n: r$ h1 Q# z& Z8 V; M
| transfers                  |! ^" c+ t; D+ v# N: j5 A( a
| volume_admin_metadata      |
% E% K+ v% a) F$ I| volume_attachment          |) |7 f( n# k7 ]6 U0 p
| volume_glance_metadata     |9 Z# n$ p1 B/ @; I- N# @) ]
| volume_metadata            |
1 Q8 j  d7 u* z* i| volume_type_extra_specs    |
) \! D' ^1 e. r8 n| volume_type_projects       |
+ z# [3 I: E1 _/ |1 S9 |& {  ]| volume_types               |
- N7 o! b7 x/ y| volumes                    |
8 s7 y$ Q* d+ X8 p% h6 u2 _1 P| workers                    |
) i  u( {; o! e- j/ c% _0 M+----------------------------+. O9 s& t$ a/ _# R, B
36 rows in set (0.001 sec)7 u6 a/ K5 ]. \, T! E

1 Y) C) f3 M1 B  \( Y8 tMariaDB [cinder]> select * from services;
4 x/ q% o& m, c7 V# X+---------------------+---------------------+------------+---------+----+-----------------------+------------------+------------------+--------------+----------+-------------------+-----------------+---------------------+---------------------+------------------------+--------------------+--------+-------------------+--------------+--------------------------------------+
0 K) V" Q! v' y| 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                                 |6 S8 P: O% v, S3 h, R
+---------------------+---------------------+------------+---------+----+-----------------------+------------------+------------------+--------------+----------+-------------------+-----------------+---------------------+---------------------+------------------------+--------------------+--------+-------------------+--------------+--------------------------------------+
) f1 I& }* k7 t3 ~. ~( O- 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 |
6 e2 C& h! ?2 || 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 |" C7 i+ q! B$ t$ G; M& W% @
| 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 |
4 o, \# o' P) }| 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 |' l- E. H1 H# c" P+ e
+---------------------+---------------------+------------+---------+----+-----------------------+------------------+------------------+--------------+----------+-------------------+-----------------+---------------------+---------------------+------------------------+--------------------+--------+-------------------+--------------+--------------------------------------+
5 U( v: B% i- k. d4 rows in set (0.001 sec)- j0 N2 }9 L3 m' ~

% r, R$ D* t. f6 U5 l) W' m: G$ @MariaDB [cinder]> select * from services\G;7 j/ q9 a  {5 @+ X
*************************** 1. row ***************************3 ~1 ~# S" H2 o
            created_at: 2025-02-21 08:46:15
7 |& L0 g& G. b( O. l) \            updated_at: 2025-02-22 05:24:52
3 r+ s  N* A( A4 J. W            deleted_at: NULL) v' X. d% F8 _( M1 |
               deleted: 0% X' Z6 a  f4 x& t3 a
                    id: 1
6 z3 d$ s5 a' X0 p                  host: streamcontroller$ j6 A/ j( {8 h' E* M
                binary: cinder-scheduler
- E( E9 s: W1 z" c                 topic: cinder-scheduler: J( C% v9 P4 \
          report_count: 7312  K0 o( [. Z4 n; l, n
              disabled: 0% B1 o7 J! K& h& S7 H6 a5 c# P
     availability_zone: nova# a. x+ z4 x9 O9 b
       disabled_reason: NULL: m8 P2 O) A; @& n
           modified_at: NULL! ^4 M! j# A. g) r: E- X5 G/ |
   rpc_current_version: 3.12
9 f4 k0 p' v+ e. ^1 ]5 ?4 a6 Gobject_current_version: 1.39/ R0 K8 H/ Y) D/ [
    replication_status: not-capable5 T+ V+ v! _: w
                frozen: 0
) n* C; ~! J9 s3 H" S     active_backend_id: NULL
* |' D$ n, }9 s/ N) N          cluster_name: NULL6 h; o3 V6 z& q3 M: r9 H
                  uuid: 25a9a766-4a38-4865-a579-20fc13311a1d7 D- M  }! S9 b8 k
0 N9 l2 w; X1 l' l' M2 S1 [
查询相关语句:
# n% F/ `1 e: R) O4 _MariaDB [cinder]> select id,uuid,host,deleted from services;' q* a0 T* J4 b( |# f2 U& S
+----+--------------------------------------+-----------------------+---------+6 m7 `9 S1 i/ T- @6 `: I$ r
| id | uuid                                 | host                  | deleted |: H7 U9 M, \8 _" u/ h+ i; u' R
+----+--------------------------------------+-----------------------+---------+  R! j0 {8 v0 ?4 I4 ^2 W
|  1 | 25a9a766-4a38-4865-a579-20fc13311a1d | streamcontroller      |       0 |5 B: E" U: ?2 Z
|  2 | 0842668e-c3d1-46e4-a06a-d49220948c49 | streamcontroller@ceph |       0 |+ t+ N4 M/ Q* f. h( k9 `# @# ^
|  3 | 7cb2a139-c176-4195-8f8d-fffc81872145 | rbd:volumes@volumes   |       0 |0 ~5 Z( w  Z( h+ H: K/ B
|  4 | 14a90401-32ec-482e-94fd-d36e46e8f823 | rbd:images@images     |       0 |7 ?1 g8 p( B8 b- f# a
+----+--------------------------------------+-----------------------+---------+
1 G! n' y$ ~8 @7 v4 rows in set (0.001 sec); N- E. `7 u) P  v6 g1 I

; {! g& k+ E' f' {设置状态deleted为1:
0 T9 v3 G8 B, c6 R& @8 e
8 e4 S3 t; g: |: q* D6 LMariaDB [cinder]> update cinder.services set deleted='1' where uuid='0842668e-c3d1-46e4-a06a-d49220948c49';7 n! W) P: `  U3 \: J4 n* E. n
Query OK, 1 row affected (0.001 sec)8 c( I* c( J' g& K2 \6 [# M
Rows matched: 1  Changed: 1  Warnings: 0
) l0 T8 M( A  ?$ `8 k& p9 r' m1 o2 `* h# V& N% P3 R
MariaDB [cinder]> select id,uuid,host,deleted from services;
/ [9 \# W# ~6 h' W" P/ ~+----+--------------------------------------+-----------------------+---------+
+ y! m) E/ L4 A4 N0 k$ t| id | uuid                                 | host                  | deleted |
5 Y- ]7 W* Q& N2 a3 ^! V+----+--------------------------------------+-----------------------+---------+
- z- z9 _7 v" C& N3 [' O|  1 | 25a9a766-4a38-4865-a579-20fc13311a1d | streamcontroller      |       0 |
0 l: r( c% p8 A0 }# g# n  F* V|  2 | 0842668e-c3d1-46e4-a06a-d49220948c49 | streamcontroller@ceph |       1 |
6 d" z+ S5 @2 B) b7 S|  3 | 7cb2a139-c176-4195-8f8d-fffc81872145 | rbd:volumes@volumes   |       0 |
8 \5 J- t0 L' C# b9 S|  4 | 14a90401-32ec-482e-94fd-d36e46e8f823 | rbd:images@images     |       0 |1 j9 e3 T: {5 h8 a
+----+--------------------------------------+-----------------------+---------+
2 R- L" z$ V, U' Q: {; J. \3 L. M4 rows in set (0.001 sec)' a  s$ j: K$ l( P" ^5 i
6 o8 _* T4 I1 ]" z$ s
再次检查状态:  J1 c- P) r* m1 {# X3 q% W4 U; H* x
[root@streamcontroller ~]# cinder service-list
2 B3 }4 r$ E$ Z, w" a! w- B+------------------+---------------------+------+---------+-------+----------------------------+-----------------+
3 V1 m" @" P1 q) Q( f+ K| Binary           | Host                | Zone | Status  | State | Updated_at                 | Disabled Reason |
+ D' w, t% `  O, I+------------------+---------------------+------+---------+-------+----------------------------+-----------------+
/ ?! b8 H# l6 u. c1 Q% X5 E7 Y| cinder-scheduler | streamcontroller    | nova | enabled | up    | 2025-02-22T05:31:32.000000 | -               |
: K$ j; e- r1 n: x0 C$ i| cinder-volume    | rbd:images@images   | nova | enabled | up    | 2025-02-22T05:31:32.000000 | -               |
$ E  [* W6 @6 b9 p( T: l| cinder-volume    | rbd:volumes@volumes | nova | enabled | up    | 2025-02-22T05:31:32.000000 | -               |
( x+ _' t& i: Z/ B4 C- ]8 |/ m5 n+------------------+---------------------+------+---------+-------+----------------------------+-----------------+
  Z' Q! R& D/ Q0 k0 K& W7 X0 b
/ u1 U' ?5 `- D$ J4 R4 I* j% \! L% a: d9 {# q5 Z
) y* ?! @$ L& T, E: R
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

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

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

QQ|返回首页|Archiver|小黑屋|易陆发现技术论坛 点击这里给我发消息

GMT+8, 2026-4-8 13:40 , Processed in 0.050199 second(s), 21 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

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