User Tools

Site Tools


ceph:extending_cluster_add_mons

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Last revisionBoth sides next revision
ceph:extending_cluster_add_mons [2019/07/23 09:35] – created dodgerceph:extending_cluster_add_mons [2019/07/23 09:59] dodger
Line 23: Line 23:
  
 ====== Instructions ====== ====== Instructions ======
 +
 +
 +===== Modify ceph.conf =====
 +You must add the new monitors to ''ceph.conf'':
 +<code bash>
 +[mon.pro-cephm-005]
 +host = pro-cephm-005.ciberterminal.net
 +addr = 10.20.54.55
 +public_addr = 10.20.54.55:6789
 +
 +[mon.pro-cephm-006]
 +host = pro-cephm-006.ciberterminal.net
 +addr = 10.20.54.56
 +public_addr = 10.20.54.56:6789
 +</code>
 +
 +And populate to all the cluster:
 +<code bash>
 +ceph-deploy --overwrite-conf config push ${ALLSERVERS}
 +</code>
 +
 +Then restart the monitors (yes, is a **salt** command):
 +<code bash>
 +salt "${THESERVER}" service.restart ceph-mon.target
 +</code>
 +
 +
 +
  
 ===== Method 1: ceph-deploy ===== ===== Method 1: ceph-deploy =====
Line 51: Line 79:
 sudo ceph-mon -i $(hostname) --mkfs --monmap ${TMPDIR}/mapfile.bin --keyring ${TMPDIR}/keyfile.txt sudo ceph-mon -i $(hostname) --mkfs --monmap ${TMPDIR}/mapfile.bin --keyring ${TMPDIR}/keyfile.txt
 </code> </code>
 +
  
  
 ===== Method 3: Fully manual with fsid (the working one) ===== ===== Method 3: Fully manual with fsid (the working one) =====
  
 +A little modification of the manual documentation, more info [[https://blog.ciberterminal.net/2019/07/23/ceph-troubleshooting-adding-new-monitors-to-cluster/|here]]
  
-Maybe tomorrow.... today is late...+As ''ceph'' user, in the ''admin'' node: 
 +<code bash> 
 +export TMPDIR=~/joining_ceph 
 +mkdir ${TMPDIR} 
 +cd  ${TMPDIR} 
 +sudo ceph auth get mon-o keyfile.txt 
 +sudo ceph mon getmap -o mapfile.bin 
 +for i in ${NEWSERVERS} ; do scp -r "${TMPDIR}" ${i}:${TMPDIR} ; done 
 +</code> 
 + 
 +Then in **each new node**: 
 + 
 +<code bash> 
 +export TMPDIR=~/joining_ceph 
 +sudo ceph-mon -i $(hostname) --mkfs --monmap ${TMPDIR}/mapfile.bin --keyring ${TMPDIR}/keyfile.txt 
 +</code>