Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RHEL 5 partitioning

Status
Not open for further replies.

reinstalled

IS-IT--Management
Feb 18, 2003
178
RH newbie so apologies if simple question(s)

Trying to figure size of cylinders in MB's
to partition data disk using parted.

when I multiply bytes per by total number of cylinders
I should get total bytes.

fdisk:
Disk /dev/cciss/c0d1: 524.2 GB, 524287008768 bytes
255 heads, 32 sectors/track, 125489 cylinders
Units = cylinders of 8160 * 512 = 4177920 bytes

so:
4177920 bytes * 125489 # of cyl = 5242830002880 bytes
Actual as reported by fdisk is 524287008768 bytes

Am I missing something obvious? Why the difference?

Thanks,
 
Well, first of all, fdisk is lying to you. Or at least translating some things. Think about it, do you think there are really 255 physical read/write heads inside that disk? If you tear it open, I think you'll find probably less than 10 read/write heads (unless it's a real big disk). I'm guessing there has been some "loss" due to this translation of the actual parameters.

Also, you need to watch out for what a K is defined as. Disk manufacturers like to treat a Kilobyte as 1,000 bytes. Most of us think of a Kilobyte as 1,024 bytes. That adds up when you're talking Gigabytes.

Your math is wrong somewhere. The numbers you list of off by a factor of 10 (roughly). The number reported by fdisk is about 524 Gigabytes. The other number you list is over 5 Terabytes (5242830002880 bytes).

What is the make and model of your disk? Some vendor specs might help clear it up.

The bottom line though, is that it's usually not worth it worrying about the loss of a few megabytes when you are setting up hundreds of Gigabytes. You always lose some to formatting, and partitioning, and filesystem structure. It's an expected and acceptable part of setting us disks.

 
The 5TB number must just be a typo, 4 177 920 * 125 489 = 524 283 002 880 bytes.

Annihilannic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top