Calculating possible partition size

  • Thread starter Thread starter Ham Pastrami
  • Start date Start date
H

Ham Pastrami

When you specify a general partition size (such as 8000 MB), this usually
gets changed to some other value, I guess because of cylinder boundaries or
something. How do you calculate what is and isn't a "real" valid size for a
partition?
 
Ham said:
When you specify a general partition size (such as 8000 MB), this usually
gets changed to some other value, I guess because of cylinder boundaries or
something. How do you calculate what is and isn't a "real" valid size for a
partition?

Yep - cylinder boundaries.

1. Trial and error.

2. If you know how many sectors are in each cylinder, then the calculation
is simple but tedious. Two problems are:

a. some HD vendors do not make that level of detail available, or easy
to find if available, and

b. if there are a large number of bad sectors on a cylinder then the
revectoring will decrease the number of usable sectors on that
cylinder.

I'd settle for (1) -- if you insist on setting an exact value.
 
Bob Willard said:
Ham Pastrami wrote

Why bother, just specify what you need and accept that it will
actually be a little smaller, or specify a little bigger than you need.
Yep - cylinder boundaries.
1. Trial and error.
2. If you know how many sectors are in each cylinder, then the calculation is
simple but tedious. Two problems are:
a. some HD vendors do not make that level of detail available,

The cylinders used for partion boundarys arent the
physical cylinders, they are the logical cylinders that
have a fixed size right across the platters. That comes
from the MBR physical numbers, not the manufacturer.
or easy to find if available, and
b. if there are a large number of bad sectors on a cylinder then the
revectoring will decrease the number of usable sectors on that cylinder.

Few modern hard drives have spare sectors in each cylinder anymore.

They are effectively replaced with the LBA mapping table.
I'd settle for (1) -- if you insist on setting an exact value.

Cant see the point in an exact value myself.
 
Bob Willard said:
Yep - cylinder boundaries.

Utterly clueless. There are not even cylinders above 8GB.
1. Trial and error.

Nope. The application just does it for you.
And some don't. They just accept your value.
It's not a problem on LBA type partitions.
2. If you know how many sectors are in each cylinder, then the calculation
is simple but tedious. Two problems are:

a. some HD vendors do not make that level of detail available, or easy
to find if available, and

It isn't even HD dependent.
The numbers are the logical CHS as used by BIOS program interface,
not the physical CHS as used by BIOS IDE interface.
b. if there are a large number of bad sectors on a cylinder then the
revectoring will decrease the number of usable sectors on that
cylinder.

Utter nonsense.
I'd settle for (1) -- if you insist on setting an exact value.

Clueless.
 
Ham Pastrami said:
When you specify a general partition size (such as 8000 MB), this usually
gets changed to some other value, I guess because of cylinder boundaries or
something. How do you calculate what is and isn't a "real" valid size for a
partition?

There is no invalid size for an LBA type partition. The CHS is ignored.

It's only applications that bother with manipulating partitions that find fault with it, the OSs usualy accept them fine.
 
Folkert Rienstra said:
It's only applications that bother with manipulating partitions that find
fault with it, the OSs usualy accept them fine.

Fair enough, but what calculation are these applications performing, albeit
needlessly? What is the theory that would be necessary for a CHS disk?
 
Rod Speed said:
Why bother, just specify what you need and accept that it will
actually be a little smaller, or specify a little bigger than you need.

You assume that this is what I want the information for. My question was how
to calculate valid sizes, not how to get the size I wanted.
 
Folkert Rienstra said:
Utterly clueless. There are not even cylinders above 8GB.
Folknuts puts foot+leg in mouth again.

Yes, Win NT does allocate on cylinder boundries for Basic Disks.
It even figures out how many such cylinders exist, and several programs report them:

PhysicalDrive2 = \Device\Harddisk2\DR2
Media=Fixed, Sector=512B, Cylinders=2213, Heads=255, Sectors=63, Total=17359MB

You seem to be the only one who is clueless on this topic.
 
You assume that this is what I want the information for.
Nope.

My question was how to calculate valid sizes,

Why bother when it gets adjusted to valid sizes ?
 
Fair enough, but what calculation are these
applications performing, albeit needlessly?

You've already been told that more than once.
The calculation uses logical cylinders, a partition
uses complete logical cylinders. The partition
doesnt begin or end part way thru a logical cylinder.
What is the theory that would be necessary for a CHS disk?

The C stands for cylinders. Thats what the partition sized
is adjusted to, a partition that includes full logical cylinders.

The physical cylinders dont matter any more because
the sectors per track and hence per cylinder varys in
bands across the platteer with modern drives.

The Win family of OSs use logical CHS values at some
levels, essentially fake numbers that have constant sized
cylinders with fixed numbers of heads and sectors.

Access is normally by logical block numbers.
 
Rod Speed said:
You've already been told that more than once.

No, actually, I haven't. Since you're more interested in answering questions
that weren't asked and won't give a direct answer to the ones that were
asked, you may excuse yourself from the thread. There are useful people in
it now. But thanks for playing.
 
No, actually, I haven't.

Yes, actually, you have. The partitions sizes are adjusted
to FULL CYLINDERS by some apps that create partitions.
Since you're more interested in answering questions that
weren't asked and won't give a direct answer to the ones
that were asked, you may excuse yourself from the thread.
There are useful people in it now. But thanks for playing.

Just another ****wit troll, obviously.
 
Ham Pastrami said:
Fair enough, but what calculation are these applications performing, albeit
needlessly?

They check whether the LBA values in the MBR are on a full
(imaginary, bigger than 1023 if necessary, even though cylinders
are limited to 1023) cylinder boundary and balk when it is not.

On drives bigger than 8GB, the partitions bigger than 8GB have MBR
CHS values that are large drive placeholders, ie the maximum allowed
number for CHS, ie 1023/255/63.

What is the theory that would be necessary for a CHS disk?

That the geometry can be taken from the values in the MBR.
There is no geometry in the MBR, only boundaries, but if you put
the partition boundaries on full cylinders then those MBR values
also represent the geometry.

With LBA, CHS obviously isn't used, so CHS boundaries don't matter.
The only time it may matter is at boottime and when the bootcode uses
CHS only.
 
Back
Top