/etc/pve folder seems to be corrupted

namen991

New Member
Jan 10, 2025
3
1
3
I have a local proxmox server for testing on a debian 12. I tried to make a proxmox cluster with another machine but failed due to misconfiguration in the /etc/hosts file. I tried to recover the standalone mode following some instructions that removed configurations in /etc/corosync/ and /etc/pve/, and it didn't go well because the /etc/pve folder looks corrupted (have no backups of them :/). All the PVE services are running except corosync that is dead because /etc/corosync/corosync.conf is not found

I have tried to reset the pve-cluster service to be again in standalone mode, forcing the deletion of files in /var/lib/pve-cluster and /dev/shm to start from scratch but when I start the pve-cluster service again, the mounted /etc/pve directory always has the same files without storage.cfg and some files and symlinks from 1970 :/ (I tried to unlink and regenerate the symlinks but I have no permissions even as root user). This is what I'm trying:

systemctl stop pve-cluster
pkill -9 pmxcfs
pkill -9 pve-cluster
umount -l /etc/pve

rm -rf /etc/pve
mkdir /etc/pve

rm -rf /var/lib/pve-cluster/*
rm -f /var/lib/pve-cluster/.pmxcfs.lockfile

rm -rf /dev/shm/qb-*
rm -rf /dev/shm/pmxcfs*

reboot
systemctl start pve-cluster




and my current /etc/pve folder has this:

root@debian12:~# tree -a /etc/pve
/etc/pve
├── authkey.pub
├── .clusterlog
├── .debug
├── firewall
├── ha
├── local -> nodes/debian12
├── lxc -> nodes/debian12/lxc
├── mapping
├── .members
├── nodes
│ └── debian12
│ ├── lrm_status
│ ├── lxc
│ ├── openvz
│ ├── priv
│ ├── pve-ssl.key
│ ├── pve-ssl.pem
│ ├── qemu-server
│ └── ssh_known_hosts
├── openvz -> nodes/debian12/openvz
├── priv
│ ├── acme
│ ├── authkey.key
│ ├── authorized_keys
│ ├── lock
│ ├── pve-root-ca.key
│ └── pve-root-ca.srl
├── pve-root-ca.pem
├── pve-www.key
├── qemu-server -> nodes/debian12/qemu-server
├── .rrd
├── sdn
│ └── fabrics
├── .version
├── virtual-guest
├── .vmlist
└── vzdump.cron


root@debian12:~# ls -la /etc/pve
total 14
drwxr-xr-x 2 root www-data 0 Jan 1 1970 .
drwxr-xr-x 154 root root 12288 Aug 29 13:04 ..
-rw-r----- 1 root www-data 451 Aug 29 13:05 authkey.pub
-r--r----- 1 root www-data 1046 Jan 1 1970 .clusterlog
-rw-r----- 1 root www-data 2 Jan 1 1970 .debug
drwxr-xr-x 2 root www-data 0 Aug 29 13:05 firewall
drwxr-xr-x 2 root www-data 0 Aug 29 13:05 ha
lrwxr-xr-x 1 root www-data 0 Jan 1 1970 local -> nodes/debian12
lrwxr-xr-x 1 root www-data 0 Jan 1 1970 lxc -> nodes/debian12/lxc
drwxr-xr-x 2 root www-data 0 Aug 29 13:05 mapping
-r--r----- 1 root www-data 42 Jan 1 1970 .members
drwxr-xr-x 2 root www-data 0 Aug 29 13:05 nodes
lrwxr-xr-x 1 root www-data 0 Jan 1 1970 openvz -> nodes/debian12/openvz
drwx------ 2 root www-data 0 Aug 29 13:05 priv
-rw-r----- 1 root www-data 2074 Aug 29 13:05 pve-root-ca.pem
-rw-r----- 1 root www-data 1704 Aug 29 13:05 pve-www.key
lrwxr-xr-x 1 root www-data 0 Jan 1 1970 qemu-server -> nodes/debian12/qemu-server
-r--r----- 1 root www-data 230 Jan 1 1970 .rrd
drwxr-xr-x 2 root www-data 0 Aug 29 13:05 sdn
-r--r----- 1 root www-data 1134 Jan 1 1970 .version
drwxr-xr-x 2 root www-data 0 Aug 29 13:05 virtual-guest
-r--r----- 1 root www-data 18 Jan 1 1970 .vmlist
-rw-r----- 1 root www-data 119 Aug 29 13:05 vzdump.cron


root@debian12:~# pvecm status
Error: Corosync config '/etc/pve/corosync.conf' does not exist - is this node part of a cluster?

how can I reset the /etc/pve folder to start from scratch?
If I create a storage.cfg manually in /etc/pve, will proxmox use it in the future? (the web GUI shows the local storage where proxmox is installed but I still don't have /etc/pve/storage.cfg file :/)
thanks in advance
 
Last edited:
Hi,

The /etc/pve - it's a virtual filesystem mounted by pmxcfs.
Deleting it can cause permission issues and break symlinks and looks like you have them already broken.
Not sure what you already done but you can try to do cleanup cluster config and reinstall pve-cluster
Code:
systemctl stop pve-cluster corosync

pkill -9 pmxcfs

umount -l /etc/pve

rm -rf /etc/corosync/*

rm -rf /var/lib/pve-cluster/*

rm -rf /dev/shm/qb-*

rm -rf /dev/shm/pmxcfs*

apt-get update
apt-get install --reinstall pve-cluster pmxcfs

systemctl start pve-cluster
 
  • Like
Reactions: news