Re: Qemu RBD image usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 
This should get you started with using rbd.

    <disk type='network' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <auth username='rbd.vps'>
        <secret type='ceph' uuid='xxxx'/>
      </auth>
      <source protocol='rbd' name='rbd/vps-test2'>
        <host name='192.168.10.111' port='6789'/>
        <host name='192.168.10.112' port='6789'/>
        <host name='192.168.10.113' port='6789'/>
      </source>
      <target dev='sda' bus='scsi'/>
      <vendor>WDC</vendor>
      <product>WD40EFRX-68WT0N0</product>
      <boot order='1'/>
      <alias name='scsi0-0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>




cat > secret.xml <<EOF
<secret ephemeral='no' private='no'>
        <uuid>xxxx</uuid>
        <usage type='ceph'>
                <name>client.rbd.vps secret</name>
        </usage>
</secret>
EOF

virsh secret-define --file secret.xml

virsh secret-set-value --secret xxxx --base64 `ceph auth get-key 
client.rbd.vps 2>/dev/null`



-----Original Message-----
To: ceph-users@xxxxxxxxxxxxxx
Cc: dev@xxxxxxx
Subject:  Qemu RBD image usage

Hi all,
   I want to attach another RBD image into the Qemu VM to be used as 
disk.
   However, it always failed.  The VM definiation xml is attached.
   Could anyone tell me where I did wrong?
   || nstcc3@nstcloudcc3:~$ sudo virsh start ubuntu_18_04_mysql 
--console
   || error: Failed to start domain ubuntu_18_04_mysql
   || error: internal error: process exited while connecting to monitor:
   || 2019-12-09T16:24:30.284454Z qemu-system-x86_64: -drive
   || 
file=rbd:rwl_mysql/mysql_image:auth_supported=none:mon_host=nstcloudcc4\
:6789,format=raw,if=none,id=drive-virtio-disk1:
   || error connecting: Operation not supported


   The cluster info is below:
   || ceph@nstcloudcc3:~$ ceph --version
   || ceph version 14.0.0-16935-g9b6ef711f3 
(9b6ef711f3a40898756457cb287bf291f45943f0) octopus (dev)
   || ceph@nstcloudcc3:~$ ceph -s
   ||   cluster:
   ||     id:     e31502ff-1fb4-40b7-89a8-2b85a77a3b09
   ||     health: HEALTH_OK
   ||  
   ||   services:
   ||     mon: 1 daemons, quorum nstcloudcc4 (age 2h)
   ||     mgr: nstcloudcc4(active, since 2h)
   ||     osd: 4 osds: 4 up (since 2h), 4 in (since 2h)
   ||  
   ||   data:
   ||     pools:   1 pools, 128 pgs
   ||     objects: 6 objects, 6.3 KiB
   ||     usage:   4.0 GiB used, 7.3 TiB / 7.3 TiB avail
   ||     pgs:     128 active+clean
   ||  
   || ceph@nstcloudcc3:~$
   || ceph@nstcloudcc3:~$ rbd info rwl_mysql/mysql_image
   || rbd image 'mysql_image':
   ||         size 100 GiB in 25600 objects
   ||         order 22 (4 MiB objects)
   ||         snapshot_count: 0
   ||         id: 110feda39b1c
   ||         block_name_prefix: rbd_data.110feda39b1c
   ||         format: 2
   ||         features: layering, exclusive-lock, object-map, fast-diff, 
deep-flatten
   ||         op_features: 
   ||         flags: 
   ||         create_timestamp: Mon Dec  9 23:48:17 2019
   ||         access_timestamp: Mon Dec  9 23:48:17 2019
   ||         modify_timestamp: Mon Dec  9 23:48:17 2019

B.R.
Changcheng


_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com



[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Ceph Dev]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux