您的位置:首页 > 其它

运行ceph时,了解一下主要的进程。

2017-08-13 09:09 555 查看
最简单ceph.conf配置如下:

[global]
fsid = 798ed076-8094-429e-9e27-0ffccd60b56e
mon_initial_members = ceph-node1
mon_host = 192.168.1.112
auth_cluster_required = cephx
auth_service_required = cephx
auth_client_required = cephx

public_network = 192.168.1.0/24
osd pool default size = 2


命令如下:

ps -aux|grep ceph


ceph-admin上输出:

ceph      2108  0.2  2.2 873932 43060 ?        Ssl  20:16   0:07 /usr/bin/ceph-osd -f --cluster ceph --id 2 --setuser ceph --setgroup ceph
ceph      8880  0.7  1.8 384816 34920 ?        Ssl  20:40   0:07 /usr/bin/ceph-mon -f --cluster ceph --id ceph-admin --setuser ceph --setgroup ceph


ceph-node1上输出:

ceph       875  0.3  1.6 390516 30368 ?        Ssl  20:16   0:09 /usr/bin/ceph-mon -f --cluster ceph --id ceph-node1 --setuser ceph --setgroup ceph
ceph       880  0.0  0.7 333520 14008 ?        Ssl  20:16   0:00 /usr/bin/ceph-mds -f --cluster ceph --id ceph-node1 --setuser ceph --setgroup ceph
ceph      2043  0.2  1.8 868136 35172 ?        Ssl  20:16   0:06 /usr/bin/ceph-osd -f --cluster ceph --id 0 --setuser ceph --setgroup ceph


ceph-node2上输出:

ceph       911  0.1  1.1 2758896 22588 ?       Ssl  20:16   0:04 /usr/bin/radosgw -f --cluster ceph --name client.rgw.ceph-node2 --setuser ceph --setgroup ceph
ceph      1707  0.2  2.1 874124 41220 ?        Ssl  20:16   0:06 /usr/bin/ceph-osd -f --cluster ceph --id 1 --setuser ceph --setgroup ceph
ceph      5822  0.4  1.4 381820 27200 ?        Ssl  20:40   0:05 /usr/bin/ceph-mon -f --cluster ceph --id ceph-node2 --setuser ceph --setgroup ceph


其它常用ceph命令及输出:

列出所有存储池:

ceph osd lspools


刚建好时的输出,好像只有rbd池

0 rbd,1 .rgw.root,2 default.rgw.control,3 default.rgw.data.root,4 default.rgw.gc,5 default.rgw.log,6 default.rgw.users.uid,


生成一个文件,并将文件作为对象放入指定存储池中:

echo “hello” > testfile.txt
rados put test-object-1 testfile.txt --pool=rbd


命令rados -p rbd ls输出如下:



定位对象明细信息:

ceph osd map rbd test-object-1


输出这个对象的东东:

osdmap e32 pool 'rbd' (0) object 'test-object-1' -> pg 0.74dc35e2 (0.22) -> up ([2,1], p2) acting ([2,1], p2)


以下命令用来删除对象:

rados rm test-object-1 --pool=rbd
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: