summary refs log tree commit diff stats
path: root/gitlab/issues_text/target_missing/host_missing/accel_missing/2001
blob: 22c0923bbbe164f533e7d926445da8dec3b6ccdc (plain) (blame)
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
qemu_img convert and drive mirror migrate the same raw disk to rbd volume, will get the different USED size in ceph cluster.
Description of problem:
qemu_img convert and drive mirror migrate the same raw disk to rbd volume, will get the different USED size in ceph cluster.
Steps to reproduce:
create raw and qcow2 disk

1. qemu-img create -f raw lvm_volume_1.raw 12G
2. qemu-img create -f qcow2 lvm_volume_1.qcow2 12G

   install a centos OS

3. qemu-system-x86_64 -m 4096 -drive file=lvm_volume_1.qcow2,format=qcow2,index=0 -nographic -cdrom CentOS-8.3.2011-x86_64-dvd1.iso -vnc :25

   convert the qcow2 OS disk to q raw OS disk

4. qemu-img convert -f qcow2 -O raw ./lvm_volume_1.qcow2 ./lvm_volume_1.raw

   create a qemu-rbd process

5. qemu-nbd --fork  -x node1 -p 1238 rbd:cephpool- test/volume_1:id=xxx:key=xxx:mon_host=xxx:auth_supported=cephx

   boot the raw OS disk

6. qemu-system-x86_64 -hda ./lvm_volume_1.raw -m 4096 -smp 4 -vnc :25 -monitor stdio
   
   migrate the raw OS disk to a ceph volume

7. drive_mirror -n  -f #block125 nbd:localhost:1238:exportname=node1 raw
   
   check the rbd volume USED size in ceph cluster
   "rbd du cephpool-test/volume_1"
   the ceph rbd volume PROVISION and USED are the same size

   convert the raw OS disk to a ceph volume

8. qemu-img convert -n -f raw -O raw ./lvm_volume_1.raw rbd:cephpool- 
test/volume_2:id=xxx:key=xxx:mon_host=xxx:auth_supported=cephx

   check the rbd volume USED size in ceph cluster 
   "rbd du cephpool-test/volume_2"
   the ceph rbd volume PROVISION and USED are different PROVISION > USED
Additional information: