1. 程式人生 > >運行ceph時,了解一下主要的進程。

運行ceph時,了解一下主要的進程。

net -a pub 刪除對象 http dma -1 members admin

最簡單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

運行ceph時,了解一下主要的進程。