0.6.15 partition sizes after restore not the same as source

Post here if you found a bug or something really not expected in the program
Post Reply
nim108
Posts: 2
Joined: Thu Nov 15, 2012 4:58 pm

0.6.15 partition sizes after restore not the same as source

Post by nim108 » Thu Nov 15, 2012 5:20 pm

We have an automated recovery procedure set up using TinyCore and fsarchiver (using the static 0.6.15 binary). The disk structure is the following:

100 MB partition 1 (ext2)
100 MB partition 2 (ntfs)
10 GB partition 3 (ntfs)
~ EXTENDED partition ~
10 GB partition 4 (ntfs)
Rest of the drive is partition 5 (ntfs)
~ NO UNALLOCATED SPACE AT THE END OF THE DRIVE ~

These sizes are EXACT (at least according to gparted).

We create an fsarchiver image using savefs and specify all partitions in the backup. That's fine. Now when we go to recover the full disk, we first recreate the partition table using fdisk. Sizes of each partition are verified again and they are exact, with no unallocated space at the end of the drive. When we now restore this image using fsarchiver restfs (we restore each partition by specifying the id), everything works just fine but each of the partition sizes are now slightly altered. For example, the first two partitions are now like ~1.25 MB larger (so 101.25 MB) and the others have also changed and there is now ~5 MB unallocated space at the end of the drive. This is annoying because we want the user to have the same disk configuration after a full disk restore. Any ideas? Am I missing something?

Lazy_Kent
Posts: 53
Joined: Sun Nov 15, 2009 1:08 pm
Location: Moscow, Russia

Re: 0.6.15 partition sizes after restore not the same as sou

Post by Lazy_Kent » Thu Nov 15, 2012 7:40 pm

As far as I know, fsarchiver doesn't recreate partitions. It just restores files to selected partitions regardless of its' size.

I'd suggest to use sfdisk to recreate a partition table.

nim108
Posts: 2
Joined: Thu Nov 15, 2012 4:58 pm

Re: 0.6.15 partition sizes after restore not the same as sou

Post by nim108 » Thu Nov 15, 2012 11:08 pm

Kent, I actually was considering this, but since the partition sizes were exactly what I expected after fdisk'ing, the problem clearly lies with fsarchiver. sfdisk will simply restore whatever partition table I point to (which would be one created using fdisk), so it would do the same thing. It is after fsarchiver restfs process that the partition sizes get altered. I believe fsarchiver does recreate partitions, because I am pretty sure it runs mkfs on each of the partitions that is being restored. Even so, it should not alter the sizes of the partitions (because then you end up with unallocated space at the end of the drive like I'm currently seeing).

Post Reply