扫二维码与项目经理沟通
我们在微信上24小时期待你的声音
解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流
这篇文章主要介绍了ceph中rbd-cache日志如何配置,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让小编带着大家一起了解一下。
在信阳等地区,都构建了全面的区域性战略布局,加强发展的系统性、市场前瞻性、产品创新能力,以专注、极致的服务理念,为客户提供成都网站设计、成都网站制作 网站设计制作定制网站制作,公司网站建设,企业网站建设,品牌网站制作,全网营销推广,成都外贸网站制作,信阳网站建设费用合理。
#vim /ect/ceph/ceph.conf
在[client]添加:
admin socket=/var/run/ceph/rbd-$pid.asok log file = /var/log/ceph/ceph.client.admin.log rbd cache = true rbd cache size = 134217728
备注:貌似在ceph0.80.7,rbd-cache 默认打开。
备注:在使用rbd-cache,需要显示的指出:
cache='writeback'
以防止rbd-cache数据丢失。
# virsh attach-device ubuntu device.xml –persistent
在/tmp/qemu-rbd.log找到rbdcache的调试信息
2015-03-12 09:48:51.734444 7fbb2a3c6700 11 objectcacher flusher 2048 / 134217728: 0 tx, 0 rx, 2048 clean, 0 dirty (16777216 target, 25165824 max) 2015-03-12 09:48:52.734553 7fbb2a3c6700 11 objectcacher flusher 2048 / 134217728: 0 tx, 0 rx, 2048 clean, 0 dirty (16777216 target, 25165824 max) 2015-03-12 09:48:53.734657 7fbb2a3c6700 11 objectcacher flusher 2048 / 134217728: 0 tx, 0 rx, 2048 clean, 0 dirty (16777216 target, 25165824 max) 2015-03-12 09:48:54.734796 7fbb2a3c6700 11 objectcacher flusher 2048 / 134217728: 0 tx, 0 rx, 2048 clean, 0 dirty (16777216 target, 25165824 max) 2015-03-12 09:48:55.734958 7fbb2a3c6700 11 objectcacher flusher 2048 / 134217728: 0 tx, 0 rx, 2048 clean, 0 dirty (16777216 target, 25165824 max) 2015-03-12 09:48:56.576418 7fbb296c0700 20 librbd: aio_read 0x7fbb447d5d60 completion 0x7fbad001b280 [0,512] 2015-03-12 09:48:56.576476 7fbb296c0700 20 librbd: ictx_check 0x7fbb447d5d60 2015-03-12 09:48:56.576523 7fbb296c0700 20 librbd: oid rb.0.dff3.2ae8944a.000000000000 0~512 from [0,512] 2015-03-12 09:48:56.576542 7fbb296c0700 10 objectcacher readx extent(rb.0.dff3.2ae8944a.000000000000 (0) in @12 0~512 -> [0,512]) 2015-03-12 09:48:56.576559 7fbb296c0700 10 objectcacher.object(rb.0.dff3.2ae8944a.000000000000/head) map_read rb.0.dff3.2ae8944a.000000000000 0~512 2015-03-12 09:48:56.576573 7fbb296c0700 20 objectcacher.object(rb.0.dff3.2ae8944a.000000000000/head) map_read hit bh[ 0x7fbb447da690 0~2048 0x7fbb447da400 (2048) v 0 clean firstbyte=88] waiters = {} 2015-03-12 09:48:56.576590 7fbb296c0700 10 objectcacher readx hit bh bh[ 0x7fbb447da690 0~2048 0x7fbb447da400 (2048) v 0 clean firstbyte=88] waiters = {} 2015-03-12 09:48:56.576600 7fbb296c0700 10 objectcacher readx rmap opos 0: bh[ 0x7fbb447da690 0~2048 0x7fbb447da400 (2048) v 0 clean firstbyte=88] waiters = {} +0 frag 0~512 +0~512 2015-03-12 09:48:56.576624 7fbb296c0700 10 objectcacher readx has all buffers 2015-03-12 09:48:56.576633 7fbb296c0700 10 objectcacher readx adding buffer len 512 at 0 2015-03-12 09:48:56.576641 7fbb296c0700 10 objectcacher readx result is 512 2015-03-12 09:48:56.576649 7fbb296c0700 20 objectcacher readx done 0x7fbad0035580 512 2015-03-12 09:48:56.576667 7fbb296c0700 10 objectcacher trim start: bytes: max 134217728 clean 2048, objects: max 138 current 1 2015-03-12 09:48:56.576677 7fbb296c0700 10 objectcacher trim finish: max 134217728 clean 2048, objects: max 138 current 1 2015-03-12 09:48:56.576689 7fbb296c0700 20 librbd::AioRequest: should_complete 0x7fbad0035440 rb.0.dff3.2ae8944a.000000000000 0~512 r = 512 2015-03-12 09:48:56.576699 7fbb296c0700 10 librbd::AioCompletion: C_AioRead::finish() 0x7fbad001b3e0 r = 512 2015-03-12 09:48:56.576707 7fbb296c0700 10 librbd::AioCompletion: got {} for [0,512] bl 512 2015-03-12 09:48:56.576725 7fbb296c0700 20 librbd::AioCompletion: AioCompletion::complete_request() 0x7fbad001b280 complete_cb=0x7fbb43c94c50 pending 1 2015-03-12 09:48:56.576738 7fbb296c0700 20 librbd::AioCompletion: AioCompletion::finish_adding_requests 0x7fbad001b280 pending 0 2015-03-12 09:48:56.576748 7fbb296c0700 20 librbd::AioCompletion: AioCompletion::finalize() 0x7fbad001b280 rval 512 read_buf 0x7fbad005f400 read_bl 0 2015-03-12 09:48:56.576762 7fbb296c0700 20 librbd::AioCompletion: AioCompletion::finalize() copied resulting 512 bytes to 0x7fbad005f400 2015-03-12 09:48:56.735107 7fbb2a3c6700 11 objectcacher flusher 2048 / 134217728: 0 tx, 0 rx, 2048 clean, 0 dirty (16777216 target, 25165824 max) 2015-03-12 09:48:57.735222 7fbb2a3c6700 11 objectcacher flusher 2048 / 134217728: 0 tx, 0 rx, 2048 clean, 0 dirty (16777216 target, 25165824 max) 2015-03-12 09:48:58.735321 7fbb2a3c6700 11 objectcacher flusher 2048 / 134217728: 0 tx, 0 rx, 2048 clean, 0 dirty (16777216 target, 25165824 max) 2015-03-12 09:48:59.735391 7fbb2a3c6700 11 objectcacher flusher 2048 / 134217728: 0 tx, 0 rx, 2048 clean, 0 dirty (16777216 target, 25165824 max) 2015-03-12 09:49:00.735481 7fbb2a3c6700 11 objectcacher flusher 2048 / 134217728: 0 tx, 0 rx, 2048 clean, 0 dirty (16777216 target, 25165824 max)
通过日志加源码就很容易理解rbd-cache的实现了。
感谢你能够认真阅读完这篇文章,希望小编分享的“ceph中rbd-cache日志如何配置”这篇文章对大家有帮助,同时也希望大家多多支持创新互联,关注创新互联行业资讯频道,更多相关知识等着你来学习!
我们在微信上24小时期待你的声音
解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流