Why does windows leave 8MB unpartitioned?

Zoinks

Senior member
Oct 11, 1999
826
0
76
When partitioning and formatting a brand new hdd from the windows XP CD and after choosing to make the maximum size partition, windows leaved 8MB unpartitioned. Is there a reason for this? Why not use the whole thing?
 

bsobel

Moderator Emeritus<br>Elite Member
Dec 9, 2001
13,346
0
0
That answer is exactly right. The space is reserved for use by the OS if you conver the volume to dynamic disk (this is where the volume/drive data is kept on a dynamic disk)

Bill
 

VirtualLarry

No Lifer
Aug 25, 2001
56,570
10,202
126
I know that the "dynamic disk database" is kept at the end of the space (in terms of logical LBAs) of each disk in the system (only the ones containing dynamic disks, or all of them?).

But, I don't think that the "dynamic disk database" actually takes up a whole 8MB, does it? That's one heck of a huge partition-table. :)

There's actually another reason, I believe, for it to reserve the last little chunk of HD space and leave it unpartitioned. One is cylinder roundoff boundries. Some OSes (older ones), don't deal well with partitions that don't begin/end on cylinder boundries. Most modern drives offer some LBAs that are not a nice round even multiple of the cylinder size. (Actually, I should check this, but I think it's true.)

The other issue is, some motherboard BIOSes actually (still!) reserve a "spare cylinder" (ostensibly, "for diagnostic purposes", although the reasoning for that is lost in the mists of time). AMIBIOS is well-known for this. So if you were allowed to format an IDE disk as FAT32 using a Win98se boot disk, on a machine who's BIOS didn't reserve that spare cylinder, and then transfer that disk to a different machine, who's BIOS did, then the last part of your filesystem would be chopped-off and inaccessable! (Yes, I've seen that happen personally. It confused the heck out of me until I finally realized what was really going on.)

Now, I'm not sure if any modern mobo BIOSes do something that (IMHO, stupid) these days, but I'm guessing that NT's disk code is largely unchanged, from NT4 up through Windows 2003, other than minor fixes and tweaks, and that's probably why it continues that behaviour.

So now you know - there are very arcane "legacy-compatible" behaviors at work here in the code.

Edit: Found an official reference to the size of the "dynamic disk database" - link
Dynamic disks use dynamic volumes to subdivide physical disks into one or more drives enumerated by letters of the alphabet. Disk configuration data is contained in a disk management database stored in the last 1 megabyte (MB) of space at the end of the disk.

So that is not the (only) reason that Windows' reserves a good chunk of space at the end of the disk when partitioning, although I can't rule out that they simply add 1MB for the "dynamic disk database", and then truncate at a cylinder boundry.
 

bsobel

Moderator Emeritus<br>Elite Member
Dec 9, 2001
13,346
0
0
But, I don't think that the "dynamic disk database" actually takes up a whole 8MB, does it? That's one heck of a huge partition-table. :)

Your right, the database doesn't need 8 mb. What MS does to reserve the space is "The amount that is reserved is a minimum of one cylinder, or 1MB, whichever is greater. (One cylinder can be up to 8MB, depending on drive geometry and translation.)".

The other issues you bring up are valid, but not covered by what MS did (otherwise they'd need to reserve 2 cylnders or the issues would stomp on the dynamic disk info...)

Bill
 

Smilin

Diamond Member
Mar 4, 2002
7,357
0
0
Originally posted by: VirtualLarry
That's one heck of a huge partition-table. :)

Keep in mind that the LDM database on each drive contains the information for ALL drives on the system. The information kept includes starting and stopping cylinder, head, sector as well as what set each volume belongs to.

It may seem a bit silly if you are used to a machine with a handful of partitions and a couple drives. However windows can handle (I think - this is from memory) 254 LUNs and a buttload (memory gone on this) of volumes per LUN.

:D

 

VirtualLarry

No Lifer
Aug 25, 2001
56,570
10,202
126
Originally posted by: bsobel
But, I don't think that the "dynamic disk database" actually takes up a whole 8MB, does it? That's one heck of a huge partition-table. :)

Your right, the database doesn't need 8 mb. What MS does to reserve the space is "The amount that is reserved is a minimum of one cylinder, or 1MB, whichever is greater. (One cylinder can be up to 8MB, depending on drive geometry and translation.)".

The other issues you bring up are valid, but not covered by what MS did (otherwise they'd need to reserve 2 cylnders or the issues would stomp on the dynamic disk info...)

Bill

Yes. I was pointing out that the reason that they reserve an entire cylinder, instead of simply 1MB worth of LBAs, is because of legacy reasons. It's certainly not required, for any current, modern OS, like NT or Linux. Only for compatibility with BIOS-oriented OSes like DOS/Win9x.