Your procedure appears correct to me. Would you mind re-running your cloned image VM with the following ceph.conf properties: [client] rbd cache off debug rbd = 20 log file = /path/writeable/by/qemu.$pid.log If you recreate the issue, would you mind opening a ticket at http://tracker.ceph.com/projects/rbd/issues? Thanks, -- Jason Dillaman Red Hat dillaman@xxxxxxxxxx http://www.redhat.com ----- Original Message ----- From: "koukou73gr" <koukou73gr@xxxxxxxxx> To: ceph-users@xxxxxxxxxxxxxx Sent: Monday, March 2, 2015 7:16:08 AM Subject: qemu-kvm and cloned rbd image Hello, Today I thought I'd experiment with snapshots and cloning. So I did: rbd import --image-format=2 vm-proto.raw rbd/vm-proto rbd snap create rbd/vm-proto@s1 rbd snap protect rbd/vm-proto@s1 rbd clone rbd/vm-proto@s1 rbd/server And then proceeded to create a qemu-kvm guest with rbd/server as its backing store. The guest booted but as soon as it got to mount the root fs, things got weird: [...] scsi2 : Virtio SCSI HBA scsi 2:0:0:0: Direct-Access QEMU QEMU HARDDISK 1.5. PQ: 0 ANSI: 5 sd 2:0:0:0: [sda] 20971520 512-byte logical blocks: (10.7 GB/10.0 GiB) sd 2:0:0:0: [sda] Write Protect is off sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA sda: sda1 sda2 sd 2:0:0:0: [sda] Attached SCSI disk dracut: Scanning devices sda2 for LVM logical volumes vg_main/lv_swap vg_main/lv_root dracut: inactive '/dev/vg_main/lv_swap' [1.00 GiB] inherit dracut: inactive '/dev/vg_main/lv_root' [6.50 GiB] inherit EXT4-fs (dm-1): INFO: recovery required on readonly filesystem EXT4-fs (dm-1): write access will be enabled during recovery sd 2:0:0:0: [sda] abort sd 2:0:0:0: [sda] abort sd 2:0:0:0: [sda] abort sd 2:0:0:0: [sda] abort sd 2:0:0:0: [sda] abort sd 2:0:0:0: [sda] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE sd 2:0:0:0: [sda] Sense Key : Aborted Command [current] sd 2:0:0:0: [sda] Add. Sense: I/O process terminated sd 2:0:0:0: [sda] CDB: Write(10): 2a 00 00 b0 e0 d8 00 00 08 00 Buffer I/O error on device dm-1, logical block 1058331 lost page write due to I/O error on dm-1 sd 2:0:0:0: [sda] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE sd 2:0:0:0: [sda] Sense Key : Aborted Command [current] sd 2:0:0:0: [sda] Add. Sense: I/O process terminated sd 2:0:0:0: [sda] CDB: Write(10): 2a 00 00 6f ba c8 00 00 08 00 [ ... snip ... snip ... more or less the same messages ] end_request: I/O error, dev sda, sector 3129880 end_request: I/O error, dev sda, sector 11518432 end_request: I/O error, dev sda, sector 3194664 end_request: I/O error, dev sda, sector 3129824 end_request: I/O error, dev sda, sector 3194376 end_request: I/O error, dev sda, sector 11579664 end_request: I/O error, dev sda, sector 3129448 end_request: I/O error, dev sda, sector 3197856 end_request: I/O error, dev sda, sector 3129400 end_request: I/O error, dev sda, sector 7385360 end_request: I/O error, dev sda, sector 11515912 end_request: I/O error, dev sda, sector 11514112 __ratelimit: 12 callbacks suppressed sd 2:0:0:0: [sda] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE sd 2:0:0:0: [sda] Sense Key : Aborted Command [current] sd 2:0:0:0: [sda] Add. Sense: I/O process terminated sd 2:0:0:0: [sda] CDB: Write(10): 2a 00 00 af b0 80 00 00 10 00 __ratelimit: 12 callbacks suppressed __ratelimit: 13 callbacks suppressed Buffer I/O error on device dm-1, logical block 1048592 lost page write due to I/O error on dm-1 Buffer I/O error on device dm-1, logical block 1048593 lost page write due to I/O error on dm-1 sd 2:0:0:0: [sda] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE sd 2:0:0:0: [sda] Sense Key : Aborted Command [current] sd 2:0:0:0: [sda] Add. Sense: I/O process terminated sd 2:0:0:0: [sda] CDB: Write(10): 2a 00 00 2f bf 00 00 00 08 00 Buffer I/O error on device dm-1, logical block 480 lost page write due to I/O error on dm-1 [... snip... more of the same ... ] Buffer I/O error on device dm-1, logical block 475 lost page write due to I/O error on dm-1 Buffer I/O error on device dm-1, logical block 476 lost page write due to I/O error on dm-1 Buffer I/O error on device dm-1, logical block 477 lost page write due to I/O error on dm-1 sd 2:0:0:0: [sda] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE sd 2:0:0:0: [sda] Sense Key : Aborted Command [current] sd 2:0:0:0: [sda] Add. Sense: I/O process terminated sd 2:0:0:0: [sda] CDB: Write(10): 2a 00 00 2f be 30 00 00 10 00 Buffer I/O error on device dm-1, logical block 454 lost page write due to I/O error on dm-1 sd 2:0:0:0: [sda] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE sd 2:0:0:0: [sda] Sense Key : Aborted Command [current] sd 2:0:0:0: [sda] Add. Sense: I/O process terminated sd 2:0:0:0: [sda] CDB: Write(10): 2a 00 00 2f be 10 00 00 18 00 sd 2:0:0:0: [sda] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE sd 2:0:0:0: [sda] Sense Key : Aborted Command [current] sd 2:0:0:0: [sda] Add. Sense: I/O process terminated sd 2:0:0:0: [sda] CDB: Write(10): 2a 00 00 2f be 08 00 00 08 00 sd 2:0:0:0: [sda] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE sd 2:0:0:0: [sda] Sense Key : Aborted Command [current] sd 2:0:0:0: [sda] Add. Sense: I/O process terminated sd 2:0:0:0: [sda] CDB: Write(10): 2a 00 00 2f bd 88 00 00 08 00 __ratelimit: 5 callbacks suppressed Buffer I/O error on device dm-1, logical block 433 lost page write due to I/O error on dm-1 sd 2:0:0:0: [sda] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE sd 2:0:0:0: [sda] Sense Key : Aborted Command [current] sd 2:0:0:0: [sda] Add. Sense: I/O process terminated sd 2:0:0:0: [sda] CDB: Write(10): 2a 00 00 2f bd 10 00 00 08 00 Buffer I/O error on device dm-1, logical block 418 lost page write due to I/O error on dm-1 sd 2:0:0:0: [sda] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE sd 2:0:0:0: [sda] Sense Key : Aborted Command [current] sd 2:0:0:0: [sda] Add. Sense: I/O process terminated sd 2:0:0:0: [sda] CDB: Write(10): 2a 00 00 2f b0 00 00 00 10 00 Buffer I/O error on device dm-1, logical block 0 lost page write due to I/O error on dm-1 Buffer I/O error on device dm-1, logical block 1 lost page write due to I/O error on dm-1 JBD: recovery failed EXT4-fs (dm-1): error loading journal mount: wrong fs type, bad option, bad superblock on /dev/mapper/vg_main-lv_root, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so sd 2:0:0:0: [sda] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE sd 2:0:0:0: [sda] Sense Key : Aborted Command [current] sd 2:0:0:0: [sda] Add. Sense: I/O process terminated sd 2:0:0:0: [sda] CDB: Read(10): 28 00 00 2f b8 00 00 00 08 00 Buffer I/O error on device dm-1, logical block 256 I destroyed the guest at this point. I then did: rbd flatten rbd/server And proceeded to start the guest again, this time it booted without problem! Thinking I might have done something wrong before, I shutdown the guest and: rbd snap unprotect rbd/vm-proto@s1 rbd snap purge rbd/vm-proto rbd rm rbd/vm-proto rbd mv rbd/server rbd/vm-proto rbd snap create rbd/vm-proto@s1 rbd snap protect rbd/vm-proto@s1 rbd clone rbd/vm-proto@s1 rbd/server That is, I killed the old base, used the flattened image as a base and redid all the steps. But, nada, when the guest booted off the clone image again, it failed with much the same errors as above. I am using: QEMU emulator version 1.5.3 (qemu-kvm-1.5.3-60.el7.centos.11), Copyright (c) 2003-2008 Fabrice Bellard from the rhev sources and: ceph version 0.87.1 (283c2e7cfa2457799f534744d7d549f83ea1335e) I think booting from cloned images is supported, right? So what am I doing wrong? Thanks for any pointers, -Kostas _______________________________________________ ceph-users mailing list ceph-users@xxxxxxxxxxxxxx http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com _______________________________________________ ceph-users mailing list ceph-users@xxxxxxxxxxxxxx http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com