Ceph配置rbd client端的log file

概述

openstack cinder通过librbd访问ceph rbd块设备,有时候需要查看rbd client端的log信息,这时候就需要在rbd client端配置ceph.conf文件。

因为我们openstack里的nova是通过libvirt来启动虚拟机的,所以这里需要保证libvirt对配置的log file目录有写权限。

ceph配置

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
配置rbd client的cache,debug配置和log file
[client]
rbd cache = true
rbd cache size = 67108864
rbd cache max dirty = 33554432
rbd cache max dirty age = 5
rbd cache writethrough until flush = true

rbd_default_order = 25
rbd_default_stripe_unit = 4194304
rbd_default_stripe_count = 8

admin socket = /var/run/ceph/ceph-client/$cluster-$type.$id.$pid.asok
debug rbd = 20
debug client = 20
debug objectcacher = 20
log file = /var/run/ceph/ceph-client/$cluster-$name.log

配置各个rbd client的keyring和log file
[client.images]
keyring = /etc/ceph/images.keyring
log file = /var/run/ceph/ceph-client/images.log
[client.volumes]
keyring = /etc/ceph/volumes.keyring
log file = /var/run/ceph/ceph-client/volumes.log
[client.cinder]
keyring = /etc/ceph/cinder.keyring
log file = /var/run/ceph/ceph-client/cinder.log

代码分析

默认情况下client端的log file等设置是为空的。

code analyse

支持原创