Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

Partition Boundary Alignment in 4096-byte physical sector drives

- - - - -

  • Please log in to reply
27 replies to this topic

#1
DiracDeBroglie

DiracDeBroglie

    Member

  • Member
  • PipPip
  • 104 posts
  • Joined 07-December 11
  • OS:Windows 7 x64
  • Country: Country Flag
Hi,

Got a external USB3.0 2TB drive with 4K physical sectors. It does seem to emulate 512-byte logical sectors though, so it is 512e sector drive. However, there might be a problem with the partition boundary alignment. I would like to partition the drive using the Disk Management tool in Windows 7.

I just want to be sure: Does Windows 7 Home Premium align any partition (primary, extended, logical) with the beginning of any 4K physical sector?? Or is there a risk that Win7 misaligns the partitions, resulting in a reduced performance?

In case Disk Management in Win7 would align the newly created partitions correctly --- meaning at the beginning of any 4K physical sector --- then how can I verify that? Are there any Partition Alignment utilities or tools for that to check?

Johan


How to remove advertisement from MSFN

#2
tain

tain

    Cyber Ops

  • Super Moderator
  • 3,686 posts
  • Joined 24-September 05
  • OS:none specified
  • Country: Country Flag

Donator

Supposedly Win7 is smart enough to properly align SSDs.

#3
jaclaz

jaclaz

    The Finder

  • Developer
  • 15,017 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag

I just want to be sure: Does Windows 7 Home Premium align any partition (primary, extended, logical) with the beginning of any 4K physical sector?? Or is there a risk that Win7 misaligns the partitions, resulting in a reduced performance?

By default Windows 7 will align the start of the partition to a 4 K boundary.
Namely first partition will start at CHS 0/32/33 or LBA 2048.
(and all following partitions will all be aligned as well)

Having a partition aligned as above makes sense if the partition is NTFS formatted.

If you need/want to use a FAT filesystem you will need to align the fiilesystem clusters (additionally):
http://www.msfn.org/...n-its-clusters/

To check the alignment you just inspect the MBR (and the eventual EPBR(s)) and verify that the "Sectors Before" or "LBA start Address" can be divided by 8.
A suitable tool could be PTEDIT32 or any similar partition table editor/viewer.
Maybe better if you use partinfo (so that there is no risk to edit a field by mistake):
ftp://ftp.symantec.com/public/english_us_canada/tools/pq/utilities/PartInNT.zip
I don't know if it runs on 7, but it should.

If -by any chance - you are going to use Logical Volumes inside Extended (partitioned/created under 7) AND use on the disk the XP disk manager, be VERY aware :ph34r: of the possible issues:
http://reboot.pro/9897/

jaclaz

Edited by jaclaz, 07 December 2011 - 10:11 AM.


#4
tain

tain

    Cyber Ops

  • Super Moderator
  • 3,686 posts
  • Joined 24-September 05
  • OS:none specified
  • Country: Country Flag

Donator

Nice post! I've looked into this a number of times but enough good sources gave me the gist of "win7 alignment of SSDs works" that I hadn't bothered to dig in and check it myself. This post will come in handy next time I install :)

#5
jaclaz

jaclaz

    The Finder

  • Developer
  • 15,017 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag

Nice post! I've looked into this a number of times but enough good sources gave me the gist of "win7 alignment of SSDs works" that I hadn't bothered to dig in and check it myself. This post will come in handy next time I install :)


Yep :), additionally, the issue with SSD is not exactly the "same" one as with HD's.

The use of a TRIM enabled OS (like Windows 7 is) AND enable it may make a BIG difference (after some time):
http://reboot.pro/9615/
Direct link to the article:
http://www.anandtech...aspx?i=3531&p=1

More:
http://blogs.msdn.co...drives-and.aspx

And how to make sure TRIM is running:
http://blog.corsair.com/?p=3468
http://lifehacker.co...ve-in-windows-7

jaclaz

#6
DiracDeBroglie

DiracDeBroglie

    Member

  • Member
  • PipPip
  • 104 posts
  • Joined 07-December 11
  • OS:Windows 7 x64
  • Country: Country Flag
>>By default Windows 7 will align the start of the partition to a 4 K boundary.

Q: Do you have any genuine Microsoft documentation of that? Some KB document, clearly and explicitly mentioning that Win7 by default aligns partitions to a 4K boundary. I need to know for sure before I continue working with the 4K HD. I cannot aford to take any risk as the 4K HD of mine will be a backup drive filling up quickly. Any problems lateron will cause me lots of extra work.

>>Namely first partition will start at CHS 0/33/32 or LBA 2048. (and all following partitions will all be aligned as well)

