[haiku-development] Re: Available spaces on partitions

  • From: Marcus Overhagen <marcusoverhagen@xxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Thu, 7 Feb 2008 10:27:15 +0100 (CET)

> On Feb 2, 2008 6:34 AM, Stephan Assmus <superstippi@xxxxxx> wrote:

> > I would like to get some feedback on a question regarding available spaces
> > on partitions that are smaller than a certain "threshold". I think these
> > spaces appear because of positioning restrictions for partitions with
> > certain hard drive layouts and properties. I don't know enough about it,
> > but I have encountered these "unavailable for partitions" spaces anytime I
> > have dealt with partitioning tools, especially when installing Windows. For
> > example, I would create one big partition to cover the entire drive, and
> > after doing so, there would be 8 MB of empty space left besides the new
> > partition -> Huh? My questions are, I guess, 1) whether this is really
> > unavoidable because of some placement restrictions. 2) whether to show these
> > to the user at all (I guess not). And 3) if there is any more reliable way
> > to detect a "bogus space" other than looking at it's size and, say, ignore
> > anything below or at 8 MByte. Maybe with even bigger drives, these spaces
> > could be more than 8 MByte. Like I said, I don't know enough about the
> > subject, any feedback appreciated.

This is pretty simple. Different operating systems may assume a different
C/H/S geometry for the same device. Traditionally, partitions start and end
at a cylinder boundary, even when the LBA entrys of the partition table are
used. Newer partitioning software starts partitions on the same cylinder,
but uses the next head (1), thus not wasting that much space.
Thus, you may see small unused space before the first partition, because
the partition table is already on the current cylinder, and the partition will 
begin
on the next head or cylinder. The same applies to extended partitions.
It gets worse when different partitioning tools or operating systems
were used on the same harddisk, because the result may be a mixed alignment.

The Linux large disk howto mentions that certain old fdisk versions wouldn't
use the last cylinder, so that needs to be accounted for, too.

I think we should be careful and hide those aligment space from the user.

If the user created two primary partitions, he should be able to access them
as partiton 0 and 1, and not as 1 and 3, with 0 and 2 beeing unused alignment
space.

There is a pretty good explanation at 
http://ata-atapi.com/hiwtab.htm
and also this linux how-to has some details
http://tldp.org/HOWTO/html_single/Large-Disk-HOWTO/#s6


Ben Allen <ben.allen@xxxxxxxxx> wrote:

> Many hard drive manufacturers reserve a chunk of space at the end of a
> physical drive to store configuration-, statistics-, and
> performance-related information about the drive.  In particular, SMART
> data for individual drives can be stored here, as well as drive
Yes that is correct. Hard disk do so, but those sectors are completely
used internally and are not reported with the identify device command.
The OS is completely unaware of them, and doesn't know that these sectors 
exist. In particular, they are not related to the partition table alignments.

> identification data used by RAID controllers in servers to allow
> drives to transparently migrate from one location to another.  See
> http://www.google.com/patents?id=pqcEAAAAEBAJ (US patent #6092169) and
I didn't read the patent, but hardware RAID controllers either don't
do so, or have to report a different disk size to the os, so it doesn't
apply here.

> The small section of data you are seeing may be reserved by the drive
> for its own use similar to what was described above.  The hard drive
No it isn't.

> may report that the space is there, but refuse to allow anyone else to
> use or access it.  If that's the case, I would definitely think that
Thats not done.

> the extra space is indeed unavoidable and I would recommend not
> showing it to the user (not by default in user applications anyway,
I agree that it shouldn't be shown.

> more advanced/direct tools like fdisk might be another story).  A lot
A verbose mode that shows unused space might be nice, yes.
As long as it's NOT shown as a dedicated partition.

> of less-experienced users may find the little bits of un-accessible
> space confusing, and one can also argue that there's not much benefit
> in showing the average user disk space that they cannot access.
Agreed.

regards
Marcus


Viel oder wenig? Schnell oder langsam? Unbegrenzt surfen + telefonieren
ohne Zeit- und Volumenbegrenzung? DAS TOP ANGEBOT FÜR ALLE NEUEINSTEIGER
Jetzt bei Arcor: günstig und schnell mit DSL - das All-Inclusive-Paket
für clevere Doppel-Sparer, nur  29,95 Euro  inkl. DSL- und ISDN-Grundgebühr!
http://www.arcor.de/rd/emf-dsl-2

Other related posts: