LXC: Move volume why using rsync

janos

Member
Aug 24, 2017
158
14
23
Hungary
Hello,

If i move volume a LXC volume, it basically create a new volume, format it and copy data with rsync.

Why not copy the disk image itself, why need rsync?

For example, if i want to move volume from rbd to local raw file, i can also do it with rbd export, and if i modify CT conf file, it working fine.

The reason why im asking, because based on my experience, when there is a lot of small files in container (or in general), rsync much slower than DD or any disk image copy method. Yeah i know, DD, or rbd export copy empty blokks also, but if the volume trimmed before it, possible to skip this.
 

LnxBil

Famous Member
Feb 21, 2015
5,443
588
133
Germany
Why not copy the disk image itself, why need rsync?
Simple: rsync works with every possible backend storage and is therefore used. Of course can you always do faster, more refined methods, but they bloat the code and make it very hard to debug and to test. There is also no other method of moving a ZFS dataset to a file directly, the filesystem is missing.
 

janos

Member
Aug 24, 2017
158
14
23
Hungary
Im not using ZFS, what is this ZFS dataset? Is this not a block storage device? (somehow have to access raw device kernel also)
 

LnxBil

Famous Member
Feb 21, 2015
5,443
588
133
Germany
Im not using ZFS, what is this ZFS dataset? Is this not a block storage device? (somehow have to access raw device kernel also)
In ZFS there are - as in LVM - volumes, they come in a file-fashion and are called dataset and they come in a block-fashion called zvol.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE and Proxmox Mail Gateway. We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get your own in 60 seconds.

Buy now!