Cloning a HD to a smaller SSD (v. partition alignment)

Stereodude

Not really a
Joined
Jan 22, 2002
Messages
10,865
Location
Michigan
I ended up with a pile of posts in my other thread about this so I figured I would consolidate them here.

I've been trying to clone a 320GB spinning HD (with Windows 7 installed on it) to a 120GB Intel SSD since last night. There is/was a large empty partition on the 320GB I was okay with shrinking / omitting. Acronis TI Home 2011 and Acronis TI Home V11 both were unable to do so. Neither can restore an entire disk image in one shot and omit one of the partitions in the process. With both versions of Acronis it is possible to restore partitions one at a time from an image (thus excluding one) but this process destroys the alignment of the source partitions.

Ultimately, I thought I had protected against the HD to SSD problem when I installed Windows 7 on this 320GB HD originally. I installed it into a 30GB partition and left a large empty partition at the end and Windows 7 makes aligned partitions (1MiB aligned partitions to be specific). I later thought that by deleting the large empty partition and creating a new whole disk image and restoring it to the new SSD I would able to keep the remaining 3 partitions intact with some unused empty space at the end of the drive. Unfortunately, that's not how it works. With Acronis if the new drive is larger than the used space on the drive that was imaged, Acronis insists on expanding the partitions to fill the new drive instead of leaving empty space at the end.

My next idea was to create an aligned empty partition after the 3 partitions on the 320GB HD I want to keep that would bring the utilization of the 320GB drive to the exact size of the 120GB Intel SSD. Then I hoped to make an image the entire 320GB drive and have the restored image fit exactly on the Intel SSD and maintain it's alignment.

Unfortunately, that was only a pipe dream. I adjust the partitions on the 320GB HD so it had 120030494720 bytes used by partitions. This was equal to the largest possible usage of the 120GB Intel SSD with 1MiB aligned partitions. The Intel 120GB SSD has a 120031511040 byte capacity. A direct duplication would leave exactly 992.5kB unused on the Intel 120GB SSD which would be perfect! However, despite going to all this effort Acronis still wouldn't restore the image to the drive and leave the partition sizes and placement alone.

There are 4 partitions on the 320GB drive:
  • Partition 0 - 4166MB
  • Partition 1 - 100MB
  • Partition 2 - 30729MB
  • Partition 3 - 79474MB (empty filler)
Acronis V11 wanted to enlarge #0 slightly, shrink #1 slightly, couldn't tell on #2 (it reports before and after size in GB and the # is the same), and grow #3 slightly. Unacceptable!

Then I decided to do a "clone" instead of creating an image instead of writing the image back to see if this would change the results. This yielded the exact same results as above.

Next, I tried out Miray HDClone with brags about having 4k sector alignment. Even after telling it to make no changes to the partitions it still altered the partitions on the Intel 120GB SSD. Like Acronis it left the starting alignment of the first partition alone, and then proceeded to alter the size of the first partition and then the starting locations and sizes of the subsequent partitions slightly so they no longer fell on 1MiB boundaries and were not aligned.

Lastly, I used Miray HDClone to do a 1:1 "RAW" sector for sector copy equal to the number of sectors on the Intel 120GB SSD. This finally worked! It took a lot longer to clone, but the SSD has the exact same aligned structure as the source drive. Now the drive is installed in my laptop and works!

Ultimately, both versions of Acronis (V11 & 2011) will hold partition alignment for the start of the first partition of on a drive, but will alter the ending alignment and start location (alignment) & size of subsequent partitions for multi-partition drive. Miray HDClone does the same thing unless you do a 1:1 "RAW" sector read instead of a "smart" clone.
 
Last edited by a moderator:

mubs

Storage? I am Storage!
Joined
Nov 22, 2002
Messages
4,908
Location
Somewhere in time.
Damn, that sucks. In the old days, DriveImage was pretty flexible and allowed you to do all kinds of things without screwing it up. Too bad stupid Symantec bought it and PartitionMagic from PowerQuest and killed both products. I wish the guys that founded Powerquest come back now since there seem to be no products that work as faultlessly as theirs used to.
 

