Code Monkey home page Code Monkey logo

ceph's People

Contributors

pineking avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

junfeiyang

ceph's Issues

多台物理机对同一块RBD的挂载

有三台机器,分别称为16,15,13

  1. 按照https://github.com/k8sp/ceph-rbd/blob/master/mount-on-linux-machine.md ,首先创建liuqsrbd0,然后map到16上,格式化,挂载到/mnt/rbd0目录
  2. 在16上cd /mnt/rbd0 创建一个a.txt 文件
  3. 在15上执行同样操作(除了格式化),挂载到/mnt/rbd0之后,在15上cd /mnt/rbd0能看到a.txt ,然后在此目录创建b.txt,则在16上看不到15上创建的b.txt。但是在15看到的a.txt 只是文件名和16上相同,此时在15修改a.txt 内容并不会反映到16上。在16上修改也不会反映到15上。
  4. 在16上创建c.txt,则15上同样也看不到。
  5. 在16上创建b.txt ,能正常创建,和15上的b.txt 不冲突,互相独立。

多 ceph cluster 在 etcd 共存

ceph cluster 在 etcd 中默认的cluster name 是 ceph
以下示例如果在etcd 创建名为 ceph_tf 的 ceph cluster, 可以和其他 ceph cluster 共存在 etcd 中

以在 10.10.10.10.204/205/206 三台物理机创建 3 mons + 3 osds + 1 mds 为例

要点: -e CLUSTER=ceph_tf 指定 cluster name

创建 mons

docker run -d --net=host --name ceph_mon -v /etc/ceph:/etc/ceph -v /var/lib/ceph/:/var/lib/ceph -e CLUSTER=ceph_tf -e KV_TYPE=etcd -e MON_IP=10.10.10.204 -e CEPH_PUBLIC_NETWORK=10.10.10.204/24 ceph/daemon mon
docker run -d --net=host --name ceph_mon -v /etc/ceph:/etc/ceph -v /var/lib/ceph/:/var/lib/ceph -e CLUSTER=ceph_tf -e KV_TYPE=etcd -e MON_IP=10.10.10.205 -e CEPH_PUBLIC_NETWORK=10.10.10.205/24 ceph/daemon mon
docker run -d --net=host --name ceph_mon -v /etc/ceph:/etc/ceph -v /var/lib/ceph/:/var/lib/ceph -e CLUSTER=ceph_tf -e KV_TYPE=etcd -e MON_IP=10.10.10.206 -e CEPH_PUBLIC_NETWORK=10.10.10.206/24 ceph/daemon mon

创建 osds

docker run -d --pid=host --net=host --privileged=true --name ceph_osd_sdb -v /dev:/dev  -e CLUSTER=ceph_tf -e OSD_TYPE=disk -e KV_TYPE=etcd -e OSD_FORCE_ZAP=1 -e OSD_DEVICE=/dev/sdb ceph/daemon osd

注意,如果碰到 ceph_disk.main.Error: Error: No cluster conf found in /etc/ceph with fsid 00000000-0000-0000-0000-000000000000 错误,解决方案:
k8sp/k8s-tensorflow#6

发现 /dev/sdb1 下存在 ceph_fsid 的文件,里面有 00000000-0000-0000-0000-000000000000 字符串,导致不能正确获取 ceph_tf 的 fsid
清空 /dev/sdb1 ,无效
手工修改 cepf_fsid 内容为正确的 ceph_tf 对应的fsid, 保存, 重启 osd daemon, 问题解决。

创建 mds

docker run -d --net=host -e CLUSTER=ceph_tf -e CEPHFS_CREATE=1 -e KV_TYPE=etcd ceph/daemon mds

查看 cluster 信息

docker exec -it ceph_mon ceph -s --cluster ceph_tf

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.