断电后,4个tikv,3个启动失败,数据丢失,急

为提高效率,请提供以下信息,问题描述清晰能够更快得到解决:

【概述】整个PVE机器断电后,这套V4集群,4个tikv3个启动提示索引丢失

【背景】PVE虚拟机的LXC容器环境,另外一套V5环境一样,集群正常

【现象】tidb连接不上

【业务影响】

【TiDB 版本】v4.0.8

【附件】

  1. TiUP Cluster Display 信息
    Cluster type: tidb
    Cluster name: wuhan-cluster
    Cluster version: v4.0.8
    Deploy user: root
    SSH type: builtin
    Dashboard URL: http://10.10.23.34:2379/dashboard
    ID Role Host Ports OS/Arch Status Data Dir Deploy Dir

10.10.23.35:9093 alertmanager 10.10.23.35 9093/9094 linux/x86_64 Down /tidb-data/alertmanager-9093 /tidb-deploy/alertmanager-9093
10.10.23.35:3000 grafana 10.10.23.35 3000 linux/x86_64 Down - /tidb-deploy/grafana-3000
10.10.23.33:2379 pd 10.10.23.33 2379/2380 linux/x86_64 Up /data/deploy/install/data/pd-2379 /data/deploy/install/deploy/pd-2379
10.10.23.34:2379 pd 10.10.23.34 2379/2380 linux/x86_64 Up|L|UI /data/deploy/install/data/pd-2379 /data/deploy/install/deploy/pd-2379
10.10.23.39:2379 pd 10.10.23.39 2379/2380 linux/x86_64 Up /data/deploy/install/data/pd-2379 /data/deploy/install/deploy/pd-2379
10.10.23.35:9090 prometheus 10.10.23.35 9090 linux/x86_64 Down /tidb-data/prometheus-9090 /tidb-deploy/prometheus-9090
10.10.23.33:4000 tidb 10.10.23.33 4000/10080 linux/x86_64 Down - /data/deploy/install/deploy/tidb-4000
10.10.23.34:4000 tidb 10.10.23.34 4000/10080 linux/x86_64 Down - /data/deploy/install/deploy/tidb-4000
10.10.23.35:4000 tidb 10.10.23.35 4000/10080 linux/x86_64 Down - /tidb-deploy/tidb-4000
10.10.23.33:20160 tikv 10.10.23.33 20160/20180 linux/x86_64 Down /data/deploy/install/data/tikv-20160 /data/deploy/install/deploy/tikv-20160
10.10.23.34:20160 tikv 10.10.23.34 20160/20180 linux/x86_64 Down /data/deploy/install/data/tikv-20160 /data/deploy/install/deploy/tikv-20160
10.10.23.39:20160 tikv 10.10.23.39 20160/20180 linux/x86_64 Up /data/deploy/install/data/tikv-20160 /data/deploy/install/deploy/tikv-20160
10.10.23.40:20160 tikv 10.10.23.40 20160/20180 linux/x86_64 Pending Offline /data/deploy/install/data/tikv-20160 /data/deploy/install/deploy/tikv-20160

  1. TiUP Cluster Edit Config 信息

  2. TiDB- Overview 监控

