Tại sao VMs bị freeze khi mất một node?
Proxmox Cluster File System (pmxcfs) yêu cầu majority nodes online để cho phép write operations. Cluster 3 nodes cần ít nhất 2 online — mất 1 node là mất majority, và pmxcfs sẽ:
- Block tất cả write operations
- Freeze hoặc suspend các VMs đang chạy
- Từ chối tạo/xóa VM mới
Triệu chứng
pvecm status
# Quorum information
# ------------------
# Date: Mon Jun 10 10:30:15 2026
# Quorum provider: corosync_votequorum
# Nodes: 1
# Node votes: 1
# Expected votes: 2
# Total votes: 1
# Quorum: 2 ← cần 2 nhưng chỉ có 1
# Flags:
#
# Membership information
# Status: not in quorum
Khôi phục cluster
Option 1: Bring node back online (ưu tiên)
Nếu node kia chỉ bị reboot hoặc network issue tạm thời — đợi nó online lại là xong.
Option 2: Force local quorum (emergency)
Chỉ dùng khi node kia chắc chắn bị hỏng vĩnh viễn:
# CẢNH BÁO: Chỉ chạy trên node ONLINE
pvecm expected 1
# Verify
pvecm status
# Quorum: 1 (met!)
Option 3: Remove dead node khỏi cluster
# Trên node còn sống
pvecm delnode <dead-node-name>
# Verify cluster view
pvecm nodes
Phòng tránh về sau
1. Dùng số lẻ nodes
3 hoặc 5 nodes thay vì 2 hoặc 4. Với 3 nodes, cluster vẫn hoạt động khi mất 1 node. Với 2 nodes, mất 1 là mất quorum ngay.
2. Thêm QDevice cho cluster 2 nodes
Nếu chỉ có 2 nodes, dùng một máy thứ ba nhẹ (Raspberry Pi, VM, VPS) làm quorum device:
# Trên QDevice host, cài corosync-qnetd
apt install corosync-qnetd
systemctl enable --now corosync-qnetd
# Trên Proxmox node bất kỳ
pvecm qdevice setup <qdevice-host-ip>
QDevice thêm 1 vote vào cluster, đủ để 1 trong 2 nodes thắng majority khi node kia down.
3. Monitor quorum với alerts
# Script check quorum, đặt vào cron mỗi phút
#!/bin/bash
STATUS=$(pvecm status 2>/dev/null | grep "Quorum:" | awk '{print $2}')
EXPECTED=$(pvecm status 2>/dev/null | grep "Expected votes:" | awk '{print $3}')
TOTAL=$(pvecm status 2>/dev/null | grep "Total votes:" | awk '{print $3}')
if [ "$TOTAL" -lt "$EXPECTED" ]; then
echo "ALERT: Proxmox cluster quorum degraded! Total=$TOTAL Expected=$EXPECTED" \
| mail -s "[ALERT] Proxmox Quorum" [email protected]
fi
Hoặc dùng Proxmox built-in notification (Datacenter → Notifications) với metric cluster_quorum.