Managing Proxmox clusters can sometimes present technical difficulties, such as inconsistencies in cluster configuration or issues with restoring LXC containers. Finding and resolving these issues is crucial for maintaining the stability and performance of the virtualization environment. In this article, I present a detailed guide on how to diagnose and resolve an issue with an unreachable node and how to successfully restore an LXC container.
Before you begin any actions, make sure you have a current backup of the system.
Diagnosing the State of the Proxmox Cluster
1 2 |
pvecm delnode up-page-02 Node/IP: up-page-02 is not a known host of the cluster. |
and:
1 2 |
pct restore 107 vzdump-lxc-107-2024_11_12-03_00_01.tar.zst --storage local CT 107 already exists on node 'up-page-02' |
To understand the state of the cluster, execute the following command on the node-up-page-04
node:
1 |
pvecm nodes |
Expected output:
1 2 3 4 5 |
Membership information ---------------------- Nodeid Votes Name 1 1 node-up-page-01 2 1 node-up-page-04 (local) |
Then check the detailed cluster information with the following command:
1 |
pvecm status |
Expected output:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
Cluster information ------------------- Name: soban-proxmox Config Version: 4 Transport: knet Secure auth: on Quorum information ------------------ Date: Wed Nov 13 10:40:12 2024 Quorum provider: corosync_votequorum Nodes: 2 Node ID: 0x00000002 Ring ID: 1.e6 Quorate: Yes Votequorum information ---------------------- Expected votes: 2 Highest expected: 2 Total votes: 2 Quorum: 2 Flags: Quorate Membership information ---------------------- Nodeid Votes Name 0x00000001 1 <masked IP> 0x00000002 1 <masked IP> (local) |
Removing the Container Configuration File and Cleaning Data
I discovered that the configuration file for container 107 still exists on the cluster’s file system at the path:
1 |
ls -ltr /etc/pve/nodes/node-up-page-02/lxc/107.conf |
Output:
1 |
-rw-r----- 1 root www-data 235 Nov 12 21:35 /etc/pve/nodes/node-up-page-02/lxc/107.conf |
To remove this file and any remaining data associated with the detached node, execute:
1 |
rm -rf /etc/pve/nodes/node-up-page-02/ |
Restoring the Container
After removing the configuration file, I restored the LXC container on the node-up-page-04
node using the command:
1 |
pct restore 107 /root/vzdump-lxc-107-2024_11_12-03_00_01.tar.zst --storage local |
Output:
1 2 3 4 5 6 7 |
recovering backed-up configuration from '/root/vzdump-lxc-107-2024_11_12-03_00_01.tar.zst' Formatting '/var/lib/vz/images/107/vm-107-disk-0.raw', fmt=raw size=59055800320 preallocation=off Creating filesystem with 14417920 4k blocks and 3604480 inodes Filesystem UUID: 8b707e55-5e14-4b20-8585-6cb09e0fa520 Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000, 7962624, 11239424 restoring '/root/vzdump-lxc-107-2024_11_12-03_00_01.tar.zst' now.. extracting archive '/root/vzdump-lxc-107-2024_11_12-03_00_01.tar.zst' |
The restoration process was successful, and the container was ready for use. This case illustrates the importance of thorough diagnostics and configuration file management in Proxmox when working with clusters. Regular reviews of configurations are advisable to avoid inconsistencies and operational issues in the future.