[2021/06/24 10:34:22.856 +08:00] [INFO] [peer.rs:159] [“create peer”] [peer_id=1512135] [region_id=1018]
[2021/06/24 10:34:22.856 +08:00] [INFO] [raft.rs:783] [“became follower at term 105”] [term=105] [raft_id=1512135] [region_id=1018]
[2021/06/24 10:34:22.856 +08:00] [INFO] [raft.rs:285] [newRaft] [peers="[(1525872, Progress { matched: 0, next_idx: 961, state: Probe, paused: false, pending_snapshot: 0, pending_request_snapshot: 0, recent_active: false, ins: Inflights { start: 0, count: 0, buffer: [] } }), (1510097, Progress { matched: 0, next_idx: 961, state: Probe, paused: false, pending_snapshot: 0, pending_request_snapshot: 0, recent_active: false, ins: Inflights { start: 0, count: 0, buffer: [] } }), (1512135, Progress { matched: 960, next_idx: 961, state: Probe, paused: false, pending_snapshot: 0, pending_request_snapshot: 0, recent_active: false, ins: Inflights { start: 0, count: 0, buffer: [] } })]"] [“last term”=105] [“last index”=960] [applied=960] [commit=960] [term=105] [raft_id=1512135] [region_id=1018]
[2021/06/24 10:34:22.856 +08:00] [INFO] [raw_node.rs:222] [“RawNode created with id 1512135.”] [id=1512135] [raft_id=1512135] [region_id=1018]
[2021/06/24 10:34:22.856 +08:00] [INFO] [peer.rs:159] [“create peer”] [peer_id=1526775] [region_id=1020]
[2021/06/24 10:34:22.856 +08:00] [INFO] [raft.rs:783] [“became follower at term 110”] [term=110] [raft_id=1526775] [region_id=1020]
[2021/06/24 10:34:22.856 +08:00] [INFO] [raft.rs:285] [newRaft] [peers="[(1526775, Progress { matched: 610539, next_idx: 610540, state: Probe, paused: false, pending_snapshot: 0, pending_request_snapshot: 0, recent_active: false, ins: Inflights { start: 0, count: 0, buffer: [] } }), (1511054, Progress { matched: 0, next_idx: 610540, state: Probe, paused: false, pending_snapshot: 0, pending_request_snapshot: 0, recent_active: false, ins: Inflights { start: 0, count: 0, buffer: [] } }), (1519510, Progress { matched: 0, next_idx: 610540, state: Probe, paused: false, pending_snapshot: 0, pending_request_snapshot: 0, recent_active: false, ins: Inflights { start: 0, count: 0, buffer: [] } })]"] [“last term”=110] [“last index”=610539] [applied=610535] [commit=610539] [term=110] [raft_id=1526775] [region_id=1020]
[2021/06/24 10:34:22.856 +08:00] [INFO] [raw_node.rs:222] [“RawNode created with id 1526775.”] [id=1526775] [raft_id=1526775] [region_id=1020]
[2021/06/24 10:34:22.856 +08:00] [INFO] [peer.rs:159] [“create peer”] [peer_id=1532479] [region_id=1022]
[2021/06/24 10:34:22.856 +08:00] [INFO] [raft.rs:783] [“became follower at term 94”] [term=94] [raft_id=1532479] [region_id=1022]
[2021/06/24 10:34:22.856 +08:00] [INFO] [raft.rs:285] [newRaft] [peers="[(1532479, Progress { matched: 865, next_idx: 866, state: Probe, paused: false, pending_snapshot: 0, pending_request_snapshot: 0, recent_active: false, ins: Inflights { start: 0, count: 0, buffer: [] } }), (1522842, Progress { matched: 0, next_idx: 866, state: Probe, paused: false, pending_snapshot: 0, pending_request_snapshot: 0, recent_active: false, ins: Inflights { start: 0, count: 0, buffer:[] } }), (1494775, Progress { matched: 0, next_idx: 866, state: Probe, paused: false, pending_snapshot: 0, pending_request_snapshot: 0, recent_active: false, ins: Inflights { start: 0, count: 0, buffer: [] } })]"] [“last term”=94] [“last index”=865] [applied=865] [commit=865] [term=94] [raft_id=1532479] [region_id=1022]
[2021/06/24 10:34:22.856 +08:00] [INFO] [raw_node.rs:222] [“RawNode created with id 1532479.”] [id=1532479] [raft_id=1532479] [region_id=1022]
[2021/06/24 10:34:22.856 +08:00] [INFO] [peer.rs:159] [“create peer”] [peer_id=1533252] [region_id=1024]
[2021/06/24 10:34:22.856 +08:00] [FATAL] [server.rs:591] [“failed to start node: EngineTraits(Other(”[components/raftstore/src/store/fsm/store.rs:891]: \"[components/raftstore/src/store/peer_storage.rs:385]: [region 1024] entry at apply index 8981179 doesn\\\'t exist, may lose data.\""))"]

可以参考这个帖子

这个文档
https://docs.pingcap.com/zh/tidb/stable/tikv-control#通过-tiup-使用-tikv-control