Making / Restoring Hard Drive Disk Images

Zygomatic

Weaksauce
Joined
Dec 6, 2006
Messages
81
I've spent the last few days researching online for a solution to my problem and have come up dry so far. I'm trying to make backup hard drive images to be saved to a computer and restored whenever necessary. The drives all run different os's and have weird partitions I'm not even sure what they are. I want to be able to,

- restore the image to a blank hard drive to replace faulty ones as they start acting up
- uses space wisely and doesn't just copy the entire partition if it is only half full (or half empty :p)
- I would prefer to be able to run it from a CLI ubuntu computer
- Free / open source FTW

If some one can help me with this annoying problem, I will be their best friend
 
Not sure if it is exactly what you are looking for, but you could try the clonezilla live cd. If i recall correctly it can back up to - and restore from - Network Attached Storage and handles many different file systems. It also gives you the option of using straight up dd to make an image or higher level tools which will take up less space.

clonezilla.org
 
Thank you for the replies! I have been using the clonezilla live cd with some success, the main problem I am having now is with a windows image. The target and destination drives are both 160gb (I am not transferring from drive to drive, I am saving an image to local disk), but when I try to restore the image to disk it says the destination disk is to small (312500000 sectors vs 312581808 sectors on the target disk). I have tried several different options that I thought might prove effective, to no avail. I tried using options to re-size partitions as necessary, ignore hidden space between MBR and first partition etc. Any help would be greatly appreciated!
 
Greetings

I think that I have a perfect solution for you, although I have never used or tried this method I am led to believe from reading the documentation that it should be a very simple fix.

The solution on a NEW drive would be to set a HPA (host protected area) on the drive shrinking its actual size to a new apparent size slightly smaller

http://en.wikipedia.org/wiki/Host_Protected_Area

E.G. I use Samsung HDD's and they have an Estool utility to diagnose problems with drives and also to test them before you RMA them. One of the options is to "Set maximum addressable area" or suchlike which I presume is to set the HPA, so on say a 1.5 TB hard drive you would reduce the maximum addressable sector 3,000,000,000 number to something like 2,999,999,500 or whatever margin of error your comfortable with without wasting too much space.

This problem also plagues people with ZFS arrays or other raid arrays where they try to replace a failed HDD with another one from a different manufacturer and encounter the same problem as you have described above, in which case I would advise them to trim the first HDD before they create the array by say 1 or 2 GB's and the array will then be created that much smaller across all the disks as the array size can't exceed the size of the now "smaller" first drive and consequently any new replacement disks that are added that are physically smaller will still be perceived as "larger" compared to the original disks.

For an existing drive to do this I would

(1) backup your drive before you do this
(2) repartition the existing drive and shrink the partitions leaving say 5-10 GB free as a large margin of leeway.
(3) create a HPA and reduce the 160 GB HDD to a 159.95 one.
(4) repartition the hard drive back to the new end limit.

Cheers
 
Last edited:
Wow good to know! I ended up using a windows based boot disk and it was able to resize the partition accordingly. But that info will deffinatly come in handy in the future, as we use raids occasionally and I don't think my windows disk can handle linux drives. Thanks!
 
Back
Top