terminate called after throwing an instance of 'CException'

Go there if you encounter an unexpected error when using the softare. For installation problems, use another forum.

Moderator: feffer

Post Reply
XanderFS
Posts: 1
Joined: Mon Nov 19, 2007 4:28 pm

terminate called after throwing an instance of 'CException'

Post by XanderFS » Mon Nov 19, 2007 4:38 pm

Greetings,

I use Partimaged on a Slackware Linux since a few month. I save/restore my images with a boot CD call SystemRescueCD in the last stable version (0.4.1).

My save/restore works correctly on the network.

But i have a problem while the first seconds with a restore at the same time with 2 images or more.

The server crash always in the 5 seconds and i have a report on the client :

Code: Select all

terminate called after throwing an instance of 'CException'
zsh: abord partimage
I have 2 partimaged servers in 2 network.

This is my configure line compilation :
./configure --prefix=/usr/local/partimage --disable-ssl

i start the server with :
/usr/local/partimage/sbin/partimaged --dest=/home/ghost/ --nologin -D

and i use the partimage 0.6.6

Could you help me please ?

PS. I'm sorry for my english, i speak french.

mhayward
Posts: 1
Joined: Wed Feb 20, 2008 1:48 pm

Post by mhayward » Wed Feb 20, 2008 5:42 pm

We are having the same problem. Did you manage to fix this?

SergeyZh
Posts: 1
Joined: Thu Jun 05, 2008 11:27 am

Post by SergeyZh » Thu Jun 05, 2008 11:31 am

I found what caused this.
You should not create images more than 2Gb with GZip compression, because zlib can't uncompress files more than 2Gb (at least on System Rescue CD).

ning120
Posts: 1
Joined: Fri Aug 29, 2008 2:53 am
Location: Edmonton, Canada

Post by ning120 » Fri Aug 29, 2008 3:09 am

This is a bug, the recent 0.6.7 version still have it. The details bug as following:
When you backup a partition using PartImage you can choose to compress the image for smaller size using Gzip or Bzip2, and you allow to specific the image split size. The default size is 2037MB which will not cause the problem, but if you use Gzip and specific a size bigger then 2048MB you likely have this error when trying to restore the image. "terminate called after throwing an instance of 'CException' abord partimage". (I'm not sure Bzip2 >2GB have this bug or not)

Work arounds:
1. do not specific split image size larger than 2GB if you using compression.
2a. if you already did use >2GB compression, then rename all your image files to ###.gz where ### is the 000, 001, ...
2b. then use "gzip -d imagefilename.###.gz" to uncompress all your images(where ### are 000, 001, ....). Now they will be .### again
2c. run partimage as normal and your images will now be just like created with no compression option.

:) have a wonderful day, and hopefully Partimage will soon improve it's features and UI to be more user friendly

Baodad
Posts: 1
Joined: Sat May 01, 2010 7:07 pm

This saved me!

Post by Baodad » Sat May 01, 2010 7:09 pm

Thanks for posting this! I had the same problem when I tried to restore a single compressed image that was over 5 Gb. When I uncompressed it it worked just fine.

Lcstyle
Posts: 6
Joined: Wed Feb 29, 2012 7:32 am

thanks!

Post by Lcstyle » Wed Feb 29, 2012 7:34 am

Thanks I was also getting this exception on 200gb image file that was compressed using gzip. I am currently decompressing and will update when it's done.

Lcstyle
Posts: 6
Joined: Wed Feb 29, 2012 7:32 am

Not working

Post by Lcstyle » Wed Feb 29, 2012 2:59 pm

Unfortunately it won't restore from the network partimaged server.

Is there a way to split the existing uncompressed 200gb image into smaller chunks to get around the crash?

TIA

feffer
Posts: 126
Joined: Tue Mar 17, 2009 4:30 am

Post by feffer » Wed Feb 29, 2012 4:34 pm

You need to post some more information. What type of OS and filesystem? IE Windows 7 and NTFS? Ubuntu linux and EXT4 etc. Did partimage originally create your 200gb image w/o error?

Lcstyle
Posts: 6
Joined: Wed Feb 29, 2012 7:32 am

Post by Lcstyle » Wed Feb 29, 2012 5:08 pm

feffer wrote:You need to post some more information. What type of OS and filesystem? IE Windows 7 and NTFS? Ubuntu linux and EXT4 etc. Did partimage originally create your 200gb image w/o error?
Yes after decompressing the image and attempting to run the following command:

wget -q -O - ftp://192.168.1.115//home/iscsi_media/parted/sda2 --user root --password password |partimage -c restore /dev/sda stdin

I now get an error from partimage saying the target is too small.
Image

Is there any way to maybe mount the image file on another linux box, change or resize the FS (or partition size) down to a smaller size and then restore? Or is there a way to bypass this check from partimage?

The problem is my target partition is never going to be the size as the original backup partition size because I am restoring from a single drive to a RAID 1 Mirror partition. The raid controller writes information to the beginning of the disk reducing the amount of total useable space by a small fraction, I've calculated that the original size was 1 000 097 185 792 bytes = 953 767 megabytes, partimage reports that my partition size now is 999 879 081 984 bytes = 953 559 megabytes. So it is missing about 767 - 559 = 208 MB due to the raid configuration.

I am considering removing the raid, exporting the original drive as JBOD, restoring the original image, then once that's done, resizing the partition size to a smaller size, backing it up again (using clonezilla this time [sorry partimage you are too shaky to be trustworthy]), then configuring the raid 1 mirror again, and then finally restoring.

Any better ideas?
Last edited by Lcstyle on Thu Mar 01, 2012 5:07 am, edited 1 time in total.

feffer
Posts: 126
Joined: Tue Mar 17, 2009 4:30 am

Post by feffer » Wed Feb 29, 2012 9:16 pm

I assume you've read the partimage user manual? You are stretching the potential of the app imho. If this is your only backup or method to get this data, then I suggest you restore to a single hdd that is bigger by a good margin than the original partition that you saved. Then use rsync or similar to copy the data to your final location...RAID or whatever.

Development on partimage has been stopped for a long time now. That said, it still works well within the limits explained in the manual. RescueCD still uses it for some instances and I believe Clonezilla at least uses some of the code. I think we agree that your situation requires something more.

Lcstyle
Posts: 6
Joined: Wed Feb 29, 2012 7:32 am

Post by Lcstyle » Thu Mar 01, 2012 5:06 am

The best way to do this is to combine the instructions found in the following two links.
Reference Link 1 (make sure you read the comments on this page as step 3 has been updated) with the instructions found here Reference Link 2.

Step by step:
1. Create a Linux Disk Image file as instructed by link #1 large enough that partimage will allow you to restore your partimage backup to it.
2. Restore your partimage file to the new linux disk image file created by step 1.
3. Follow the instructions in link #2, create a new Linux Disk Image to contain the partition that is the final target size you'd like.
4. Copy all the data from the mounted partimage linux disk device partition created in step 2 to the new filesystem on the partition created in step 3.
5. Use partimage to make a backup of the data on the disk partition created in step 4, so that you end up with a partimage back up of the partition that you can restore back to your disk.[/list]

I posted the solution here: how-do-i-restore-a-partimage-image-to-a-smaller-drive and the original problem.

Post Reply