Howell

Storage? I am Storage!
Joined
Feb 24, 2003
Messages
4,740
Location
Chattanooga, TN
Well, that sucks. What about pre-creating partitions to take up all of the destination disk space and then restoring each partition individually into the gap you create by deleting a partition? You should have control over placement with no room to expand.

I admit I have not read up on the point or process of alignment.
 

Stereodude

Not really a
Joined
Jan 22, 2002
Messages
10,865
Location
Michigan
Well, that sucks. What about pre-creating partitions to take up all of the destination disk space and then restoring each partition individually into the gap you create by deleting a partition? You should have control over placement with no room to expand.

I admit I have not read up on the point or process of alignment.
That would only work if the programs would allow for alignment of their partitions onto 1MiB boundaries. Based on what I found they align partitions they create to cylinder boundaries, so even leaving a "hole" they wouldn't utilize it in the same / correct way. It would either leave more or less space between the new partition and the existing ones to achieve cylinder alignment.

As an aside, I think Clonezilla might have worked based on what I read about it, but once I finally got what I want I didn't bother to try another tool. I will probably try using Clonezilla to clone to another unused HD (or SSD) just to satisfy my curiosity. This matters since if you're backing up a SSD with more than one partition with one of these tools, you'll ruin the alignment if you have to restore your data back to it (unless you do a 1:1 raw / sector) clone.
 

Stereodude

Not really a
Joined
Jan 22, 2002
Messages
10,865
Location
Michigan
I should also point out that by default Windows 7 does not install itself to the first partition of a blank unpartitioned HD. It installs to the 2nd partition after creating a 100MB System Reserved partition that has all the boot stuff in it. So, the inability of the disc cloning programs to restore / leave alone the alignment of anything but the start of the first partition is not a minor fringe problem.
 

Stereodude

Not really a
Joined
Jan 22, 2002
Messages
10,865
Location
Michigan
Ok, well I decided to give Clonezilla a shot just now... Leave it to the Linux guys to make a free tool that does what the paid programs can't. :thumbright:

Clonezilla made an exact replica without resorting to a 1:1 raw sector copy. You tell it to clone a drive to another drive without making changes to the partitions and, what do you know?, it actually does it. I'm kind of surprised, but deep down I know I probably shouldn't be.

And, in case anyone is skeptical, here's the partition information, and yes MS's Diskpar.exe tool can't spell information. :rofl:

Source Drive:
---- Drive 3 Geometry Infomation ----
Cylinders = 38913
TracksPerCylinder = 255
SectorsPerTrack = 63
BytesPerSector = 512
DiskSize = 320070320640 (Bytes) = 305242 (MB)

---- Drive Partition 0 Infomation ----
StatringOffset = 1048576
PartitionLength = 4368367616
HiddenSectors = 2048
PartitionNumber = 1
PartitionType = 7
---- Drive Partition 1 Infomation ----
StatringOffset = 4369416192
PartitionLength = 104857600
HiddenSectors = 8534016
PartitionNumber = 2
PartitionType = 7
---- Drive Partition 2 Infomation ----
StatringOffset = 4474273792
PartitionLength = 32221691904
HiddenSectors = 8738816
PartitionNumber = 3
PartitionType = 7
---- Drive Partition 4 Infomation ----
StatringOffset = 36697014272
PartitionLength = 83333480448
HiddenSectors = 2048
PartitionNumber = 4
PartitionType = 7

End of partition information. Total existing partitions: 4
Destination Drive:
---- Drive 4 Geometry Infomation ----
Cylinders = 121601
TracksPerCylinder = 255
SectorsPerTrack = 63
BytesPerSector = 512
DiskSize = 1000202273280 (Bytes) = 953867 (MB)

---- Drive Partition 0 Infomation ----
StatringOffset = 1048576
PartitionLength = 4368367616
HiddenSectors = 2048
PartitionNumber = 1
PartitionType = 7
---- Drive Partition 1 Infomation ----
StatringOffset = 4369416192
PartitionLength = 104857600
HiddenSectors = 8534016
PartitionNumber = 2
PartitionType = 7
---- Drive Partition 2 Infomation ----
StatringOffset = 4474273792
PartitionLength = 32221691904
HiddenSectors = 8738816
PartitionNumber = 3
PartitionType = 7
---- Drive Partition 4 Infomation ----
StatringOffset = 36697014272
PartitionLength = 83333480448
HiddenSectors = 2048
PartitionNumber = 4
PartitionType = 7

End of partition information. Total existing partitions: 4
 

sechs

Storage? I am Storage!
Joined
Feb 1, 2003
Messages
4,709
Location
Left Coast
Damn, that sucks. In the old days, DriveImage was pretty flexible and allowed you to do all kinds of things without screwing it up. Too bad stupid Symantec bought it and PartitionMagic from PowerQuest and killed both products.
The consumer version of Ghost is now based on DriveImage, which isn't as good as the real Ghost, which is now only sold in the enterprise version.
 

mubs

Storage? I am Storage!
Joined
Nov 22, 2002
Messages
4,908
Location
Somewhere in time.
That's because Symantec buggered it. It was pretty good while PowerQuest was releasing it. I bought the first version released by Symantec; one release was enough for them to work their magic on it.
 

LunarMist

I can't believe I'm a Fixture
Joined
Feb 1, 2003
Messages
16,958
Location
USA
Tha last version of DI (v.7) was awful and that was before Symantec bought Powerquest. Backups had to be created by the installed software and restores had to be run from the CD. The CD could not create backups. :mad: Loading the CD took several minutes, because it had to read a Windows PE which was hundreds of MB, and that was before the user navigated to the PQI files to start the restoration. Users like me were SOL if they used a small notebook PC without optical drive removed since DI had no USB support at that time. It was no wonder that many clung to DI 2002 (v.6) for so long and then eventually moved to TI.
 

mubs

Storage? I am Storage!
Joined
Nov 22, 2002
Messages
4,908
Location
Somewhere in time.
I had (have) many versions of DI, and I know the last few were bad, just don't remember all the details.

I've been using Terbyte Unlimited's Image for Dos and have been very happy with it. Never tried to clone a HDD with it, though (not even sure if it can).
 

Stereodude

Not really a
Joined
Jan 22, 2002
Messages
10,865
Location
Michigan
I did some additional tests with Clonezilla today.

I can confirm that a Disk -> Image followed by a Image -> disk also does not mess up partition alignment.

I can also confirm that Partition -> Image followed by a Image -> Partition also does not mess up alignment.

One thing important to note is that Clonezilla will not let you restore a Partition Image to a blank disk or an unpartitioned portion of a disk.

It will only restore a Disk Image to a blank disk. Basically, it will not create new partitions when working with Partition Images. So, you need to create a partition with Gparted (which will make MiB aligned partitions as the default behavior) before you can restore a Partition Image to it.
 

blakerwry

Storage? I am Storage!
Joined
Oct 12, 2002
Messages
4,203
Location
Kansas City, USA
Website
justblake.com
+1 for clonezilla. I haven't utilized it on SSDs, but I have used it for years and it has worked on everything I've thrown at it - from 440BX based pII's with IDE disks, ATi Chipset P4's using SATA disks, intel c2duos w/ SATA, to Dell servers running RAID arrays on PERC SCSI or SAS controllers.

I mainly use it for disk->image and image->disk clones over the network. I typically resort to gparted if I want to play with anything else file system related (usually resizing) - it can align partitions, but may whine if you break from the traditional cylinder boundaries.
 
Top