Q: Cilinder/Head/Sector but what sectors are those? Is the number 32 related to 4K or 512e sectors? As for the Logical Block Addressing, what is the block size? Is that the block size defined during formatting of the external HD, that is, 4kB, 8kB, ... 64kB? In case of large block size, one could lose a significant amount of disk space, in the order of many MB!?

>>Having a partition aligned as above makes sense if the partition is NTFS formatted.

Q: How come? Are you insinuating that for other formats (fat32, exfat,....) partition alignment would make less sense?

Thanks, Johan

#7
jaclaz

jaclaz

    The Finder

  • Developer
  • 15,017 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag

>>By default Windows 7 will align the start of the partition to a 4 K boundary.

Q: Do you have any genuine Microsoft documentation of that? Some KB document, clearly and explicitly mentioning that Win7 by default aligns partitions to a 4K boundary. I need to know for sure before I continue working with the 4K HD. I cannot aford to take any risk as the 4K HD of mine will be a backup drive filling up quickly. Any problems lateron will cause me lots of extra work.

You mean that you do not trust my word for it? :w00t:
BTW I provided a link, that - had you actually checked it - may have lead you to here (from the mouth of the wolf, but you will need to "read between the lines"):
http://support.micro...kb/931760/en-us
Vista :ph34r: and 7 have a Registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CURRENTCONTROLSET\SERVICES\VDS\ALIGNMENT
which you can use to override default partition alignment (which is respecting the 4K multiple).
Additional (JFYI):
http://www.techpower...ad.php?t=107126

>>Namely first partition will start at CHS 0/33/32 or LBA 2048. (and all following partitions will all be aligned as well)

Q: Cilinder/Head/Sector but what sectors are those? Is the number 32 related to 4K or 512e sectors? As for the Logical Block Addressing, what is the block size? Is that the block size defined during formatting of the external HD, that is, 4kB, 8kB, ... 64kB? In case of large block size, one could lose a significant amount of disk space, in the order of many MB!?

The MBR will use 512 bytes sized sectors.
Block (or sector) size has nothing to do with cluster size.

>>Having a partition aligned as above makes sense if the partition is NTFS formatted.

Q: How come? Are you insinuating that for other formats (fat32, exfat,....) partition alignment would make less sense?

I am NOT "insinuating" anything, I am stating (rather flatly ;))that the internal structrures of a FAT (12/16/32 and presumably 64) may (actually will in, say, 90% of cases) produce the effect that the filesystem clusters NOT to be aligned properly (and provided a link that explains in detail the issue).

jaclaz

#8
DiracDeBroglie

DiracDeBroglie

    Member

  • Member
  • PipPip
  • 104 posts
  • Joined 07-December 11
  • OS:Windows 7 x64
  • Country: Country Flag
Jaclaz,
I just ran the PartitionInfo utility from Symantec. The 4k-byte sector 2TB drive that I have is from Seagate and came formatted as FAT32X. According to PartitionInfo the start sector is 2048, so can be divided by 8; also the number of hidden sectors is 2048. So that data looks consistent but what one would expect taking into account the format is FAT32X. However, in the header of PartitionInfo there are several error messages saying that the partition didn't begin on Head Boundary, ended after end of disk, .... Note all the testing is done on WinXP.
So, I'll reformat the 4k-byte sector drive asap with Win7.
johan

#9
jaclaz

jaclaz

    The Finder

  • Developer
  • 15,017 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag

Jaclaz,
I just ran the PartitionInfo utility from Symantec. The 4k-byte sector 2TB drive that I have is from Seagate and came formatted as FAT32X. According to PartitionInfo the start sector is 2048, so can be divided by 8; also the number of hidden sectors is 2048. So that data looks consistent but what one would expect taking into account the format is FAT32X. However, in the header of PartitionInfo there are several error messages saying that the partition didn't begin on Head Boundary, ended after end of disk, .... Note all the testing is done on WinXP.

Sure :), partition info was developed WHEN the "standard" was n/255/63, it is normal that it tells you that the current partitioning scheme does NOT respect cylynder (255/63) or Head (63) alignment.

So, I'll reformat the 4k-byte sector drive asap with Win7.


The partition is ALREADY aligned.
The (FAT32) filesystem clusters most probably WON'T be, and if you re-format (still FAT32) it under windows 7 NOTHING will change, as I tried to explain you.
If you re-format (no matter if under XP or 7) as NTFS, filesystem clusters will be (inherently) aligned.

Further explanation:
  • due to how NTFS is made, data clusters are alway aligned on 4K multiples from the beginning of the partition, hence, IF the partition is aligned, so will be the filesystem clusters (the bootsector, i.e. reserved sectors is a multiple of 4Kb, being 16 x 512 bytes long and all other structures are actually "files").
  • on FAT there are a number of data structures (bootsector/reserved sectors, FAT tables and - on FAT12/16 only - root directories) that are placed BEFORE the actual data clusters and that may not result as being a multiple of 4 Kb, hence, even if the beginning of the parition is aligned, filesystem clusters may not.
This is the essence of the referenced thread.

I hope now it is more clear. :unsure:

jaclaz

Edited by jaclaz, 07 December 2011 - 10:03 AM.


#10
DiracDeBroglie

DiracDeBroglie

    Member

  • Member
  • PipPip
  • 104 posts
  • Joined 07-December 11
  • OS:Windows 7 x64
  • Country: Country Flag
Jaclaz,
Yes, now it has become clear to me why alignment of partitions is not enough when dealing with FAT (and maybe other file systems) . Fortunately, I'll be using NTFS on the drive. You have been a great help, without your info I would still be dangling on Google and waisting many more manhours. It's still not over for me; I still need to re-partition the drive to NTFS under Win7, and perform analysis on the drive to see if all is ok. I'll be back on this thread maybe later. I still need to install a SSD next coming few weeks or so. Also that may still raise some performance issues, I'll see.
johan

#11
jaclaz

jaclaz

    The Finder

  • Developer
  • 15,017 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag

Yes, now it has become clear to me why alignment of partitions is not enough when dealing with FAT (and maybe other file systems) . Fortunately, I'll be using NTFS on the drive. You have been a great help, without your info I would still be dangling on Google and waisting many more manhours.

Good. :)

jaclaz

#12
DiracDeBroglie

DiracDeBroglie

    Member

  • Member
  • PipPip
  • 104 posts
  • Joined 07-December 11
  • OS:Windows 7 x64
  • Country: Country Flag
Jaclaz,

Just had a look at the key
HKEY_LOCAL_MACHINE\SYSTEM\CURRENTCONTROLSET\SERVICES\VDS\ALIGNMENT
that you mentioned earlier using RegEdit. Indeed there are the keys:
Between4_8GB
Between8_32GB
GreaterThan32GB
LessThan4GB
and presumably they all have an offset of 1048576 (bytes), except for LessThan4GB, which has an offset of 65536 bytes. Then 1048576 / 4096 = 256, and 65536 / 4096 = 16. So it looks that any 512 or 4096-byte sector drive has its partitions automatically aligned in Win7. Is that a correct conclusion?

I just wonder why the offset is so large? 256 times 4Kib offset is a lot. What could be the reason for that?

And, are those gaps of 1048576 (bytes) also present between the partitions?

Got also a question about the Master Boot Record. Usually the MBR is 512 bytes, but how long is the MBR in a 4KiB sector drive? Could be interesting to know because maybe I'll use my 2TB drive as an internal boot drive lateron.

johan

Edited by DiracDeBroglie, 07 December 2011 - 03:16 PM.


#13
jaclaz

jaclaz

    The Finder

  • Developer
  • 15,017 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag

Jaclaz,

Just had a look at the key
HKEY_LOCAL_MACHINE\SYSTEM\CURRENTCONTROLSET\SERVICES\VDS\ALIGNMENT
that you mentioned earlier using RegEdit. Indeed there are the keys:
Between4_8GB
Between8_32GB
GreaterThan32GB
LessThan4GB
and presumably they all have an offset of 1048576 (bytes), except for LessThan4GB, which has an offset of 65536 bytes. Then 1048576 / 4096 = 256, and 65536 / 4096 = 16. So it looks that any 512 or 4096-byte sector drive has its partitions automatically aligned in Win7. Is that a correct conclusion?

Yep :).


I just wonder why the offset is so large? 256 times 4Kib offset is a lot. What could be the reason for that?

That's a MS decision :ph34r: , if you check the "alignment jumper" that there is on some 4 Kb sector HD's (I seem to remember Seagate), you will see that they add a "fake" sector so that older OS (XP, that has hardcoded 63 as "boundary") will partition disk starting from sector 64.
Since this has been made by the actual HD manufacturer, it means that 64 is "good enough".

And, are those gaps of 1048576 (bytes) also present between the partitions?

Yes/No.
There is NOT any gap between two primaries. (the previous is already aligned at start and has a size that is a 4 Kb multiple, so also it's end is aligned, hence the following is already aligned).
There is no "gap" between a primary and an Extended (for the same reason) but there is a gap inside the extended until the beginning of the first Logical Volume and between any two Logical Volumes.
These gaps were 63 sectors in the "previous standard" and are probably (but I have never had an occasion to check) 2048 in the "new standard". :unsure:

Got also a question about the Master Boot Record. Usually the MBR is 512 bytes, but how long is the MBR in a 4KiB sector drive? Could be interesting to know because maybe I'll use my 2TB drive as an internal boot drive lateron.

This is a common doubt.
Traditionally we have seen (because they were like that ;)) that the MBR is first sector of a hard disk.
It is NOT like that (it is :), but we have to slightly change the definition)
The MBR is the first 512 bytes of the first sector of a hard disk.
When we say that the "magic Bytes" 55AA are the last two bytes of first sector, we commit a mistake they are the last two bytes of the MBR, or even more properly the bytes at offset 510 and 511 of the first sector of a hard disk.
The above, that now may seem obvious, comes (extrapolated by yours truly :w00t: porting it from "bootsector" to "MBR") UNexpectedly by a seemingly not connected MS doc , the FAT32 specification:
http://download.micr...c/fatgen103.doc

Though evidently written by a snotty MS kid that thinks to be much smarter than his intended audience :realmad: , and provides among senceful info also a few wrong or misleading info, it contains this:

There is one other important note about Sector 0 of a FAT volume. If we consider the contents of the sector as a byte array, it must be true that sector[510] equals 0x55, and sector[511] equals 0xAA.

NOTE: Many FAT documents mistakenly say that this 0xAA55 signature occupies the “last 2 bytes of the boot sector”. This statement is correct if — and only if — BPB_BytsPerSec is 512. If BPB_BytsPerSec is greater than 512, the offsets of these signature bytes do not change (although it is perfectly OK for the last two bytes at the end of the boot sector to also contain this signature).


jaclaz

#14
DiracDeBroglie

DiracDeBroglie

    Member

  • Member
  • PipPip
  • 104 posts
  • Joined 07-December 11
  • OS:Windows 7 x64
  • Country: Country Flag
Hi, Jaclaz,


I just wonder why the offset is so large? 256 times 4Kib offset is a lot. What could be the reason for that?

That's a MS decision :ph34r: , if you check the "alignment jumper" that there is on some 4 Kb sector HD's (I seem to remember Seagate), you will see that they add a "fake" sector so that older OS (XP, that has hardcoded 63 as "boundary") will partition disk starting from sector 64.
Since this has been made by the actual HD manufacturer, it means that 64 is "good enough".


64 x 512 = 32768 bytes (=8 times 4K sectors) or
64 x 4096 = 2642144 bytes, which is 1/4 of the offset in the Win7 registry key being 1048576 (=256 times 4K sectors).

Problem is that it is not quite clear to me if one means a sector of 512 bytes or 4096 bytes. Fortunately, in the Win7 key they use simply bytes as offset, which is not susceptible to interpretation.


And, are those gaps of 1048576 (bytes) also present between the partitions?

Yes/No.
There is NOT any gap between two primaries. (the previous is already aligned at start and has a size that is a 4 Kb multiple, so also it's end is aligned, hence the following is already aligned).
There is no "gap" between a primary and an Extended (for the same reason) but there is a gap inside the extended until the beginning of the first Logical Volume and between any two Logical Volumes.
These gaps were 63 sectors in the "previous standard" and are probably (but I have never had an occasion to check) 2048 in the "new standard". :unsure:


Is that 2048 times 512bytes, or 2048 x 4K? The first results in 2048 x 512 = 1048576 bytes, which is the same value in the registry key mentioned earlier. So 256 times a 4K sector between the logical volumes: that is a lot!


Got also a question about the Master Boot Record. Usually the MBR is 512 bytes, but how long is the MBR in a 4KiB sector drive? Could be interesting to know because maybe I'll use my 2TB drive as an internal boot drive lateron.

This is a common doubt.
Traditionally we have seen (because they were like that ;)) that the MBR is first sector of a hard disk.
It is NOT like that (it is :), but we have to slightly change the definition)
The MBR is the first 512 bytes of the first sector of a hard disk.


So, the first 512 bytes of the first 4K sector are used as MBR. A petty that the last 7 short (512bytes) sectors in the first 4K sectors are not used. That extra space could have been used for larger bootloaders, for instance, in case one wants to boot multiple OSs. Also the remaining 255 4K sectors between the first 4K boot sector and the beginning of the first partition are just sitting there. What is that space used for? For extra and larger bootloaders, maybe?

johan

When we say that the "magic Bytes" 55AA are the last two bytes of first sector, we commit a mistake they are the last two bytes of the MBR, or even more properly the bytes at offset 510 and 511 of the first sector of a hard disk.
The above, that now may seem obvious, comes (extrapolated by yours truly :w00t: porting it from "bootsector" to "MBR") UNexpectedly by a seemingly not connected MS doc , the FAT32 specification:
http://download.micr...c/fatgen103.doc

Though evidently written by a snotty MS kid that thinks to be much smarter than his intended audience :realmad: , and provides among senceful info also a few wrong or misleading info, it contains this:

There is one other important note about Sector 0 of a FAT volume. If we consider the contents of the sector as a byte array, it must be true that sector[510] equals 0x55, and sector[511] equals 0xAA.

NOTE: Many FAT documents mistakenly say that this 0xAA55 signature occupies the “last 2 bytes of the boot sector”. This statement is correct if — and only if — BPB_BytsPerSec is 512. If BPB_BytsPerSec is greater than 512, the offsets of these signature bytes do not change (although it is perfectly OK for the last two bytes at the end of the boot sector to also contain this signature).


jaclaz


Edited by DiracDeBroglie, 08 December 2011 - 05:35 AM.


#15
jaclaz

jaclaz

    The Finder

  • Developer
  • 15,017 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag

64 x 512 = 32768 bytes (=8 times 4K sectors) or
64 x 4096 = 2642144 bytes, which is 1/4 of the offset in the Win7 registry key being 1048576 (=256 times 4K sectors).

64 x 512 = 32768 bytes (=8 times 4K sectors)

Problem is that it is not quite clear to me if one means a sector of 512 bytes or 4096 bytes.

Unless otherwise specified, 512 bytes/sector.

Is that 2048 times 512bytes, or 2048 x 4K? The first results in 2048 x 512 = 1048576 bytes, which is the same value in the registry key mentioned earlier. So 256 times a 4K sector between the logical volumes: that is a lot!

Well, with disks of hundreds of Gigabytes, 1 Mb is not that much.
If you think about it, older (much smaller) disks always had a bunch of unused sectors at the end, as the "steps" or "size increment/decrement" for any partition was 1 cylinder, i.e. 1x255x63x512=8,225,280 bytes, depending on a few factors there has always been this unused space in the theoretical range 0÷8,224,768, but often nearer to the upper limit.


So, the first 512 bytes of the first 4K sector are used as MBR. A petty that the last 7 short (512bytes) sectors in the first 4K sectors are not used. That extra space could have been used for larger bootloaders, for instance, in case one wants to boot multiple OSs. Also the remaining 255 4K sectors between the first 4K boot sector and the beginning of the first partition are just sitting there. What is that space used for? For extra and larger bootloaders, maybe?

No, you got this part wrong. :ph34r:
We thought for years that the BIOS accessed first (512 byte) sector and that that (first seector) was the MBR.
It is simply not like this.
The MBR is the first 512 bytes of the first sector, NO MATTER sector size.
There are already more than a few (grub4dos as an example) bootmanagers/bootloaders that use several (512 bytes) sectors after the first one (grub4dos' grldr.mbr uses, if I recall correctly, first 18 sectors of a hard disk (512 bytes each) or if you prefer, it is 9,216 bytes in size.
The grub4dos' grldr.mbr contains in the first 512 bytes, i.e. what is actually READ during booting some code that makes the BIOS read from 513th byte onwards (actually normally from 1025th, as second block of 512 bytes is a backup of the previous MBR if any) up to 9,216th.

jaclaz

#16
DiracDeBroglie

DiracDeBroglie

    Member

  • Member
  • PipPip
  • 104 posts
  • Joined 07-December 11
  • OS:Windows 7 x64
  • Country: Country Flag
Jaclaz,

Just one more question about bootloaders on 4K sectors. Does that mean that any "ordinary" bootloader/manager, which was designed for 512byte sectors, can reside partially in the (first 512byte) MBR, and then continue from the 1025th byte onwards in the first 4K sector, all the way up to the last byte of the 256th 4K sector, just before the beginning of the first partition? Also, can any "ordinary" bootloader/manager, which was designed for 512byte sectors, function without any risk for problems on a 4K sector drive?

I noticed that with older drives there is alway the offset of 63 512byte sectors; it looks like it is an international standard. However, is there also an international standard for the offset in 4K drives?? Microsoft uses an offset of 256 times a 4K sector, but the HD manufacturers (WD, Seagate) seem to deviate from that. I think (but I could be wrong) this could be annoying for the developers of more sofisticated boatloaders. Anyhow, so far so good for the MBR related stuff. I have some other questions about partition in the next message.

johan

#17
jaclaz

jaclaz

    The Finder

  • Developer
  • 15,017 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag

Just one more question about bootloaders on 4K sectors. Does that mean that any "ordinary" bootloader/manager, which was designed for 512byte sectors, can reside partially in the (first 512byte) MBR, and then continue from the 1025th byte onwards in the first 4K sector, all the way up to the last byte of the 256th 4K sector, just before the beginning of the first partition? Also, can any "ordinary" bootloader/manager, which was designed for 512byte sectors, function without any risk for problems on a 4K sector drive?

No.
You got it wrong. :ph34r:
An "ordinary" MBR is 512 bytes long, NO MATTER sector size of the hard disk.
The BIOS will read first 512 bytes of the hard disk, NO MATTER sector size of the hard disk.
*ANY* bootmanager/bootloader may be longer than 512 bytes AND has to provide code to read beyond the 512th byte, NO MATTER sector size of the hard disk.
AS AN EXAMPLE of such kind of MBR bootloader/bootmanager I cited grub4dos and it's grldr.mbr.
That PARTICULAR, SPECIFIC EXAMPLE uses bytes 512÷1023 to store a backup of previous - if any - MBR.
In normal operation the grldr.mbr code (within the first 512 bytes) "jumps over" the second 512 bytes and continues to read up to where it is instructed to, in the specific case not beyond the end of it's code which is in total 9216 bytes.

Also, can any "ordinary" bootloader/manager, which was designed for 512byte sectors, function without any risk for problems on a 4K sector drive?

You are falling in the usual "generalization" error. :w00t:
*any* makes no sense, as well as "ordinary".
In theory yes, *any and all* MBR codes and bootmanager/bootloaders, including "ordinary" and "rather uncommon" and "exceptionally good" ones ;) will work allright, NO MATTER sector size of the hard disk.
BUT:

