Is there a reason to limit the number of monitors? ( unable to find usable monitor id )

ravib123

Active Member
Nov 27, 2012
47
0
26
United States
deusmachine.com
I was trying to get some OSDs to appear and running into a problem getting a monitor running on each node in a hyper converged ceph environment with 8 nodes.

I was looking for the error unable to find usable monitor id quite a bit and hitting some walls with my results so I looked at /usr/share/perl5/PVE/API2/Ceph.pm

I noticed the below lines and change the 7 to an 8 so I could add a monitor to the last node.

I wanted to make sure this wouldn't cause problems down the road?




my $monid;

for (my $i = 0; $i < 7; $i++) {

if (!$cfg->{"mon.$i"}) {

$monid = $i;

last;

}

}

die "unable to find usable monitor id\n" if !defined($monid);
 
You should keep the mounter count to an un-even number. CEPH suggest only 3 unless you have a huge enviornment.

So your current amount of MON's is much higher than the recommend
 
You just need to run
pveceph init on a node you wish to use without a MON installed.