1

Topic: new drive discrepancy

I have just bought a new MAXTOR 320GB drive and the data sheet says that it has 625142448 sectors.
Using the dd routine in Linux, i have found that it does have that many but GPartedLive0.3.9.4 says that it has 625137346 sectors; though at the top of the info window it correctly states 298.09GiB.
1) Why the discrepancy?
On setting the disk label it then reports 1 less sector as the total number?
2) Why?
3) Is there a bug or am i miss-understanding the reported info?

2

Re: new drive discrepancy

Hello Kev,
that's an issue with the cylinder / drive boundary alignment, which should be given on a new drive.
You in general loose some neclectable space therefore. With 255 (virtual) heads and 63 sectors/blocks per cylinder, you get 255 * 63 = 16 065 blocks/cylinder. The original size of your HDD 625 142 448 blocks divided by 16 065 blocks results in 38 913 whole cylinders (=625137345 blocks) and a rest of 5103 blocks ( * 512 Bytes = 2 612 736 Bytes; unallocated "slack"). Counting of blocks starts with 0, i. e. block 625137345 is the last of 625137346 total blocks.

All "clarities" removed ?

3 (edited by Kev 2008-11-11 13:44:13)

Re: new drive discrepancy

Some, yes, thank you; but  the first operation that i did was to set the disk label and the reported total [sector] size went down by 1 sector - surely the total size is immutable?
[Philosophically], as this drive is only for use as my /home directory is a disk label essential?
Do file systems [ext3, & jfs] require partitions to be integer multiples of  16065 sectors on my hard drive?;
and do they require them to start at 0x3F?
Also, given that GParted operates in [constrained to ?] integer multiples of cylinder-sized blocks,  why does it start the partition at sector 0x3f - instead of at the begining of the 2nd cylinder [at sector 16065]?

4

Re: new drive discrepancy

The first sector of the drive (sector 0 as numbering usually begins at 0) is the master boot sector and is special. It contains the partition table as well as a bootloader code. The first partition begins at sector 63.

GParted can operate outside of the cylinder boundaries, there is a choice in late versions. However some operating systems need cylinder boundaries alignment. I think this is valid mainly for older systems.

A "disk label" is essential because it is related to the system architecture and hardware. Linux on x86 hardware needs the "msdos" disk label. A drive to be attached to some powerpc system or sparc systems needs other disk labels. Don't confuse "disk label" and "partition label". The partition label is a "name" for a partition. The disk label is something global for the hard drive.

*** It is highly recommended to backup any important files before doing resize/move operations. ***

5

Re: new drive discrepancy

Hi!

from experience, I can say tha a "disk label" (containing your partition table) is not absolutely necessary on Linux - however, you'll have to use command-line tools with some special options to create a file system on such a disk, and since having a disk label is the default, throwing away the disk label can easily cause lots of confusion during disaster recovery.
In addition t this, the disk label "wastes" only a few kBytes of storage space (MBR + slack space up to the beginning of the first partition), so it really does not hurt to have one. ;-)