In theory there is no difference between theory and practice, but in practice there is.


YMMV.

I noticed that with older drives there is alway the offset of 63 512byte sectors; it looks like it is an international standard. However, is there also an international standard for the offset in 4K drives?? Microsoft uses an offset of 256 times a 4K sector, but the HD manufacturers (WD, Seagate) seem to deviate from that. I think (but I could be wrong) this could be annoying for the developers of more sofisticated boatloaders. Anyhow, so far so good for the MBR related stuff. I have some other questions about partition in the next message.

It is not an "international" standard, it was a "practical consequence" of the initial completely botched approach (in the sense of not enough "open" to future increasing in size of hard disks) which is (was) the CHS addressing scheme AND for historcal reasons (actual way hard disks were initially made).
If you think of a common floppy, it has a geometry of 80x2x18 AND it actually has 2 Heads (Sides) and actually each side has 80 cylinders, each containing 18 sectors.
Early hard disks were the same.
Very soon physical geometry lost each and any resemblance with logical geometry.
You will need to go all the way through this to understand this "evolution" and to understand WHY the nx255x63 geometry became a "standard".
http://www.pcguide.c...d/bios/size.htm
Be warned that the mentioned site goes through ALL historical size barriers (no matter which was the cause) whilst you are interested in those that are BIOS/IDE/ATA related only, BUT you need to read them all to understand the path taken.

jaclaz

#18
DiracDeBroglie

DiracDeBroglie

    Member

  • Member
  • PipPip
  • 104 posts
  • Joined 07-December 11
  • OS:Windows 7 x64
  • Country: Country Flag
Jaclaz,

Still a few questions.

Q1: What are the best tools for looking up bad sectors, or looking up those sectors that *might* become (or have a high potential of becoming) bad in the "near" future? Is Disk Management under Win7 good enough for that job?
From what I read, the latest drives check for (very) bad sectors in an automated way (on the fly). If sectors have to be re-read too often, the firmware in the drive could move the data off the suspicious sector to a spear sector, or something like that. However, I want to minimize the chance that any sectors in the next coming years start causing trouble; that way I could minimize the probability that I loose any data or have any other problems the next coming years. Hence that I'm looking for a tool that could look for potentially future bad sectors (some tool that can test the sectors to the very extreme).

Q2: What are according to you the best tools---meaning, delivering the most comprehensive, detailed hardware info of the drive---for analyzing 4K (and 512byte too) sector drives? (Probably, any such tool will rely on SMART info from the drive.)

Q3: What are the best Benchmark tools for testing the performance of 4K sector drives? I got DiskSpeed32 and Atto Disk Benchmark v.2.47, but I assume there must be more powerful stuff out there. NOTE, I got Win7HP, 64-bit.

Thanks in advance,
johan

#19
jaclaz

jaclaz

    The Finder

  • Developer
  • 15,017 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag

Still a few questions.

You won't like the answers. :(

