Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagetext
themeEmacs
B # dnf install -y pv libnbd

B # qemu-img create -f qcow2 disk.qcow2 500G
Formatting 'disk.qcow2', fmt=qcow2 size=536870912000 cluster_size=65536 lazy_refcounts=off refcount_bits=16

B # ls -alh disk.qcow2
200K    disk.qcow2

B # ssh root@remote "dd if=/dev/sda bs=256M | gzip -1 -" | gzip -d | pv | nbdcopy -- - [ qemu-nbd -f qcow2 --detect-zeroes=on --discard=on disk.qcow2 ]
 21GiB 0:04:33 [36.9MiB/s]
446GiB 0:45:30 [ 167MiB/s]

B # ls -alh disk.qcow2
38G     disk.qcow2

B # virt-filesystems -l -h -a disk.qcow2
Name                      Type        VFS   Label  Size  Parent
/dev/sda2                 filesystem  ext4  -      1.0G  -
/dev/ubuntu-vg/ubuntu-lv  filesystem  ext4  -      200G  -

...