Setup policy for HDDs and SSDs

R

Robin Bignall

I'm talking about something I know little about but have had to research
during the few days my PC became unbootable. Apparently the alignment
policy for HDDs and SSDs is different.
HDD (default) SSD
Partition start track sector
Partition start sector sector
Offset from disk start 1 2048
Disk start offset units track sector

I don't know whether this affects anything other than SSD space usage
and performance because obviously it does not have tracks.
The Windows 7 installer knows about this but Windows disk management
apparently doesn't. So, if you start with an empty system and use the
install disk to create partitions, the correct values will be applied to
SSD or HDD, whether system disk or not.

http://www.speedguide.net/articles/ssd-speed-tweaks-3319
"Notes:
Windows 7 should automatically align SSDs properly if using the install
DVD, but not when partitioning within Windows.
Windows XP will not align partitions."

If you did as I did, install W7 on an HDD, then use disk management to
create a primary and format an empty, new SSD, then copy a system disk
image to the SSD, the SSD will not have the correct alignment.

Whether something like this eventually made my system unbootable I don't
know, but I do know that restoring a whole series of perfectly good
backups to my SSD resulted in unbootable systems every time until I
cleared the SSD, reset the alignment, then partitioned and formatted,
and restored.

The only thing I did different from usual last Wednesday night, before
shutting down and finding next day that it was unbootable, was to use
msconfig to make Win7 the default boot. (You remember that it suddenly
started offering me the choice of W7 or Vista on boot even though I do
not possess the latter.) That appeared to kill Windows boot AND make it
unable to be fixed by Windows system repair. Very scary and nail-biting
experience.
 
P

Paul

Robin said:
I'm talking about something I know little about but have had to research
during the few days my PC became unbootable. Apparently the alignment
policy for HDDs and SSDs is different.
HDD (default) SSD
Partition start track sector
Partition start sector sector
Offset from disk start 1 2048
Disk start offset units track sector

I don't know whether this affects anything other than SSD space usage
and performance because obviously it does not have tracks.
The Windows 7 installer knows about this but Windows disk management
apparently doesn't. So, if you start with an empty system and use the
install disk to create partitions, the correct values will be applied to
SSD or HDD, whether system disk or not.

http://www.speedguide.net/articles/ssd-speed-tweaks-3319
"Notes:
Windows 7 should automatically align SSDs properly if using the install
DVD, but not when partitioning within Windows.
Windows XP will not align partitions."

If you did as I did, install W7 on an HDD, then use disk management to
create a primary and format an empty, new SSD, then copy a system disk
image to the SSD, the SSD will not have the correct alignment.

Whether something like this eventually made my system unbootable I don't
know, but I do know that restoring a whole series of perfectly good
backups to my SSD resulted in unbootable systems every time until I
cleared the SSD, reset the alignment, then partitioned and formatted,
and restored.

The only thing I did different from usual last Wednesday night, before
shutting down and finding next day that it was unbootable, was to use
msconfig to make Win7 the default boot. (You remember that it suddenly
started offering me the choice of W7 or Vista on boot even though I do
not possess the latter.) That appeared to kill Windows boot AND make it
unable to be fixed by Windows system repair. Very scary and nail-biting
experience.
Windows 7 aligns to "megabytes" in order to make the best usage
of the SSD flash block structure. It's to reduce the number of writes
that cross a "boundary" on the SSD, and result in read-modify-write
style operations. It should help the write life of the SSD a tiny bit.

WinXP does have alignment, but it's related to CHS. Even though disk
drives and motherboards have been using LBA for some time, CHS is still
used for backward compatibility. If you take the numbers from a CHS
disk and divide by 63, you'll find lots of the numbers in there are
divisible by 63. And this has to do with the default values for
CHS, when a disk is bigger than CHS can handle. (S=63 or 63 sectors
per fake track)

I have no clue, what this has to do with restoration, except if a
backup utility isn't aware of the difference between HDD and SSD,
CHS and megabytes. A really old piece of software, might not know
about the special handling rules. It might back up data from a
partition with one flavor of alignment, and then screw things up
on a restoration.

You can even run into this in Linux (CHS versus megabyte alignment),
where it's just a confusing mess. And yet, the Linux people
like to pretend they've handled it properly. It makes it so
bad, I end up doing less maintenance in Linux, because of the
mess, and the lack of proper support for alignment
selection in utilities. I would class it as a
"giant math fail", as if the participants were afraid
of "four function math" or something. (I have situations
where I know what alignment *I* want, and the utilities
refuse to offer it.)

Paul
 
R

Robin Bignall

Windows 7 aligns to "megabytes" in order to make the best usage
of the SSD flash block structure. It's to reduce the number of writes
that cross a "boundary" on the SSD, and result in read-modify-write
style operations. It should help the write life of the SSD a tiny bit.
Hence the SSD offset of 2048, which resolves into a megabyte.
WinXP does have alignment, but it's related to CHS. Even though disk
drives and motherboards have been using LBA for some time, CHS is still
used for backward compatibility. If you take the numbers from a CHS
disk and divide by 63, you'll find lots of the numbers in there are
divisible by 63. And this has to do with the default values for
CHS, when a disk is bigger than CHS can handle. (S=63 or 63 sectors
per fake track)

I have no clue, what this has to do with restoration, except if a
backup utility isn't aware of the difference between HDD and SSD,
CHS and megabytes. A really old piece of software, might not know
about the special handling rules. It might back up data from a
partition with one flavor of alignment, and then screw things up
on a restoration.
Even a brand new piece of software can be fooled. I backed up from an
SSD that had been (wrongly) policied and formatted as an HDD. I reckon
my restore program assumed the backup was from an HDD and knew it was
restoring to an SSD and hence created something that wouldn't boot even
though the test for bootability was positive. Luckily the restore has a
Hardware Independent Restore that caters for restoring to different
hardware provided the new hardware drivers are present. That's the one
that finally worked.
You can even run into this in Linux (CHS versus megabyte alignment),
where it's just a confusing mess. And yet, the Linux people
like to pretend they've handled it properly. It makes it so
bad, I end up doing less maintenance in Linux, because of the
mess, and the lack of proper support for alignment
selection in utilities. I would class it as a
"giant math fail", as if the participants were afraid
of "four function math" or something. (I have situations
where I know what alignment *I* want, and the utilities
refuse to offer it.)
Thanks Paul. Interesting topic.
 
C

Char Jackson

Hence the SSD offset of 2048, which resolves into a megabyte.
That's a big megabyte. I've seen some that are half that size.






(I know what you meant. :) )
 
Y

Yousuf Khan

Robin Bignall formulated on Wednesday :
I'm talking about something I know little about but have had to research
during the few days my PC became unbootable. Apparently the alignment
policy for HDDs and SSDs is different.
HDD (default) SSD
Partition start track sector
Partition start sector sector
Offset from disk start 1 2048
Disk start offset units track sector

I don't know whether this affects anything other than SSD space usage
and performance because obviously it does not have tracks.
The Windows 7 installer knows about this but Windows disk management
apparently doesn't. So, if you start with an empty system and use the
install disk to create partitions, the correct values will be applied to
SSD or HDD, whether system disk or not.
Actually no, even the Windows Disk Management knows all about the
alignment issues -- as long as you're using the Windows 7 Disk
Management -- rather than the Windows XP one. Windows XP Disk
Management will create a starting partition offset at the 64KB
boundary, whereas Windows 7 will create one at the 1MB (1024KB)
boundary. You don't have to worry about whether you're doing it with
the OS installer or the its Disk Management utility, they will both
create 1024KB offsets in exactly the same way by default. It does this
same alignment offset whether you're installing to an SSD or an HDD.

However, if you have a disk that was already formatted by Windows XP,
then chances are likely it was aligned to the 64KB boundary. If you
later install a Windows 7 to it, then it won't change that existing
offset, it will continue to use the exact same partition without
complaints. Chances are also likely that if you're installing a new
SSD, that it hasn't been formatted previously, and therefore you will
be creating its partition for the first time using Windows 7. As long
as you are doing that, then you're safe.
http://www.speedguide.net/articles/ssd-speed-tweaks-3319
"Notes:
Windows 7 should automatically align SSDs properly if using the install
DVD, but not when partitioning within Windows.
Windows XP will not align partitions."
This statement is simply wrong. I've created partitions using Win7's
Disk Management, they always start a partition at the 1MB boundary by
default. You would actually have to supply it non-default parameters to
get it to create a partition at any other offset actually. Win XP's
Disk Management starts partitions at 64KB.
If you did as I did, install W7 on an HDD, then use disk management to
create a primary and format an empty, new SSD, then copy a system disk
image to the SSD, the SSD will not have the correct alignment.
That's more a function of the backup/imaging software than Disk
Management's policies. If the image you created was of a partition
aligned to the 64KB boundary, then it'll get restored in exactly the
same way, since it recreates the partition itself too. More modern
imaging programs can be told to change the alignment to whatever you
like.

Yousuf Khan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top