A1. There is "NO" *best* tool that I know of. Whether a disk will develop bad sectors and whether bad sectors are going to spread and/or will be relocated automatically by the disk firmware is something that no program can forecast reliably and anyway you cannot do nothing about it. BTW, if you want to unneededly put additional stress on a disk :w00t: you may want to run from time to time Victioria, here:
http://majorgeeks.co...dows_d5688.html
though it won't probably run on 64 bit and, if you choose the "wrong" settings, you can easily botch a hard disk for good. :ph34r:
It is a tool that is more suited to check a disk when attempting reconditioning it than a "periodical check".

A2. There is "NO" *best* tool that I know of. There are dozens of similar tools that read S.M.A.R.T. data. It's the S.M.A.R.T. mechanism that is the issue, IMHO. See here:
http://www.msfn.org/...the-hard-drive/

A3. Benchmarking a disk makes very little sense (unless you are trying to publish a disk speed comparison). A benchmark is only useful as "comparison" metrics. Real life (and real data transfer) is very different from what any bechmark reports, for a quick idea of what is happening I normally use Atto, though since it is aging, probably it is not fully reliable on newish disks/OS.I guess that if you want such an app you shoud check published disk benchmarking tests and see what they use.

jaclaz

Edited by jaclaz, 09 December 2011 - 01:56 PM.


#20
DiracDeBroglie

DiracDeBroglie

    Member

  • Member
  • PipPip
  • 104 posts
  • Joined 07-December 11
  • OS:Windows 7 x64
  • Country: Country Flag


Still a few questions.

You won't like the answers. :(

jaclaz


Yes, that's right I don't like the answers, but I guess I just have to learn to live with the non-perfect tech-world. Still got a question about bad sectors, though. Right-click any drive in WinExplorer root level, -> Properties, Tools, Check Now, then one can Scan for and attempt recovery of bad sectors. If I create just ONE primary partition onto my 2TB drive and I perform a full Scan for bad sectors, do I have to scan again for bad sectors in the newly created partitions after I've split the drive into smaller partitions. Note, I just hope Win7 can scan for bad 4K sectors just as good as it can scan for bad 512byte sectors (If that is not the case, then please notify).

Thanks,
johan

#21
jaclaz

jaclaz

    The Finder

  • Developer
  • 15,017 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag

Yes, that's right I don't like the answers, but I guess I just have to learn to live with the non-perfect tech-world. Still got a question about bad sectors, though. Right-click any drive in WinExplorer root level, -> Properties, Tools, Check Now, then one can Scan for and attempt recovery of bad sectors. If I create just ONE primary partition onto my 2TB drive and I perform a full Scan for bad sectors, do I have to scan again for bad sectors in the newly created partitions after I've split the drive into smaller partitions. Note, I just hope Win7 can scan for bad 4K sectors just as good as it can scan for bad 512byte sectors (If that is not the case, then please notify).

I don't think that you will find *any* bad sector. :unsure:
On modern hard disks, the disk firmware should re-locate the bad sector mapping (and increase one of the S.M.A.R.T.) registries.
But no, you don't have to re-scan the disk, not even with old controllers, unless of course, but it really is a VERY rare occasion, the bad sector "appears" in the short time between your check and the re-partitioning.

jaclaz

#22
DiracDeBroglie

DiracDeBroglie

    Member

  • Member
  • PipPip
  • 104 posts
  • Joined 07-December 11
  • OS:Windows 7 x64
  • Country: Country Flag
Hi,

The 2TB (4K-sector; 512e; Advanced Format) drive of mine is a Seagate drive. I used SeaTools for Windows to check the drive---took me a whole long day---and all seems ok. A comparison of SMART info from before and after the SeaTools testing revealed no problems with the drive. Most important SMART attribute 'Reallocated Sector Count' remained pinned down at zero. On the other hand, the attribute 'Hardware ECC recovered' went from 19 to 27 (Current); the value for Worst remained at 15. Hope the attribute 'Hardware ECC recovered' is ok.
For downloading SeaTools for Windows, go to:
http://www.seagate.c...nloads/seatools

Note; SMART check in SeaTools returns "Test unavailable". I contacted Seagate support via email and they told me that it's probably because the drive is in a third party USB enclore. I find that hard to believe as CrystalDiskInfo and PC Wizard 2010 both give me huge amounts of very *SMART* info about the drive.

Seagate also has a Partition Offset Information (POI) Utilitie:
http://seagate.custk...4391&NewLang=en

POI does work fine on my internal 512-byte sector drives of both laptops (XP and W7), but on the 2TB drive POI does not work at all. Also here, Seagate support purported POI does not work on drives in third party external enclosures, as mine. I have to say I also find that nonsense because PTEDIT32 (which is 12 years old) and PartitionInfo 8 both give the number of "Sectors Before" the beginning of all partitions, on the internal drives as well as on the external drive. Divide the "Sectors Before" by 8 and if the outcome is an integer than the partition in question is aligned. The same job for all other partitions (and maybe also on the total sectors inside each partition) return an integer in case of proper alignment. Strange that POI from Seagate cannot do that.

