Successfully create an image of a disk which contains a partition formated with the btrfs filesystem.
Successfully create an image of a partition formated with the btrfs filesystem.
As partclone attempts the Calculating bitmap step it fails on checking disk space.
It generates this error message:
Checking disk space... Failed to use partclone program to save or restore an image! Press "Enter" to continue......
Striking Enter
does nothing. The system must be rebooted (Ctrl
+Alt
+Delete
, etc.).
Using the default -q2
parameter (I used both the beginnner mode and the expert mode to use this), I would expect Clonezilla to proceed to partimage and dd upon failure. As I indicated, this does not occur. I know that dd can successfully create an image (I tested this on the partition alone), though I would imagine that partclone should be able to create the image itself.
A disk with a number of partitions, among which is a btrfs formatted partition.
- disk-image mode
- savedisk or saveparts on the disk containing the btrfs partition or the btrfs partition
Tested on clonezilla-live-2.6.2-15-amd64 and clonezilla-live-20190420-disco-amd64.
Is there any workaround that could possibly solve the problem? Ideally, I want to be able to use the restoredisk to restore all of the partitions at once.
So are you sure it's unmounted cleanly? If you are not sure, please run fsck to check its integrity first?
If the issue still remains, please let us know how you create that file system (the version for mkfs.btrfs, the OS you have installed...).
Thanks.
Steven
had the same behaviour here backing up opensuse 15.1.
mkfs.btrfs, part of btrfs-progs v4.19.1
fdisk -l
Einheiten: Sektoren von 1 * 512 = 512 Bytes
Sektorgröße (logisch/physikalisch): 512 Bytes / 512 Bytes
E/A-Größe (minimal/optimal): 512 Bytes / 512 Bytes
Festplattenbezeichnungstyp: gpt
Festplattenbezeichner: 046E236D-3078-4C72-A17E-C0F12A946E4B
Gerät Anfang Ende Sektoren Größe Typ
/dev/sda1 2048 18431 16384 8M BIOS boot
/dev/sda2 18432 83904511 83886080 40G Linux-Dateisystem
/dev/sda3 83904512 460865535 376961024 179,8G Linux-Dateisystem
/dev/sda4 460865536 468862094 7996559 3,8G Linux Swap
mounted as follows:
/dev/sda2 on / type btrfs (rw,relatime,ssd,space_cache,subvolid=533,subvol=/@/.snapshots/203/snapshot)
/dev/sda2 on /boot/grub2/i386-pc type btrfs (rw,relatime,ssd,space_cache,subvolid=265,subvol=/@/boot/grub2/i386-pc)
/dev/sda2 on /boot/grub2/x86_64-efi type btrfs (rw,relatime,ssd,space_cache,subvolid=264,subvol=/@/boot/grub2/x86_64-efi)
/dev/sda2 on /opt type btrfs (rw,relatime,ssd,space_cache,subvolid=263,subvol=/@/opt)
/dev/sda2 on /.snapshots type btrfs (rw,relatime,ssd,space_cache,subvolid=266,subvol=/@/.snapshots)
/dev/sda2 on /srv type btrfs (rw,relatime,ssd,space_cache,subvolid=261,subvol=/@/srv)
/dev/sda2 on /tmp type btrfs (rw,relatime,ssd,space_cache,subvolid=260,subvol=/@/tmp)
/dev/sda2 on /usr/local type btrfs (rw,relatime,ssd,space_cache,subvolid=259,subvol=/@/usr/local)
/dev/sda2 on /root type btrfs (rw,relatime,ssd,space_cache,subvolid=262,subvol=/@/root)
/dev/sda2 on /var type btrfs (rw,relatime,ssd,space_cache,subvolid=258,subvol=/@/var)
/dev/sda3 on /home type xfs (rw,relatime,attr2,inode64,noquota)
sda1 and sda3 are working as expected, sda2 containing btrfs not.
I installed OpenSUSE 15.1 on VMWare WS 15.5, with this partitions layout:
root@eoan:~# parted -s /dev/sda print
Model: VMware, VMware Virtual S (scsi)
Disk /dev/sda: 21.5GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: pmbr_boot
Number Start End Size File system Name Flags
1 1049kB 9437kB 8389kB bios_grub
2 9437kB 20.0GB 20.0GB btrfs legacy_boot
3 20.0GB 21.5GB 1473MB linux-swap(v1)
After booting Clonezilla live 20191024-eoan amd64, mount the image repository on NFS server,then run the following as root:
/usr/sbin/ocs-sr -nogui -q2 -c -j2 -z1p -i 4096 -sfsck -senc -p choose savedisk opensuse15.1-btrfs-20191025 sda
The following is the output, and it looks normal. It seems I can not reproduce this issue:
I also have the same problem with a btrfs filesystem on Arch Linux. I get the exact same error message on screen and unresponsive behaviour trying to hit Enter. Hitting Ctrl-Alt-Del seems to skip the btrfs partition and maybe finish the last partition but I'm not sure because it doesn't return to prompt like I set in the options.
Output of /var/log/clonezilla.log below.
I have used clonezilla to back up these partitions before without issue. Also, this image was successfully restored recently and now has the issue of not being able to be backed up. Not certain if it is useful information, but the filesystem was originally created on a different nvme drive and restored to a new one. It booted fine without issue after the restore.
I am using clonezilla-live-2.6.4-10-amd64.iso on a usb. I was trying to do a disk-image with save disk as image in beginner mode.
I tried a full rebalance as the user in this thread did but it did not succeed in fixing this issue.
https://sourceforge.net/p/clonezilla/discussion/Clonezilla_live/thread/d622f01a/#3672
The problem is with partition nvme0n1p2 as boot is vfat and home is ext4. No issues there.
My partitions were created as follows:
Subvolumes created as such:
Subvolumes mounted as such:
I have been expereincing this issue on Kubuntu(Currently 20.04) and Clonezilla version 28042020 stable.
I have a dual boot setup on a GPT disk. The two small disk system partitions and the Windows10 partition (ntfs) backup as expected however, when Clonezilla tries to calculate the bitmap of the first btrfs partition which is mounted to / it fails with the error message described here.
Each of my btrfs partitions had one subvolume snapshot present.
I deleted these snapshots, did a balance and scrub on both partitions and tried the backup again.
This time it was successful therefore this is somehting to do with the snapshots?
Is clonezilla looking at the snapshots as a duplicate of the data and running out of available space on the backup drive as a result?
Can I provide any more information to assist with diagnosing this issue?
Thanks.
James
@James,
If will be easier for us the reproduce this issue if you could :
1. Describe the steps you save the snapshot
2. Provide the error messages
Thanks.
Steven
Hi Steven,
My situation is exactly as the original poster says.
I have two btrfs partitions, one for my root and one for my home partitions.
I can back them both up with Clonezilla IF I have no snapshots created but, if I create a snapshot on either of them the backup fails with the message:
*Checking disk space... Failed to use partclone program to save or restore an image! Press "Enter" to continue....
which is actually printed over the top of everything else on the screen and very badly formatted :)
*I use clonezilla mostly in "other modes" and "load to RAM" but, as an experiment, I used the default settings and had the same result.
I'm pretty sure that clonezilla is looking at the drive as if the snapshot is actually another copy of the entire data contents.
So, to summarise, I boot from the clonezilla USB.
I select default mode.
I set a local drive as the home drive for backups
I choose "backup partitions"
I select the relevant partitions form the list
and I click on backup.
The program manages to backup my Windws 10 NTFS partition and the GPT system partitions and then fails on attempting to start on the first btrfs partition with the afore mentioned message.
If there is anything else you would like me to do to help diagnose this then just let me know.
James
Last edit: Steven Shiau 2020-07-27
OK, we will check that. Thomas Tsai is very busy, and I hope he can find some time to update the codes about btrfs in Partclone recently.
Steven
Hi steven,
Thanks for that, I appreciate that everyone is very busy and would appreciate it if this could be sorted.
For now I just delete my btrfs snapshots, clean up the filesystem with a scrub and balance the partitions before making an image which is time consuming but effective :)
Also has the effect of increasing my confidence in the use of btrfs in general so all good :)
How will I keep updated on progress with this please? Is there an open bug report?
James
Last edit: Steven Shiau 2020-07-27
If we update Partclone about btrfs, we will post here to ask you to test again.
Thanks.
Steven
I don't know if this has been fixed or not but, on the latest available version of Clonezilla:
clonezilla-live-20200818-focal-amd64
I have been able to backup all my btrfs partitions with one snapshot on each.
Can anyone confirm if steps have been taken to mitigate this issue?
Thanks.
James
Although Partclone was updated from 0.3.13 to 0.3.14 in clonezilla-live-20200818-focal-amd64, the code about btrfs was not actually updated. The major change about Partclone 0.3.13 to 0.3.14 is to make it work for GCC10. Maybe that's a side effect... a good thing... :)
Steven
I too had this error two times in the last years with different Partclone versions.
No errors were reported during BTRFS checks.
I also managed to fix the issue by balance, scrub and quota rescan (I don't know which one was the decicive factor, will proof it next time).
I think we have to wait for Thomas Tsai to update the btrfs-related codes in Partclone.
Steven
This is odd because, it's now working for me with two btrfs partitions,
both with snapshots created? This is the kind of thing that makes a
developers job so difficult :)
James
On 11/10/2020 04:05, Steven Shiau wrote:
Please note -
This email and any attachment it may contain is for the individual to
which it was originally addressed.
If you are not the original intended recipient, you are notified that
any disclosure, copying, alteration, distribution,
publication or the taking of action in reliance on the contents is
prohibited and may be an offence.
jkp@bronyaur.co.uk jkp@bronyaur.co.uk
jpirie@fastmail.com jpirie@fastmail.com
Related
Bugs:
#327Hi,
I stumbled onto the exact same error while trying to backup my Intel NUC. On the NVME SSD it got 11 partitions for EFI, Windows, 2x Linux Mint, 1x Fedora, a docker partition, swap and Haiku R1/beta2. Of these partitions the two Linux Mint are btrfs. It fails with the first one but not with the second. The partition table is GPT.
Versions 20200703-focal and 20201022-focal did show the same result, as did disk or partition backup.
After that I tried using only partclone and got the following error on the first btrfs partition (see screenshot)
set block 8276672 out of boundary (8276672)"
The same error was thrown in 3.1.3 on Linux Mint 20 and 3.1.5 with 20201022-focal.
partclone was called:
sudo partclone.btrfs -o <output-img-file>-L <log-file> -s /dev/nvme0n1p6 -c -N
The log file:
Maybe these infos can help in debugging the issue. What other information would be helpful?
/Thomas
Hi,
It's me again: I did some further digging and found something which I find strange - but maybe it's just not-knowing:
Running
sudo btrfs inspect-internal dump-super /dev/nvme0n1p6
showed the following values:chunk_root
value is greater thantotal_bytes
, is that to be expected?Can someone who got the same error run
inspect-internal dump-super
and check if they got a similar situation?/Thomas
Hello Again,
Last update, I swear :)
Updating the
btrfs-progs
component ofpartclone
to v5.4.1 did not solve this issue.That let me to believe that it got to be an issue with internals of that specifiy btrfs partition than a bug in
partclone
.I created a backup of the complete NUC using clonezilla (using nfsclone > partimage > dd). After restoring that backup to a virtual machine I shrank the 125GB partition by 20GB but still no success.
Expanding the partition back to is original size did solve it for me.
partclone.btrfs
did run successfully after that. Then I did the same on the Intel NUC and it solved my issue there too.The
chunk_root
vstotal_bytes
values haven't changed but the tools seem not to mind - so neither do I./Thomas K.
Hi Thomas,
I've been watching your progress and am delighted to hear you see to have solved your own problem :)
Well done for perseverence. However, we are still no closer to finding out what causes this :)
My issues cleared when I updated to the newest clonezilla distribtion (I see there is a new Groovy-Gorilla one now though so...dare I try and update ;)
Amyway, just thought I would say that we are watching...just have no helpful input (some of us)
All the best and well done again.
James
Hey James,
:) all good, kind of you to give feedback.
I broke the promise and kept on it a bit and now have it down to the one file that is the culprit. There is only the file 'system.img' (installed by Android Studio) left on the btrfs volume. And
partclone.btrfs
still fails.How would one proceed from that? Would
inspect-internal dump-tree
help?/Thomas K.
Ahhh Thomas, you are mistaking me for someone who knows what they are doing :) I'm sorry to disappoint but I only get by with the Internet as my teacher/knowledgebase>
I'm afraind I have no idea what that command you printed ther is for? Is that a btrfs thing?
I've only just started using btrfs and am still at the level of being able to make subvolumes, take snapshots (and delete them) and do balances and scrubs. As to how it all works and how I can get myself out of any difficulties I expereince...it's all a mystery sadly :)
But, I do take regular backups with clonezilla and was so glad when my system started to work again with that program.
As I said earlier, after i updated to the next version of Clonezilla my issues went away and I can now backup btrfs partitions without issue.
Really sorry not to be able to help but I may nip off and try that command out just to see what happens ;)
Good luck, I'm sure you'll get through this :)
J
We have uploaded Clonezilla live 2.7.0-9 and 20201029-*:
https://clonezilla.org/downloads.php
It includes Partclone 0.3.17, which has updated BTRFS 5.4 by Thomas Kupper and merged by Thomas Tsai.
Please test it for BTRFS and maybe the results will be different.
Thanks.
Steven
It works !
Thanks
Great! Thanks for your report.
Steven