clonezilla icon indicating copy to clipboard operation
clonezilla copied to clipboard

Request for Improved Compatibility of Clonezilla with LVM Partitions on Proxmox Systems

Open kitopopo opened this issue 11 months ago • 12 comments

Dear Clonezilla Developers,

I am writing to express my dissatisfaction and concern regarding an issue I have encountered recently with your software. As a long-time user of Clonezilla, I have always relied on its ability to perform reliable and hassle-free backups in Windows environments. However, after migrating to a Proxmox-based system, I have faced significant challenges that compromise the software's utility in this context.

Specifically, when attempting to back up a system with LVM partitions typical of Proxmox, I received the following error:

Checking the device LV pve-data in the image "proxmox-1-2017-04-03-11-img"... This image file for partition pve-data was not found! Broken partition images were found, or some of them are not checkable in this image: proxmox-a-2017-04-03-11-img.

Despite multiple attempts with different versions, including the latest experimental releases, the issue persists. This leads me to conclude that Clonezilla has serious limitations when handling the LVM partitions used by Proxmox.

As an alternative, I have been forced to physically remove the NVMe drive, connect it to a dock station on a PC, and use another software, Macrium Reflect, which has proven capable of accurately cloning the disk, including its LVM partitions.

It is disappointing that such a renowned tool as Clonezilla cannot offer an equivalent solution. To my understanding, Clonezilla is designed to perform sector-by-sector backups, which should be sufficient to manage any type of partition, including LVM.

Therefore, I respectfully request that this issue be reviewed and addressed in future updates. Having to physically remove the NVMe drive every time I need to perform a backup is highly inconvenient and contrary to the efficiency principles that Clonezilla should uphold.

Thank you in advance for your attention to this matter. I look forward to hearing about any possible advancements on this issue.

Sincerely,

kitopopo avatar Jan 15 '25 12:01 kitopopo

Thanks for your feedback. Please make sure if thin provisioning LVM is used in your Proxmox or not? If it is, due to some required tools are sill unavailable, Clonezilla does not support that. For more info, please check: https://github.com/jthornber/thin-provisioning-tools/issues/126

Steven

stevenshiau avatar Jan 19 '25 02:01 stevenshiau

Dear @stevenshiau ,

Thank you for your response. I confirm that my system uses LVM with thin provisioning.

I would like to know if there are any plans to include support for efficiently cloning thin-provisioned LVM in the future, similar to how Macrium Reflect handles it. This feature would be highly valuable for users working with Proxmox-based systems and other environments utilizing this type of partitioning.

Thank you in advance for your attention, and I look forward to your response.

Sincerely,

kitopopo avatar Jan 19 '25 13:01 kitopopo

Absolutely we will try to support the thin provisioning LVM. However, this really depends on the upstream since we do not have the manpower to do that, and it needs some knowledge which we do not have ATM. If you can, maybe you can help to ask in the upstream forum so that it can get more attention from the upstream developers.

Steven

stevenshiau avatar Jan 19 '25 23:01 stevenshiau

Hi @stevenshiau,

Proxmox by default uses lvm-thin because it's super nice in many aspects for Proxmox's use case.

Would it be possible, while Thin LVM's cannot be supported, to detect them during the backup process and show a big warning message?

Redsandro avatar Jun 14 '25 11:06 Redsandro

Thanks for your suggestion. Sure, we should do this in the near future.

stevenshiau avatar Jun 29 '25 11:06 stevenshiau

Please give testing Clonezilla live 3.2.3-8 a try: https://clonezilla.org/downloads.php This issue should have been addressed. Please let us know the results if you test it. Thanks.

stevenshiau avatar Jul 09 '25 07:07 stevenshiau

Hi, I tried live-3.3.0-6 but it didn't detect my Proxmox system was incompatible. I attached every "small" file from the backup and all logs. The file "screen.log" shows stdout/stderr (I cleared most ANSI control codes) and contains more information than "clonezilla.log". E.g.

pve /dev/sda3 FUChYB-N5rQ-hM0y-X1ke-i4Ff-UGpo-qim11I
Parsing logical volumes...
/dev/pve/data  cannot open `/dev/pve/data' (No such file or directory)

or

Broken partition images were found, or some of them are not checkable in this image: 2025-08-27-00-29
==========================
Program terminated!!

I ran this command: ocs-sr -q2 -batch -j2 -z9p -i 0 -sfsck -senc -p true savedisk $mydir sda

backup.zip logs.zip

lisz8 avatar Aug 27 '25 10:08 lisz8

No idea actually. Maybe you can:

  1. Share how you install your Proxmox system there so that we can try to reproduce this issue here.
  2. Share the image you have saved if there are nothing classified.

stevenshiau avatar Aug 31 '25 11:08 stevenshiau

There are actually two cases: Proxmox without VM/LXC and with VM/LXC.

Setup:

  1. create a virtual machine in Virtual Box: Debian x64, 40GB disk, UEFI, nested VT-x/AMD-V and nested paging
  2. install Proxmox with default settings (proxmox-ve_9.0-1.iso or version 8.4) You'll get a LVM2-formatted system with empty /dev/pve/data:
root@pve-test2:~# lvs
  LV   VG  Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  data pve twi-a-tz-- <10.97g             0.00   1.58
  root pve -wi-ao----  17.84g
  swap pve -wi-ao----   3.80g

This is case 1. You can use Clonezilla live on such a disk (full disk backup, all defaults), and it will backup fine, using partclone.ext4 on /dev/pve/root and partclone.dd on /dev/pve/data. You can restore this backup without errors or problems in the restored system.

Now, case 2: create a VM or LXC container. I don't know how to do it in CLI - connect to the Proxmox UI at https://IP:8006, select the storage named "local" (it corresponds to /dev/pve/root), select CT Templates, Templates (button), and download e.g. Alpine. Now click "Create CT" (in the upper right corner), and use this template. Notice the "Disks" tab, where "storage" is set to "local-lvm", which is a LVM-thin pool.

root@pve-test2:~# lvs
  LV            VG  Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  data          pve twi-aotz-- <10.97g             1.27   1.58
  root          pve -wi-ao----  17.84g
  swap          pve -wi-ao----   3.80g
  vm-100-disk-0 pve Vwi-a-tz--   4.00g data        3.50

Try backing it up with Clonezilla live, and it will fail. The LVM-partition /dev/pve/data is now missing. The restored system boots but the thin pool is broken.


I should also mention that "cloning" a disk to another disk always works. Perhaps Clonezilla could simply use the same method in "disk-image" mode?

lisz8 avatar Aug 31 '25 16:08 lisz8

So for your case 2, if you boot Clonezilla live, then run:

  1. sudo -i
  2. lvs -o segtype pve | grep -Eo '(thin|thin-pool)'

What is the result for (2)?

stevenshiau avatar Sep 01 '25 10:09 stevenshiau

user@debian:~$ sudo -i
root@debian:~# lvs -o segtype pve | grep -Eo '(thin|thin-pool)'
thin-pool
thin
root@debian:~#

lisz8 avatar Sep 01 '25 11:09 lisz8

That's weird. Since thin provisioning is found, the program should exit...

stevenshiau avatar Sep 01 '25 12:09 stevenshiau