I am attempting to run clonezilla live 2.2.4-12 to clone a Centos 7 system. Here is the list of the partitions on the hard drive:
[root@dt sbin]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda2 1952047860 136193804 1815854056 7% /
/dev/sda1 505580 118680 386900 24% /boot
I got a segfault when using the clonezilla iso, which is hard to debug, so I decided to try booting the Centos 7 OS itself, and then manually cloning a partition. First I unmounted the /boot partition:
[root@dt sbin]# umount /boot
Next I tried running partclone.xfs under gdb. Unfortunately, there are no symbols in the executable, but here is what I did get:
[root@dt sbin]# gdb ./partclone.xfs
(no debugging symbols found)...done.
(gdb) run -o ~/foo -s /dev/sda1 -c
Starting program: /home2/sfalco/mnt/usr/sbin/./partclone.xfs -o ~/foo -s /dev/sda1 -c
Partclone v0.2.73 http://partclone.org
Starting to clone device (/dev/sda1) to image (/root/foo)
Reading Super Block
Calculating bitmap... Please wait...
Program received signal SIGSEGV, Segmentation fault.
0x0000000000406aa3 in ?? ()
(gdb) bt
0 0x0000000000406aa3 in ?? ()
1 0x00000000004078c5 in ?? ()
2 0x0000000000401976 in ?? ()
3 0x00000000004655f3 in ?? ()
4 0x0000000000403089 in ?? ()
5 0x00007fffffffe4b8 in ?? ()
6 0x0000000000000000 in ?? ()
(gdb) quit
I'm not sure where to go from here. I would try compiling partclone with symbols, but it doesn't appear to be buildable on Centos 7:
saf$ pwd
/home/sfalco/partclone-0.2.74
saf$ ./configure --enable-ncursesw --enable-xfs
... stuff omitted ...
configure: checking for XFS Library and Header files ... ...
checking xfs/libxfs.h usability... no
checking xfs/libxfs.h presence... no
checking for xfs/libxfs.h... no
configure: error: *** XFS header (libxfs.h) not found
Apparently, it is looking for a header file that it cannot find. I do have the development library for xfs installed:
This might not be super helpful, but have you downloaded all your kernel headers through the kernel-devel package? You might still be missing some xfs libraries as well, but I'm not too sure, just download everything that sounds mildly important after running a yum search xfs. It could also be that the computer needs something out of /boot and you've unmounted it so it gets confused. You can't really reliably image partitions of a system while it's running, or at least, that's been my experience. If you really don't want to use clonezilla you can boot into a live ubuntu desktop usb or something and try partclone from there. Getting partclone to work on redhat based systems is a pain compared to debian anyway.
If none of that works then I don't really know how to fix it. I'm currently working on imaging a Scientific Linux 7 machine with xfs partitions, which runs the same kernel as Centos 7 I believe, and I've been able to create and restore an image using clonezilla. I might have gotten something similar to this error early on, but my only suggestion would be to try using a live USB instead of a physical CD for clonezilla. Centos 7 and its analogues seem to not really play well with others from what I've experienced so far. With the switch to systemd and grub2 essentially nothing that applied to older kernels applies anymore, but online documentation is pretty scarce since Centos 7 hasn't even been out for a year.
I hope any of this was helpful,
Kevin
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for the suggestions. I looked at the xfstools package more closely, and apparently the libxfs.h file is part of xfsprogs-qa-devel rather than xfsprogs-devel on Centos 7. The following comment is shown in the build script:
xfsprogs-qa-devel contains headers needed to build the xfstests
QA suite.
You should install xfsprogs-qa-devel only if you are interested
in building or running the xfstests QA suite.
I'm not sure why partclone is using this header file, since it is not part of a QA suite, but I've installed that package, and will go back to trying to build partclone.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The attached file, yyy.gz, contains the output (it will uncompress to a file called zzz). The program runs for a while, finding various groups of blocks, but then winds up finding a group of 256 blocks where the first block is 0xfffffffffffff. At that point we get a segfault.
I've run "xfs_repair -v /dev/sda1" on the filesystem, so I don't think it is corrupt. It certainly works fine when mounted.
I don't know anything about the internals of xfs, so I don't think I can go much further on my own.
Is anyone on the partclone team interested in working on this? The filesystem is fairly small, 500 megs or so. I could dd and gzip it and put it on an ftp server for analysis if anyone wants to take a look at it.
I am attempting to run clonezilla live 2.2.4-12 to clone a Centos 7 system. Here is the list of the partitions on the hard drive:
[root@dt sbin]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda2 1952047860 136193804 1815854056 7% /
/dev/sda1 505580 118680 386900 24% /boot
I got a segfault when using the clonezilla iso, which is hard to debug, so I decided to try booting the Centos 7 OS itself, and then manually cloning a partition. First I unmounted the /boot partition:
[root@dt sbin]# umount /boot
Next I tried running partclone.xfs under gdb. Unfortunately, there are no symbols in the executable, but here is what I did get:
[root@dt sbin]# gdb ./partclone.xfs
(no debugging symbols found)...done.
(gdb) run -o ~/foo -s /dev/sda1 -c
Starting program: /home2/sfalco/mnt/usr/sbin/./partclone.xfs -o ~/foo -s /dev/sda1 -c
Partclone v0.2.73 http://partclone.org
Starting to clone device (/dev/sda1) to image (/root/foo)
Reading Super Block
Calculating bitmap... Please wait...
Program received signal SIGSEGV, Segmentation fault.
0x0000000000406aa3 in ?? ()
(gdb) bt
0 0x0000000000406aa3 in ?? ()
1 0x00000000004078c5 in ?? ()
2 0x0000000000401976 in ?? ()
3 0x00000000004655f3 in ?? ()
4 0x0000000000403089 in ?? ()
5 0x00007fffffffe4b8 in ?? ()
6 0x0000000000000000 in ?? ()
(gdb) quit
I'm not sure where to go from here. I would try compiling partclone with symbols, but it doesn't appear to be buildable on Centos 7:
saf$ pwd
/home/sfalco/partclone-0.2.74
saf$ ./configure --enable-ncursesw --enable-xfs
... stuff omitted ...
configure: checking for XFS Library and Header files ... ...
checking xfs/libxfs.h usability... no
checking xfs/libxfs.h presence... no
checking for xfs/libxfs.h... no
configure: error: *** XFS header (libxfs.h) not found
Apparently, it is looking for a header file that it cannot find. I do have the development library for xfs installed:
saf$ rpm -qa | grep xfs
xfsprogs-3.2.0-0.10.alpha2.el7.x86_64
xfsprogs-devel-3.2.0-0.10.alpha2.el7.x86_64
And I do have xfs.h in /usr/include/xfs, but there is no file called libxfs.h
saf$ ls /usr/include/xfs
handle.h linux.h platform_defs.h xfs_fs.h xqm.h
jdm.h platform_defs-x86_64.h xfs.h xfs_types.h
Please advise me how I might proceed.
This might not be super helpful, but have you downloaded all your kernel headers through the kernel-devel package? You might still be missing some xfs libraries as well, but I'm not too sure, just download everything that sounds mildly important after running a yum search xfs. It could also be that the computer needs something out of /boot and you've unmounted it so it gets confused. You can't really reliably image partitions of a system while it's running, or at least, that's been my experience. If you really don't want to use clonezilla you can boot into a live ubuntu desktop usb or something and try partclone from there. Getting partclone to work on redhat based systems is a pain compared to debian anyway.
If none of that works then I don't really know how to fix it. I'm currently working on imaging a Scientific Linux 7 machine with xfs partitions, which runs the same kernel as Centos 7 I believe, and I've been able to create and restore an image using clonezilla. I might have gotten something similar to this error early on, but my only suggestion would be to try using a live USB instead of a physical CD for clonezilla. Centos 7 and its analogues seem to not really play well with others from what I've experienced so far. With the switch to systemd and grub2 essentially nothing that applied to older kernels applies anymore, but online documentation is pretty scarce since Centos 7 hasn't even been out for a year.
I hope any of this was helpful,
Kevin
Thanks for the suggestions. I looked at the xfstools package more closely, and apparently the libxfs.h file is part of xfsprogs-qa-devel rather than xfsprogs-devel on Centos 7. The following comment is shown in the build script:
xfsprogs-qa-devel contains headers needed to build the xfstests
QA suite.
You should install xfsprogs-qa-devel only if you are interested
in building or running the xfstests QA suite.
I'm not sure why partclone is using this header file, since it is not part of a QA suite, but I've installed that package, and will go back to trying to build partclone.
After a bit of hacking, I got partclone to build on Centos 7. Here is what happens when I run it:
I'm about out of time for today, but Monday I'll look at it further.
I added some printing to set_bitmap:
The attached file, yyy.gz, contains the output (it will uncompress to a file called zzz). The program runs for a while, finding various groups of blocks, but then winds up finding a group of 256 blocks where the first block is 0xfffffffffffff. At that point we get a segfault.
I've run "xfs_repair -v /dev/sda1" on the filesystem, so I don't think it is corrupt. It certainly works fine when mounted.
I don't know anything about the internals of xfs, so I don't think I can go much further on my own.
Is anyone on the partclone team interested in working on this? The filesystem is fairly small, 500 megs or so. I could dd and gzip it and put it on an ftp server for analysis if anyone wants to take a look at it.
Is this issue reproducible on the latest Clonezilla live?
i.e. 20141208-utopic or 2.3.1-18.
I remember there was an update about partclone which addressed the xfs issue.
Steven
Yes, it is reproducible on 2.3.1-18. I am not surprised because the fix you mentioned went in at 2.2.3-28 but I had already tested with 2.2.4-12.
I have a filesystem image on an ftp server if you want to investigate. I can send you the access information via private email if you like.
Any difference for Clonezilla live >= 2.3.2-5?
http://clonezilla.org/downloads.php
It comes with Partclone 0.2.75 so the results might be different.
Steven.
I just tried 2.3.2-7 and got the same error.
I just finish my scientificlinux 7 with xfs file system backup so I guess there are some detial and special different in yours.
did you check your memory before clone? try memtest.
or send me your file system dump and i can do more test for you.
thank you.
I've sent you a message through sourceforge with the URL of the partition dump, along with my private email address.
Thanks for looking at it.
I received your image and segfault happened. I also fixed this issue and release 0.2.76 and will be soon to clonezilla.
thanky you for this bug report and your image is really helpful!
Excellent! Glad I could help, and thanks for partclone / clonezilla!
This updated Partclone will be used in the next testing Clonezilla live, which is scheduled to be uploaded next Tuesday.
Steven.
Confirmed XFS working in clonezilla-live-2.3.2-8. Good Job!
Cool! Thanks for your confirmation.
Steven.