Re: Disk not fully utilized

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Fri, Apr 06, 2007 at 07:47:03AM -0400, John Anthony Kazos Jr. wrote:
> I wrote a stub superblock function to check these numbers using the 
> superblock in fill_super, and I'm finding that not all of my disk is being 
> used.
> 
> The numbers match between the full device and the first partition, so it 
> has to be that the first partition isn't big enough to actually fill the 
> disk after the first cylinder. There seem to be 2612736 bytes after the 
> first partition for some inexplicable reason. Any ideas?

Fdisk likes to be compatible with an ancient operating system from a
certain company in Redmond, WA. For that it has to use the old CHS
(cylinder/head/sector) notation. Unfortunately, all drives from the
last 15 years lie about their geometry, and the OS is basically free to
use any geometry it likes. Some of those geometries fit perfect, others
don't.

> (2.6.20.4 on i386)
> 
> Looking at it again just now, the calculation of cylinder size seems to be 
> messed-up somehow. fdisk is dividing the entire disk into arbitrary 
> chunks, moving to the second physical sector, and leaving the remainder 
> unutilized. Is this somehow required by the DOS partition format, or by 
> the kernel partition-handling code? Or is this a bug in fdisk?
> 
> # fdisk -l /dev/hda

Use "fdisk -l -u" to figure out the size, that gets rid of the silly
CHS idea and shows the partition table in sectors. Another way is to
look at sysfs: the files start and size in /sys/block/hda/hda1/ show
you the start sector and the size in sectors for /dev/hda1.


Erik

- -- 
They're all fools. Don't worry. Darwin may be slow, but he'll
eventually get them. -- Matthew Lammers in alt.sysadmin.recovery
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGFjjW/PlVHJtIto0RAuwvAJ9Po6tOMXq71NOVX6esPtcci0MZbwCfZD3S
DTpB6t8d/FTCz/A/3BAqomU=
=0v3v
-----END PGP SIGNATURE-----

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux