Ceph RBD Connection

Mr. Gecko grmrgecko at gmail.com
Mon May 24 14:23:38 UTC 2021



On 5/23/21 8:48 PM, Han Han wrote:
>
> You can check the following:
> 1. Make sure the ceph mon node are running on the localhost:6789

root at server ~# netstat -pan | grep 6789
tcp        0      0 10.0.0.5:6789           0.0.0.0:* LISTEN      
2087/ceph-mon

> 2. Check if the ceph authorization is enabled on the ceph cluster. 
> Check if authorization is
> used in rbd pool xml.
> You can provide more details on the rbd pool xml, ceph conf, and the 
> version of librbd1(client side), ceph(server side).

root at server ~# ceph auth get client.libvirt
exported keyring for client.libvirt
[client.libvirt]
         key = AQDtM6lgXXXXXXXXpebpIoIKaFXQSTAg==
         caps mon = "profile rbd"
         caps osd = "profile rbd pool=libvirt-pool"


root at server ~# virsh secret-list
  UUID                                   Usage
--------------------------------------------------------------------
  f290cb3a-a9de-48d7-89ce-09311eadff4a   ceph client.libvirt secret

root at server ~# virsh secret-dumpxml f290cb3a-a9de-48d7-89ce-09311eadff4a
<secret ephemeral='no' private='no'>
   <uuid>f290cb3a-a9de-48d7-89ce-09311eadff4a</uuid>
   <usage type='ceph'>
     <name>client.libvirt secret</name>
   </usage>
</secret>

root at server ~# virsh pool-dumpxml libvirt-pool
<pool type='rbd'>
   <name>libvirt-pool</name>
   <uuid>5ae8abb9-31ab-44c0-a708-072b95182018</uuid>
   <capacity unit='bytes'>0</capacity>
   <allocation unit='bytes'>0</allocation>
   <available unit='bytes'>0</available>
   <source>
     <host name='localhost' port='6789'/>
     <name>libvirt-pool</name>
     <auth type='ceph' username='libvirt'>
       <secret uuid='f290cb3a-a9de-48d7-89ce-09311eadff4a'/>
     </auth>
   </source>
</pool>

root at server ~# ceph versions
{
     "mon": {
         "ceph version 15.2.12 
(ce065eabfa5ce81323b009786bdf5bb03127cbe1) octopus (stable)": 2
     },
     "mgr": {
         "ceph version 15.2.12 
(ce065eabfa5ce81323b009786bdf5bb03127cbe1) octopus (stable)": 2
     },
     "osd": {
         "ceph version 15.2.12 
(ce065eabfa5ce81323b009786bdf5bb03127cbe1) octopus (stable)": 2
     },
     "mds": {},
     "rgw": {
         "ceph version 15.2.12 
(ce065eabfa5ce81323b009786bdf5bb03127cbe1) octopus (stable)": 1
     },
     "overall": {
         "ceph version 15.2.12 
(ce065eabfa5ce81323b009786bdf5bb03127cbe1) octopus (stable)": 7
     }
}

root at server ~# pkgfile /usr/lib/librbd.so.1.12.0
community/ceph-libs
root at server ~# pacsearch ceph-libs
community/ceph-libs 15.2.12-1 [installed]
     Distributed, fault-tolerant storage platform delivering object, 
block, and file system

Sorry I should have included this information in my original email. I 
followed this guide 
(https://blog.modest-destiny.com/posts/kvm-libvirt-add-ceph-rbd-pool/) 
to setup the above configuration and I also tried following the guide at 
https://docs.ceph.com/en/latest/rbd/libvirt/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20210524/3cbaa9d0/attachment-0001.htm>


More information about the libvir-list mailing list