Media Toolbox Partition Size Calculation

A forum for general AmigaOS 4.x support questions that are not platform-specific
Post Reply
my_pc_is_amiga
Posts: 73
Joined: Sat Dec 08, 2012 7:58 pm

Media Toolbox Partition Size Calculation

Post by my_pc_is_amiga »

For my hard drive, in the "disk geometry" window, block per cylinder is 48 and block size is 512 bytes.

In the "Editing partitions" window, the calculated size for the hard drive does not seem to be correct.
For 4962 cyl., it shows 0.114 GBytes , 116.273 MBytes but...

For 48*512*4962 = 116.297 MBytes and 0.114 GBytes (rounding to the nearest 1000th). The MBytes are off but GBytes calc. is okay -- some kind of rounding is happening that causes the other calculation to be off?
my_pc_is_amiga
Posts: 73
Joined: Sat Dec 08, 2012 7:58 pm

Re: Media Toolbox Partition Size Calculation

Post by my_pc_is_amiga »

Also, I see a negative number in "Total Sectors" for RDB/disk geometry editing window:

-387,938,128

Should be 3,907,029,168 -- so is this an overflow issue?
User avatar
Creols
Posts: 118
Joined: Mon Dec 20, 2010 5:57 pm
Location: Courbevoie, France

Re: Media Toolbox Partition Size Calculation

Post by Creols »

Could you tell us what the total size of your HD is ?
What FS do you intend to choose ?


Creols
AmigaOne XE, µA1, Sam 440ep, Sam Flex 800 MHz, Sam 460 ex, X1000 and more...
my_pc_is_amiga
Posts: 73
Joined: Sat Dec 08, 2012 7:58 pm

Re: Media Toolbox Partition Size Calculation

Post by my_pc_is_amiga »

It is a 2TB Segate ST2000DM S1E1 hardrive with a total of 81396441 cylinders and 512 block size.
My System parition is a 1024 byte SFS2 filesystem block size and my Work partition is a 512 byte SFS2 block size

Something slightly off topic but interesting:
I learned very recently that a kibibyte is 1024 bytes and that a kilobyte is now 1000 bytes (actually has been 1000 bytes since 1998)

http://en.wikipedia.org/wiki/Kibibyte
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 1483
Joined: Wed Mar 09, 2011 1:36 pm
Location: Sydney, Australia

Re: Media Toolbox Partition Size Calculation

Post by tonyw »

48 blocks * 81396441 cylinders = 3907029168 blocks total. That is greater than 2 GB, so it is quite possible that MTB displays it wrongly. Disks of that size did not exist back in the days when MTB was written.

As for the inaccuracies, I agree with your calculations, but I can't explain them.

I'll file a BZ for the wrong "Total Sectors" problem. These days it should be a 64-bit integer.

Although the official kB/kiB meanings changed some time ago, not many people use them. Most are stuck in the kB/MB/GB days (myself included).
cheers
tony
User avatar
Creols
Posts: 118
Joined: Mon Dec 20, 2010 5:57 pm
Location: Courbevoie, France

Re: Media Toolbox Partition Size Calculation

Post by Creols »

my_pc_is_amiga wrote:It is a 2TB Segate ST2000DM S1E1 hardrive with a total of 81396441 cylinders and 512 block size.
My System parition is a 1024 byte SFS2 filesystem block size and my Work partition is a 512 byte SFS2 block size
It's seems to me that SFS\2 file system has to be always 512 blocks.

Usually System partition does not need to be greater than 2 Go. Software must be on a separate partition.


Creols
AmigaOne XE, µA1, Sam 440ep, Sam Flex 800 MHz, Sam 460 ex, X1000 and more...
User avatar
salass00
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 534
Joined: Sat Jun 18, 2011 4:12 pm
Location: Finland
Contact:

Re: Media Toolbox Partition Size Calculation

Post by salass00 »

my_pc_is_amiga wrote:Also, I see a negative number in "Total Sectors" for RDB/disk geometry editing window:

-387,938,128

Should be 3,907,029,168 -- so is this an overflow issue?
3,907,029,168 is -387,938,128 when it is read as a 32-bit signed value (2's complement) so it is most likely a limitation in the GUI element used to display the number.
Post Reply