error write access to /etc/pve when human errors occur

cesarpk

Well-Known Member
Mar 31, 2012
770
3
58
Hi All

anybody can help me !!! :D

I have 2 proxmox cluster nodes
By mistake by editing the cluster.conf file, now I don't have write access for correct it.
Example:
root@kvm1:/etc/pve# touch kk.txt
touch: cannot touch `kk.txt': Permission denied

or the services of cluster no start:
root@kvm1:/etc/pve# service cman status
corosync is stopped

or if i execute:
root@kvm1:/etc/pve# service cman start
Starting cluster:
Checking if cluster has been disabled at boot... [ OK ]
Checking Network Manager... [ OK ]
Global setup... [ OK ]
Loading kernel modules... [ OK ]
Mounting configfs... [ OK ]
Starting cman... /etc/cluster/cluster.conf:18: parser error : Opening and ending tag mismatch: clusternodes line 11 and clusternode
</clusternode>
^
/etc/cluster/cluster.conf:25: parser error : expected '>'
</clusternode>
^
/etc/cluster/cluster.conf:25: parser error : Extra content at the end of the document
</clusternode>
^

Unable to get the configuration
/etc/cluster/cluster.conf:18: parser error : Opening and ending tag mismatch: clusternodes line 11 and clusternode
</clusternode>
^
/etc/cluster/cluster.conf:25: parser error : expected '>'
</clusternode>
^
/etc/cluster/cluster.conf:25: parser error : Extra content at the end of the document
</clusternode>
^
corosync [MAIN ] Corosync Cluster Engine ('1.4.3'): started and ready to provide service.
corosync [MAIN ] Corosync built-in features: nss
corosync [MAIN ] Unable to read config from /etc/cluster/cluster.conf
corosync [MAIN ] Corosync Cluster Engine exiting with status 8 at main.c:1665.
corosync died: Could not read cluster configuration Check cluster logs for details
[FAILED]

---- END -------
The error messages is the same on both nodes

I believe if i can edit the file cluster.conf for to leave it as it was before, everything will work out.

Thanks in advance to anyone who can help

Best Regards
Cesar
 
Try to set expected votes to 1. That way you will get quoruma again:

# pvecm expected 1

Thank you dietmar, but the message is:
cman_tool: Cannot open connection to cman, is it running ?

any other idea?
 
i had the same error yesterday...solution was re-join second node with force...

cheers
macday

Thanks for the advice macday, and could you explain step by step how you did it?

Best regards
Cesar
 
ok I think we need some cluster-upgrade-instructions from the proxmox-team ;)

so what I did now
- on the second node
apt-get update && apt-get upgrade and shutdown the node
- on the first node
apt-get update && apt-get upgrade and pvecm expected 1 and reboot the node
- after the first node rebooted with no error turn on the second node

...and everything was fine...

cheers
macday
 
Try to set expected votes to 1. That way you will get quoruma again:

# pvecm expected 1

Hi dietmar, i believe that Proxmox must be have one aplication, command or livecd for rescue
(for write access to /etc/pve)
Or in the worst case, a utility to rebuild the Proxmox cluster" from scratch, for not having to reinstall Proxmox from scratch

is it possible?

Best regards
Cesar
 
Last edited:
Try to set expected votes to 1. That way you will get quoruma again:

# pvecm expected 1

Please can help me dietmar or anybody?

As I have a cluster "Proxmox" (not Cluster HA) with only two nodes and without fence devices
And I had to reinstall Proxmox from scratch because I could not edit the file cluster.conf after having committed some errors.

Now, i need to create the file "cluster.conf.new" with the correct lines of configuration for not lose quorum due to the breakdown of a node.

So i need a file of example with his content complete, after i will follow the instructions as mentioned in the "how to" of Web Site of Proxmox based on the example file.

I was trying unsuccessfully to use a sample file I found on the website of redhat (and others websites):
http://docs.redhat.com/docs/en-US/R...-CA.html#ex-clusterconf-basic-two-node-cli-CA

i will be enormously grateful to anyone who can help me

Ah, This is the current contents of my file cluster.conf:
<?xml version="1.0"?>
<cluster name="Cluster-Brain" config_version="2">

<cman keyfile="/var/lib/pve-cluster/corosync.authkey">
</cman>

<clusternodes>
<clusternode name="kvm1" votes="1" nodeid="1"/>
<clusternode name="kvm2" votes="1" nodeid="2"/></clusternodes>

</cluster>

Best regards
Cesar
 
Last edited:
Thank you macday

But i have Proxmox VE 2.1 all updated, and the suggestion to run the command 'pvecm expected 1' I did and did not work

Please any idea for get the solution?

Best regards
Cesar
 
If nothing helps, you can directly edit /etc/cluster/cluster.conf, then restart cman:

# vi /etc/cluster/cluster.conf

make sure to increase the versions (else the file gets overwritten).

# /ect/init.d/cman restart
# pvecm expected 1

The try to restart the pve file system:

# /etc/init.d/pve-cluster stop
# /etc/init.d/pve-cluster start

After that you should be able to edit /etc/pve/cluster.conf

- Dietmar
 
If nothing helps, you can directly edit /etc/cluster/cluster.conf, then restart cman:

# vi /etc/cluster/cluster.conf

make sure to increase the versions (else the file gets overwritten).

# /ect/init.d/cman restart
# pvecm expected 1

The try to restart the pve file system:

# /etc/init.d/pve-cluster stop
# /etc/init.d/pve-cluster start

After that you should be able to edit /etc/pve/cluster.conf

- Dietmar

Thank you for your kind attention dietmar, but could not wait and i installed Proxmox again in the same HDD. And now i can not do it.
Note: if i only have read access , I do not think I can modify files located in that mount point.
But I have a new problem, you'd be so nice to see this link:
http://forum.proxmox.com/threads/94...pve-when-human-errors-occur?p=53399#post53399
and after answer me please.

Best regards
Cesar
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!