LinuxCommandLibrary

pvecm

Manage Proxmox VE cluster

TLDR

Add the current node to an existing cluster

$ pvecm add [hostname_or_ip]
copy

Add a node to the cluster configuration (internal use)
$ pvecm addnode [node]
copy

Display the version of the cluster join API available on this node
$ pvecm apiver
copy

Generate new cluster configuration
$ pvecm create [clustername]
copy

Remove a node from the cluster configuration
$ pvecm delnode [node]
copy

Display the local view of the cluster nodes
$ pvecm nodes
copy

Display the local view of the cluster status
$ pvecm status
copy

SYNOPSIS

pvecm [options]

PARAMETERS

create
    Creates a new Proxmox VE cluster with the specified cluster ID.
This command can only be run on an unclustered node.


join


    Joins an existing Proxmox VE cluster at the specified
(an existing node).

status
    Displays the current status of the Proxmox VE cluster, including node health and quorum status.

nodes
    Lists all nodes in the cluster.

expected
    Sets the expected number of votes to . Useful when nodes are temporarily offline.

certs
    Manages cluster certificates

shutdown
    Initiates a clean shutdown of the cluster.

help
    Displays help information about the available commands.

DESCRIPTION

The pvecm command is a crucial part of the Proxmox Virtual Environment (Proxmox VE) suite. It provides command-line tools for managing a Proxmox VE cluster. This encompasses tasks such as joining nodes to a cluster, removing nodes, checking cluster status, configuring cluster parameters (like the quorum), handling filesystem settings related to the cluster, and more. pvecm ensures consistent cluster-wide configuration and provides the necessary interfaces to build a robust and highly available virtualized infrastructure. It leverages Corosync, a Group Communication System, to achieve strong consistency and synchronization between cluster nodes.

Key functions include checking the status of the cluster file system (pmxcfs), which holds the configuration for all VMs and containers in the cluster; managing the cluster network, and displaying overall cluster health. Proper use of pvecm is critical for maintaining the integrity and functionality of a Proxmox VE cluster. It is the main entry point for cluster related tasks.

CAVEATS

Incorrectly using pvecm, especially the join and create commands, can lead to a broken cluster configuration and potential data loss. Ensure you understand the implications of each command before executing it. Always backup your configuration before making changes.

QUORUM

Quorum is essential for Proxmox VE clusters. If a cluster loses quorum (more than half the nodes are offline), critical functions will be suspended to prevent data corruption. The 'pvecm expected' command can temporarily adjust the quorum requirement in cases of planned downtime.

TROUBLESHOOTING

When troubleshooting cluster issues, start by examining the logs located in /var/log/syslog or /var/log/pve/corosync.log. Check the output of `pvecm status` for any error messages or warnings. Verify network connectivity between cluster nodes using `ping` or `traceroute`.

HISTORY

The pvecm command was developed as part of the Proxmox VE project to provide a command-line interface for managing cluster functions. It evolved as the Proxmox VE platform matured, incorporating new features and capabilities for managing increasingly complex clustered environments. Initially, cluster management relied more heavily on manual configuration. pvecm simplified this process by providing a centralized tool for common cluster operations. Over time, pvecm's capabilities have expanded to include certificate management, quorum manipulation, and finer-grained control over cluster parameters, reflecting the growing sophistication of Proxmox VE deployments.

SEE ALSO

pmxcfs(5), corosync(5), systemctl(1)

Copied to clipboard