-
Notifications
You must be signed in to change notification settings - Fork 116
Open
Description
In my PC I'm using LVM and I'm unable to use the saveparts and restoreparts functions in Clonezilla.
Clonezilla live version tested:
3.2.2-15(latest stable)3.2.3-11(latest testing)
This is my disk (simulated in VirtualBox for simplicity but same results with real machine):
$ sudo sgdisk -p /dev/sda
Disk /dev/sda: 62914560 sectors, 30.0 GiB
Model: VBOX HARDDISK
...
Number Start (sector) End (sector) Size Code Name
1 2048 1050623 512.0 MiB EF00 EFI System
2 1050624 62912511 29.5 GiB 8E00 Linux LVM
My LVM partitions:
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 30G 0 disk
├─sda1 8:1 0 512M 0 part /boot/efi
└─sda2 8:2 0 29,5G 0 part
├─vgubuntu-root 254:0 0 28,5G 0 lvm /
└─vgubuntu-swap_1 254:1 0 980M 0 lvm [SWAP]
Then I run Clonezilla:
$ sudo ocs-sr -q2 -c -j2 -z9p -i 0 -sfsck -senc -p true saveparts BACKUPPATH sda1 vgubuntu/root
Setting the TERM as linux
Starting /usr/sbin/ocs-sr at 2025-07-15 16:43:23 CEST...
use_dev_list_cache is set as no. Do not prepar device name cache files in /tmp/ocs-cache//...
*****************************************************.
Clonezilla image dir: /home/partimag
*****************************************************.
Shutting down the Logical Volume Manager
Shutting Down logical volume: /dev/vgubuntu/root
Shutting Down logical volume: /dev/vgubuntu/swap_1
Shutting Down volume group: vgubuntu
Finished Shutting down the Logical Volume Manager
The image name is: 2025-07-15-16-img-test
Selected device [sda1] found!
The input device [vgubuntu/root] does NOT exist in this machine!
We will not save this device [vgubuntu/root]!
sed: -e expression #1, char 21: unknown option to `s'
Press enter to continue!
Why is Clonezilla shutting down my LVM?
Ok, if I'm using savedisk or restoredisk maybe is the right choice, but I need to use saveparts and restoreparts.
I'm missing some options (usually I'm using beginner mode, so is possible) or there isn't an option to avoid shutting down LVM?
Instead if I run partclone directly it works perfectly.
These are the commands i use, in case anyone has the same problem.
Backup:
$ sudo partclone.ext4 -c -s /dev/vgubuntu/root | zstd | sudo tee /home/partimag/BACKUPPATH/vgubuntu-root.ext4-ptcl-img.zst > /dev/null
Partclone v0.3.37 http://partclone.org
Starting to clone device (/dev/vgubuntu/root) to image (-)
Reading Super Block
Calculating bitmap... Please wait...
Elapsed: 00:00:01, Remaining: 00:00:00, Completed: 100.00%
Total Time: 00:00:01, 100.00% completed!
done!
File system: EXTFS
Device size: 30,6 GB = 7481344 Blocks
Space in use: 7,8 GB = 1892903 Blocks
Free Space: 22,9 GB = 5588441 Blocks
Block size: 4096 Byte
Elapsed: 00:02:06, Remaining: 00:00:00, Completed: 100.00%, Rate: 3,69GB/min,
Current block: 7342597, Total block: 7481344, Complete: 100.00%
Total Time: 00:02:06, Ave. Rate: 3,69GB/min, 100.00% completed!
Syncing... OK!
Partclone successfully cloned the device (/dev/vgubuntu/root) to the image (-)
Cloned successfully.
Restore:
$ sudo cat /home/partimag/BACKUPPATH/vgubuntu-root.ext4-ptcl-img.zst | unzstd | sudo partclone.restore -d -s - -o /dev/vgubuntu/root
lisz8
Metadata
Metadata
Assignees
Labels
No labels