Ceph 사용을 위해 CentOS 6.7 에서 RBD 사용하기
# yum -y update
# yum -y install http://ceph.com/rpm-firefly/el6/noarch/ceph-release-1-0.el6.noarch.rpm http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# yum -y install yum-plugin-priorities
# sed -i -e "s/enabled=1/enabled=1\npriority=1/g" /etc/yum.repos.d/ceph.repo
# yum -y install ceph-common
이제 rbd 명령을 사용해야 하지만 CentOS 6.7 에는 커널 2.6.32 이 설치되므로, rbd 를 사용할 수 없습니다.
(RBD는 커널 2.6.34 이상부터 사용 가능)
# uname -a
Linux ceph-client 2.6.32-642.3.1.el6.x86_64 #1 SMP Tue Jul 12 18:30:56 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
그래서 yum 을 통해 커널을 높이도록 합니다. (마지막, 안정적인, 주 커널)
# rpm --import http://elrepo.org/RPM-GPG-KEY-elrepo.org
# rpm -Uvh http://elrepo.org/elrepo-release-6-6.el6.elrepo.noarch.rpm
# yum --enablerepo=elrepo-kernel install kernel-ml
새로운 커널을 기본 부팅 커널로 설정합니다.
# vi /etc/grub.conf
Default 옵션값을 Default=0 으로 변경
# reboot
부팅이 완료 되면 커널 버전을 확인해 봅니다.
# uname -a
Linux ceph-client 4.7.0-1.el6.elrepo.x86_64 #1 SMP Sun Jul 24 19:49:26 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux
이제 rbd 명령을 사용할 준비가 되었으므로 아래와 같이 마운트를 진행합니다.
# rbd --mon_host 192.168.56.11 --conf /dev/null --keyring /dev/null --name client.sysdocu --key AQAJRKRXJ3UxEBAAFxLI1hMRop6AVLa3wr6ruQ== --pool sysdocu-pool map vda
# mkdir /sysdocu_test
# mount /dev/rbd0 /sysdocu_test
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 7.8G 3.5G 4.0G 47% /
tmpfs 1001M 0 1001M 0% /dev/shm
/dev/rbd0 298M 207M 92M 70% /sysdocu_test
'리눅스 > Ceph' 카테고리의 다른 글
Ceph osd 서버 교체 (0) | 2016.08.18 |
---|---|
Ceph 10.2.0 설치 on CentOS 7 (jewel 버전) (0) | 2016.08.16 |
Ceph 백업 (rbd export and import) 스냅샷 이미지를 파일로 추출, 복원 (0) | 2016.08.09 |
Ceph 백업 (스냅샷 생성, 확인, 복구, 삭제) (0) | 2016.08.08 |
CephFS 통파티션 생성과 마운트, client 별 디렉토리 생성과 마운트 (0) | 2016.08.02 |