#43 Restoring xfs partition results in its corruption

open-fixed
Thomas
5
2009-09-21
2009-09-12
m24578
No

I can create an image of a drive containing xfs partitions with no trouble, and I can restore the disk from such an image with no errors, but booting from the recovered drive fails revealing xfs filesystem corruption. The corruption occurs immediately after using Clonezilla to restore the drive, before that the filesystem is healthy. The problem is reproducible (occurs every time).

Thus it appears that Clonezilla is incompatible with xfs, and attempt of its use results in corruption of a healthy filesystem.

Clonezilla versions tested:
1.2.2.-26 (Debian)
20090910-karmic (Ubuntu)

Clonezilla options used: savedisk, restoredisk - all default ("beginner mode")

Environment:
Dell PowerEdge R710 with 6-drive 12TB hardware array (RAID 6)
Drives: Western Digital WD2002FYPS
The array is divided into 2 drives: ~200GB for system and ~8TB for data. The small system drive was saved and restored.

fdisk -l /dev/sda

Disk /dev/sda: 209.7 GB, 209715200000 bytes
255 heads, 63 sectors/track, 25496 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000cf824

Device Boot Start End Blocks Id System
/dev/sda1 * 1 61 489951 83 Linux [/boot]
/dev/sda2 62 14650 117186142+ 83 Linux [/]
/dev/sda3 14651 19514 39070080 5 Extended
/dev/sda4 19515 25496 48050415 82 Linux swap / Solaris
/dev/sda5 14651 17082 19535008+ 83 Linux [/tmp]
/dev/sda6 17083 19514 19535008+ 83 Linux [/var]

OS saved and restored:
Ubuntu Jaunty Server with stock kernel 2.6.28-11 (amd64), and also the same OS with kernel upgraded to 2.6.30-02063005 (amd64)

Messages while booting OS restored from image containing OS with kernel 2.6.28-11:
...
kinit: No resume image, doing normal boot...
[ ... ] Filesystem "sda2": XFS internal error xlog_valid_rec_header(1) at line 3474 of file /build/buildd/linux-2.6.28/fs/xfs/xfs_log_recover.c. Caller 0xffffffffa00cb1f0
mount: mounting /dev/disk/by_uuid/5391a34b-1fcd-420e-8d06-f08b10be8ca1 on /root failed: Structure needs cleaning
mount: mounting /dev on /root/dev failed: No such file or directory
mount: mounting /sys on /root/sys failed: No such file or directory
mount: mounting /proc on /root/proc failed: No such file or directory
Target filesystem doesn't have /sbin/init
No init found. Try passing init=bootarg.

Messages while booting OS restored from image containing OS with kernel 2.6.30:
...
Checking root file system
fsck 1.41.4 (17-Jan-2009)
/sbin/fsck.xfs: XFS file system. [OK]
[ ... ] XFS internal error XFS_WANT_CORRUPTED_GOTO at line 1629 of file /home/kernel-ppa/mainline/build/fs/xfs/xfs_alloc.c. Caller 0xffffffffa006f386
[ ... ] Filesystem "sda2": Corruption of in-memory data detected. Shutting down filesystem: sda2
[ ... ] Please umount the filesystem, and rectify the problem(s)
/etc/rcS.d/S20checkroot.sh: 412: cannot create /etc/mtab: Structure needs cleaning
init: Unable to execute "/bin/sh" for rc-default: Input/output error
init: rc-default main process (2317) terminated with status 255

Discussion

  • Steven Shiau

    Steven Shiau - 2009-09-12
    • assigned_to: nobody --> thomas_tsai
    • status: open --> open-later
     
  • Steven Shiau

    Steven Shiau - 2009-09-12

    Thanks for this bug report.
    Yes, this bug is confirmed.
    For the time being, please enter expert mode when you save an image, and choose "-q" option to force Clonezilla to use partimage for XFS partition.

    Steven.

     
  • m24578

    m24578 - 2009-09-14

    Thanks! May I suggest that as a temporary measure creating xfs backups by partclone is disabled in Clonezilla, or at least a prominent warning is displayed? As it is right now, the user will happily create a backup, only to learn about the problem _after_ using it to restore the drive, when the data is already corrupted. In my case I was testing a new system, so no real loss occurred, except for wasted time and effort. But this is a rather serious problem which can undermine confidence in Clonezilla in general. Maybe at least a warning on Clonezilla website? (If there is one, it must be very well hidden, I looked for it with no success.)

     
  • Steven Shiau

    Steven Shiau - 2009-09-15

    Thanks. We have sent some warnings to the mailing list, and put a warning in the download page.

    Steven.

     
  • Steven Shiau

    Steven Shiau - 2009-09-21

    m24578,
    This problem should have been fixed in Clonezilla live 1.2.2-30 or 20090919-karmic. Would you please kindly give it a try and confirm that?

    Thanks.

    Steven.

     
  • Steven Shiau

    Steven Shiau - 2009-09-21
    • status: open-later --> open-fixed
     

Log in to post a comment.