root@controller:~# ceph --version
ceph version 12.2.11 (26dc3775efc7bb286a1d6d66faee0ba30ea23eee) luminous (stable)
查看ceph相关的进程
The Ceph Manager daemon (ceph-mgr) runs alongside monitor daemons, to provide additional monitoring and interfaces to external monitoring and management systems.
root@controller:~# ceph osd pool get images pg_num
pg_num: 8root@controller:~# ceph osd pool get vms pg_num
pg_num: 8root@controller:~# ceph osd pool get volumes pg_num
pg_num: 8
root@controller:~# ceph osd pool set images pg_num 32
set pool 1 pg_num to 32root@controller:~# ceph osd pool set images pgp_num 32
set pool 1 pgp_num to 32
1
2
root@controller:~# ceph osd pool get images pg_num
pg_num: 32
然后查看ceph -s得到:application not enabled on 1 pool(s)
详细的信息可以使用ceph health detail查看
enable application:
1
2
root@controller:~# ceph osd pool application enable images rbd
enabled application 'rbd' on pool 'images'
ceph osd pool application enable <pool-name> <app-name>,这里<app-name> is 'cephfs', 'rbd', 'rgw',or freeform for custom applications.
root@controller:~# ceph mon stat
e1: 1 mons at {controller=172.16.1.17:6789/0}, election epoch 5, leader 0 controller, quorum 0 controller
八节点高可用环境
1
2
3
root@osd-1:~# ceph mon stat
e1: 3 mons at {osd-1=172.16.1.46:6789/0,osd-2=172.16.1.78:6789/0,osd-3=172.16.1.62:6789/0}, election epoch 1298, leader 0 osd-1, quorum 0,1,2 osd-1,osd-3,osd-2
查看认证状态
查看秘钥文件(我的devstack)
1
2
3
4
5
6
7
8
root@controller:~# ll /etc/ceph/
total 24drwxr-xr-x 2 root root 4096 Jun 26 16:53 ./drwxr-xr-x 112 root root 4096 Jun 25 20:36 ../-rw------- 1 ceph ceph 63 Jun 25 19:31 ceph.client.admin.keyring-rw-r--r-- 1 stack stack 64 Jun 25 20:19 ceph.client.cinder.keyring-rw-r--r-- 1 stack stack 64 Jun 25 20:19 ceph.client.glance.keyring-rw-r--r-- 1 root root 335 Jun 25 19:31 ceph.conf
查看秘钥文件(八节点高可用环境)
1
2
3
4
5
6
7
8
9
10
root@ctl-1:~# ll /etc/ceph/
total 28drwxr-xr-x 2 root root 4096 Jun 1 10:47 ./drwxr-xr-x 108 root root 4096 Jun 17 14:59 ../-rw------- 1 root root 151 May 31 16:49 -rw-r--r-- 1 cinder cinder 64 Jun 1 10:47 -rw-r--r-- 1 glance glance 64 Jun 1 10:41 -rw-r--r-- 1 root root 297 May 31 16:49 ceph.conf-rw-r--r-- 1 root root 92 Mar 20 03:51 rbdmap-rw------- 1 root root 0 May 31 16:49 tmpbq23nn
1
2
3
4
5
6
7
8
9
root@cmp-1:~# ll /etc/ceph/
total 24drwxr-xr-x 2 root root 4096 Jun 1 13:11 ./drwxr-xr-x 104 root root 4096 Jun 1 11:16 ../-rw------- 1 root root 151 May 31 16:53 -rw-r--r-- 1 root root 64 Jun 1 10:51 -rw-r--r-- 1 root root 582 Jun 1 13:11 ceph.conf-rw-r--r-- 1 root root 92 Mar 20 03:51 rbdmap-rw------- 1 root root 0 May 31 16:53 tmpKGhaY5
1
2
3
4
5
6
7
8
root@osd-1:~# ll /etc/ceph/
total 20drwxr-xr-x 2 root root 4096 May 31 17:03 ./drwxr-xr-x 93 root root 4096 May 31 15:30 ../-rw------- 1 root root 151 May 31 15:55 -rw-r--r-- 1 root root 297 Jun 1 09:40 ceph.conf-rw-r--r-- 1 root root 92 Mar 13 01:46 rbdmap-rw------- 1 root root 0 May 31 15:37 tmp56mnHo