월간 인기 게시물

게시물 1,372건
   
ceph mon add/remove
글쓴이 : 최고관리자 날짜 : 2019-11-05 (화) 14:39 조회 : 13733
글주소 :
                                
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.