°Ô½Ã¹° 1,369°Ç
   
ceph mon add/remove
±Û¾´ÀÌ : ÃÖ°í°ü¸®ÀÚ ³¯Â¥ : 2019-11-05 (È­) 14:39 Á¶È¸ : 13380
±ÛÁÖ¼Ò :
                                
https://docs.ceph.com/docs/master/rados/operations/add-or-rm-mons/


Remove

# ceph mon dump
dumped monmap epoch 24
epoch 24
fsid 5c503097-de43-44c8-b08b-2b5c5341cc2d
last_changed 2019-12-04 13:27:09.191918
created 2019-08-30 21:07:32.252233
min_mon_release 14 (nautilus)
0: [v2:192.168.0.2:3300/0,v1:192.168.0.2:6789/0] mon.ceph-mon1
1: [v2:192.168.0.1:3300/0,v1:192.168.0.1:6789/0] mon.ceph-mon0
2: [v2:192.168.0.3:3300/0,v1:192.168.0.3:6789/0] mon.ceph-mon2

# ceph mon remove ceph-mon1 
removing mon.ceph-mon1 at [v2:192.168.0.2:3300/0,v1:192.168.0.2:6789/0], there will be 2 monitors

# ceph mon dump
dumped monmap epoch 25
epoch 25
fsid 5c503097-de43-44c8-b08b-2b5c5341cc2d
last_changed 2019-12-04 13:40:44.184296
created 2019-08-30 21:07:32.252233
min_mon_release 14 (nautilus)
0: [v2:192.168.0.1:3300/0,v1:192.168.0.1:6789/0] mon.ceph-mon0
1: [v2:192.168.0.3:3300/0,v1:192.168.0.3:6789/0] mon.ceph-mon2



Add
# mkdir /root/tmp 
# monmaptool --create --add ceph-mon1 192.168.0.2:6789 --clobber /root/tmp/keyring
monmaptool: monmap file /root/tmp/keyring
monmaptool: generated fsid 7b7a45e0-f3ed-4d4f-b233-4cba75c9aaeb
monmaptool: writing epoch 0 to /root/tmp/keyring (1 monitors)





# ceph auth get mon. -o /root/tmp/keyring 
exported keyring for mon.

# ceph mon getmap -o /root/tmp/monmap 
got monmap epoch 25

# ceph-mon -i ceph-mon1 --mkfs --monmap /root/tmp/monmap --keyring /root/tmp/keyring
2019-12-04 13:46:08.145 7f4e310c7200 -1 '/var/lib/ceph/mon/ceph-ceph-mon1' already exists and is not empty: monitor may already exist


µð·ºÅ丮 ¹é¾÷ --> »ý¼º 
# mv ceph-ceph-mon1/ ceph-ceph-mon1_bak
# mkdir ceph-ceph-mon1
# ceph-mon -i ceph-mon1 --mkfs --monmap /root/tmp/monmap --keyring /root/tmp/keyring
# chown -R ceph:ceph ceph-ceph-mon1

# ceph-mon -i ceph-mon1 --public-addr 192.168.0.2:6789

# ceph mon add ceph-mon1 192.168.0.2:6789 
adding mon.ceph-mon1 at [v2:192.168.0.2:3300/0,v1:192.168.0.2:6789/0]


# ceph mon enable-msgr2


ÀÏÁ¤½Ã°£ÀÖ´Ù°¡ ¿Ã¶ó¿È.. 
#  systemctl status ceph-mon@ceph-mon1
¡Ü ceph-mon@ceph-mon1.service - Ceph cluster monitor daemon
   Loaded: loaded (/usr/lib/systemd/system/ceph-mon@.service; enabled; vendor preset: disabled)
   Active: active (running) since ¼ö 2019-12-04 14:59:59 KST; 27s ago
 Main PID: 414676 (ceph-mon)
   CGroup: /system.slice/system-ceph\x2dmon.slice/ceph-mon@ceph-mon1.service
           ¦¦¦¡414676 /usr/bin/ceph-mon -f --cluster ceph --id ceph-mon1 --setuser ceph --setgroup ceph


À̸§ Æнº¿öµå
ºñ¹Ð±Û (üũÇÏ¸é ±Û¾´À̸¸ ³»¿ëÀ» È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù.)
¿ÞÂÊÀÇ ±ÛÀÚ¸¦ ÀÔ·ÂÇϼ¼¿ä.
   

 



 
»çÀÌÆ®¸í : ¸ðÁö¸®³× | ´ëÇ¥ : ÀÌ°æÇö | °³ÀÎÄ¿¹Â´ÏƼ : ·©Å°´åÄÄ ¿î¿µÃ¼Á¦(OS) | °æ±âµµ ¼º³²½Ã ºÐ´ç±¸ | ÀüÀÚ¿ìÆí : mojily°ñ¹ðÀÌchonnom.com Copyright ¨Ï www.chonnom.com www.kyunghyun.net www.mojily.net. All rights reserved.