I've found another cute Alignment Checker called Disk Alignment Test (short: diskat):
http://diskat.net/download-en.html (if the site is not down)
I got it from
http://www.hddoctor....at-hard-drives/

Diskat did exactly the job on the Seagate 2TB drive that POI didn't, couldn't or wouldn't do.

All the alignment stuff raised a question with me. If Advanced Format drives emulate 512-byte sectors, how come that utilities like Diskat (and POI) somehow know that the 2TB drive is a 4K physical sector drive?? I couldn't find any attribute in SMART that passes on to Diskat or POI info about the number of bytes per physical sector.

nice links:
http://www.techsuppo...rtitioning.html
http://www.techsuppo...ion-manager.htm

Regards,
Johan

PS: I'll be off for a week. Back on 28 Dec.

#23
jaclaz

jaclaz

    The Finder

  • Developer
  • 15,017 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag

Note; SMART check in SeaTools returns "Test unavailable". I contacted Seagate support via email and they told me that it's probably because the drive is in a third party USB enclore. I find that hard to believe as CrystalDiskInfo and PC Wizard 2010 both give me huge amounts of very *SMART* info about the drive.

Actually this is most probably correct.
The USB protocol prevents some "data structures" to "pass through".
As an example, try accessing an hard disk with Victoria for windows when it is directly connected to the MB (Pata or Sata) and when it is connected through a USB adapter/external case.


POI does work fine on my internal 512-byte sector drives of both laptops (XP and W7), but on the 2TB drive POI does not work at all. Also here, Seagate support purported POI does not work on drives in third party external enclosures, as mine. I have to say I also find that nonsense because PTEDIT32 (which is 12 years old) and PartitionInfo 8 both give the number of "Sectors Before" the beginning of all partitions, on the internal drives as well as on the external drive. Divide the "Sectors Before" by 8 and if the outcome is an integer than the partition in question is aligned. The same job for all other partitions (and maybe also on the total sectors inside each partition) return an integer in case of proper alignment. Strange that POI from Seagate cannot do that.

See above.

The "Sectors before" are data stored in the MBR, you can (obviously) access these no matter the interface/connection.
If you prefer this kind of data is "public".
Manufacturer proprietary tools, generally speaking use different ways to connect to the device, having access to other, proprietary, settings.
Even if there is no need whatsoever to use those to align or re-align a partition, it is very possible that they have a "base" program using this kind of "privileged" access instead of "standard" reading/writing, and they made the aligning tool out of this "base".

All the alignment stuff raised a question with me. If Advanced Format drives emulate 512-byte sectors, how come that utilities like Diskat (and POI) somehow know that the 2TB drive is a 4K physical sector drive?? I couldn't find any attribute in SMART that passes on to Diskat or POI info about the number of bytes per physical sector.

Because that data is NOT in the S.M.A.R.T. set of attributes, but in other data structures (no, don't ask me where exactly) and these latter data structures are anyway "publicly" accessible.

jaclaz

#24
SergeyVolynkin

SergeyVolynkin
  • Member
  • 3 posts
  • Joined 23-December 11
  • OS:XP Pro x64
  • Country: Country Flag

All the alignment stuff raised a question with me. If Advanced Format drives emulate 512-byte sectors, how come that utilities like Diskat (and POI) somehow know that the 2TB drive is a 4K physical sector drive?? I couldn't find any attribute in SMART that passes on to Diskat or POI info about the number of bytes per physical sector.

Hi, the information about the physical sector comes with ATA IDENTIFY command reply for ATA devices and READ CAPACITY (16) for SCSI ones.

#25
SergeyVolynkin

SergeyVolynkin
  • Member
  • 3 posts
  • Joined 23-December 11
  • OS:XP Pro x64
  • Country: Country Flag


Note; SMART check in SeaTools returns "Test unavailable". I contacted Seagate support via email and they told me that it's probably because the drive is in a third party USB enclore. I find that hard to believe as CrystalDiskInfo and PC Wizard 2010 both give me huge amounts of very *SMART* info about the drive.

Actually this is most probably correct.
The USB protocol prevents some "data structures" to "pass through".
As an example, try accessing an hard disk with Victoria for windows when it is directly connected to the MB (Pata or Sata) and when it is connected through a USB adapter/external case.

It depends on conrete model of USB/ATA bridge. Most modern bridges allow pass-through in standard way. In this case the SMART and IDENTIFY data are available for great number of software. But some models don't support pass-through at all. Others allow only vendor-specific commands.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users