depoy ceph on one host/server

来源:互联网 发布:医院数据库使用排名 编辑:程序博客网 时间:2024/06/02 03:48


1. Download ceph souce code.
#git clone https://github.com/ceph/ceph.git

2. Omit subscription-manager
# diff install-deps.sh install-deps.sh_bak
67c67
< #                    $SUDO subscription-manager repos --enable=rhel-$MAJOR_VERSION-server-optional-rpms
---
>                     $SUDO subscription-manager repos --enable=rhel-$MAJOR_VERSION-server-optional-rpms

3. Install ceph
#./install-deps.sh
#./run-make-check.sh

4. Start ceph
# cd src/
# ./vstart.sh -d -n -X   /* -x enable auth -X disable authentication
# ./ceph health
# ./ceph osd pool stats
# ./ceph osd pool stats cephfs_data
# ./rados df
# ./rados mkpool mypool
# ./ceph osd pool create qemu-kvm-pool 128 128

5. Disable authentication
# diff ceph.conf ceph.conf_bak
1c1
< ; generated by vstart.sh on 2015年 07月 06日 星期一 19:45:59 CST
---
> ; generated by vstart.sh on 2015年 07月 06日 星期一 18:49:04 CST
3c3
<         fsid = c80c25ea-b0f8-4da8-8bc9-af0c7500f376
---
>         fsid = c429a053-c637-4da2-96c7-787f7ad5a1c4
18c18
<         auth supported = none
---
>         auth supported = cephx


# restart ceph

6. Create image
# ./rados -p  qemu-kvm-pool ls
# rbd ls qemu-kvm-pool -m 10.66.9.236
# qemu-img create -f raw rbd:qemu-kvm-pool/test.raw:mon_host=10.66.9.236 3G

0 0