Re: Monitor doesn't start anymore...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/20/22 17:36, Ranjan Ghosh wrote:
Hi Stefan,

thanks for the hint. Yes, the mon store is owned by user ceph. It's a normal folder under /var/lib/ceph/mon/... and there are various files in there - all with owner ceph:ceph. Looks normal to me (like on the other nodes). I've read the docs you provided and I wonder which of those steps are actually necessary because I obviously have many of those things already in place.
I guess the most important part is step 15, right?

ceph-mon --mkfs -i stage2 --monmap /tmp/monmap --keyring /tmp/ceph.mon.keyring

So I would completely delete the /var/lib/ceph/mon/ceph-stage2 folder and recreate it as empty, because the files in there have probably become corrupted, correct?

Yeah, that's what I suspect.

Then I would run the above command and it would initialize a new monitor automatically in that folder by default? I don't have to specify the exact path on the command-line - it is automatically determined by the -i argument, right? So, I only need the keyring  and the monmap. How do I get the monmap? I tried to run:

ceph-mon -i stage2 --extract-monmap /tmp/monmap

And I get some binary stuff written to /tmp/monmap. Is that a decent monmap? Is there also a way to extract the keyring? There's a keyring file in /var/lib/ceph/mon/ceph-stage2. Can I just use that one?

Here my notes from a re-install mon test I did. I susbstituted the name with "stage2":

chown -R ceph.ceph /var/lib/ceph/mon
sudo -u ceph ceph auth get mon. -o /tmp/keyring
exported keyring for mon.
 sudo -u ceph ceph mon getmap -o /tmp/monmap.map
got monmap epoch 8
chown -R ceph:ceph /var/lib/ceph/mon/ceph-stage2
sudo -u ceph ceph-mon -i stage2 --mkfs --monmap /tmp/monmap.map --keyring /tmp/keyring --setuser ceph --setgroup ceph

systemctl enable ceph-mon@stage2.service

If you have the mgr co-located on the monitor node, you need to make sure you do below for the manager:

mkdir /var/lib/ceph/mgr/ceph-stage2
ceph auth get mgr.stage2 >> /var/lib/ceph/mgr/ceph-stage2/keyring
chown -R ceph.ceph /var/lib/ceph/mgr/

systemctl enable ceph-mgr@stage2.service

After a reboot the mon and the mgr should come online.

Gr. Stefan
_______________________________________________
ceph-users mailing list -- ceph-users@xxxxxxx
To unsubscribe send an email to ceph-users-leave@xxxxxxx




[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Ceph Dev]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux