Disk not fully utilized

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

 



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?

(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

Disk /dev/hda: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1               1       24321   195358401   83  Linux

(hda1: 200047002624 bytes)

# mount -t foo /dev/hda tmp

sb->s_bdev->bd_disk->capacity: 390721968 (200049647616 bytes)

# mount -t foo /dev/hda1 tmp

sb->s_bdev->bd_part->start_sect: 63
sb->s_bdev->bd_part->nr_sects: 390716802 (200047002624 bytes)

--
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