Is there a standard way you can calculate the LBA number from
Cylinders, Sectors, and Heads of a disk?
For instance, how could you do it for this disk:
Data Heads - 4.
Number of Disks - 2.
Logical Configuration Heads - 16.
Cylinders - 16,383.
User Sectors/Track at zone 0 - 63.
Logical Blocks (LBA) - 195,371,568.
> Is there a standard way you can calculate the LBA number from
> Cylinders, Sectors, and Heads of a disk?
>
> For instance, how could you do it for this disk:
>
> Data Heads - 4.
> Number of Disks - 2.
> Logical Configuration Heads - 16.
> Cylinders - 16,383.
> User Sectors/Track at zone 0 - 63.
> Logical Blocks (LBA) - 195,371,568.
>
> Thank you.
>
Data Heads - 4.
Number of Disks - 2.
*Logical Configuration Heads - 16.
*Cylinders - 16,383.
*User Sectors/Track at zone 0 - 63.
Logical Blocks (LBA) - 195,371,568.
You cannot calculate an LBA number from above figures.
Those CHS figures (marked *) are read from the disk (by an IDENTIFY
DEVICE command) to calculate a default capacity (below 8GB) while
starting from the disk and have nothing to do with LBA.
16heads * 16383cylinders * 64sectors = 16776192sectors
There 2 sectors in each KB, 1024 KB's in each MB
16776192sectors/2*1024 --> 8192.5MB
You can't calculate the LBA number easily, even if you have more info,
cylinders may have a different number of sectors on them.
> Is there a standard way you can calculate the LBA number
> from Cylinders, Sectors, and Heads of a disk?
Nope, because the Cylinders, Sectors, and Heads
arent real numbers, they are faked up. With all
modern drives the number of sectors per track
varys in bands of cylinders across the platter surface.
> For instance, how could you do it for this disk:
> Data Heads - 4.
> Number of Disks - 2.
Those two are real numbers.
> Logical Configuration Heads - 16.
That one isnt, which is why the word logical is used.
> Cylinders - 16,383.
> User Sectors/Track at zone 0 - 63.
That is saying that the sectors per track varys
in bands/zones across the platter surface.
> Logical Blocks (LBA) - 195,371,568.
That number is real, but doesnt help with the CHS value each corresponds to.
"Eric P." wrote:
> mike7411@gmail.com wrote:
>
>> Is there a standard way you can calculate the LBA number from
>> Cylinders, Sectors, and Heads of a disk?
>>
.... snip ...
> >
> Data Heads - 4.
> Number of Disks - 2.
> *Logical Configuration Heads - 16.
> *Cylinders - 16,383.
> *User Sectors/Track at zone 0 - 63.
> Logical Blocks (LBA) - 195,371,568.
>
> You cannot calculate an LBA number from above figures.
> Those CHS figures (marked *) are read from the disk (by an IDENTIFY
> DEVICE command) to calculate a default capacity (below 8GB) while
> starting from the disk and have nothing to do with LBA.
>
> 16heads * 16383cylinders * 64sectors = 16776192sectors
> There 2 sectors in each KB, 1024 KB's in each MB
> 16776192sectors/2*1024 --> 8192.5MB
>
> You can't calculate the LBA number easily, even if you have more info,
> cylinders may have a different number of sectors on them.
Because there is no such thing these days as a count of sectors per
cylinder, or anything else. All that is required is that the LBA
number uniquely identify a sector. That sector may be widely
separated from the adjacent numbered sector, because of such things
as bad sector replacement. Modern disks tend to have more sectors
on the outer edges than on the inner, thus maintaining constant
data density.
--
Chuck F (cbfalconer@yahoo.com) (cbfalconer@maineline.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE maineline address!
Eric P. wrote:
> mike7411@gmail.com wrote:
>
> > Is there a standard way you can calculate the LBA number from
> > Cylinders, Sectors, and Heads of a disk?
> >
> > For instance, how could you do it for this disk:
> >
> > Data Heads - 4.
> > Number of Disks - 2.
> > Logical Configuration Heads - 16.
> > Cylinders - 16,383.
> > User Sectors/Track at zone 0 - 63.
> > Logical Blocks (LBA) - 195,371,568.
> >
> > Thank you.
> >
> Data Heads - 4.
> Number of Disks - 2.
> *Logical Configuration Heads - 16.
> *Cylinders - 16,383.
> *User Sectors/Track at zone 0 - 63.
> Logical Blocks (LBA) - 195,371,568.
>
> You cannot calculate an LBA number from above figures.
> Those CHS figures (marked *) are read from the disk (by an IDENTIFY
> DEVICE command) to calculate a default capacity (below 8GB) while
> starting from the disk and have nothing to do with LBA.
>
> 16heads * 16383cylinders * 64sectors = 16776192sectors
> There 2 sectors in each KB, 1024 KB's in each MB
> 16776192sectors/2*1024 --> 8192.5MB
>
> You can't calculate the LBA number easily, even if you have more info,
> cylinders may have a different number of sectors on them.
One of the ways to tell that a drive uses LBA is it always has the
magic number 16,383 as cylinders. If it's not that number, you can get
close to the actual size of the drive in megabytes in 98% of the cases
by dividing the number of cylinders by 2.
Most drives above 8GB use LBA instead of CHS.
You can also rougly calculate Gigabytes by dividing the Max LBA by 2
million.
Your drive is near 100GB. It might even say 100GB on it. It's actually
93GB.
Do you calculate the number of bytes on the drive by multiplying the
LBA by 512?
Are all drives standardized to 512 bytes per LBA?
Thank you.
paulmd@efn.org wrote:
> Eric P. wrote:
> > mike7411@gmail.com wrote:
> >
> > > Is there a standard way you can calculate the LBA number from
> > > Cylinders, Sectors, and Heads of a disk?
> > >
> > > For instance, how could you do it for this disk:
> > >
> > > Data Heads - 4.
> > > Number of Disks - 2.
> > > Logical Configuration Heads - 16.
> > > Cylinders - 16,383.
> > > User Sectors/Track at zone 0 - 63.
> > > Logical Blocks (LBA) - 195,371,568.
> > >
> > > Thank you.
> > >
> > Data Heads - 4.
> > Number of Disks - 2.
> > *Logical Configuration Heads - 16.
> > *Cylinders - 16,383.
> > *User Sectors/Track at zone 0 - 63.
> > Logical Blocks (LBA) - 195,371,568.
> >
> > You cannot calculate an LBA number from above figures.
> > Those CHS figures (marked *) are read from the disk (by an IDENTIFY
> > DEVICE command) to calculate a default capacity (below 8GB) while
> > starting from the disk and have nothing to do with LBA.
> >
> > 16heads * 16383cylinders * 64sectors = 16776192sectors
> > There 2 sectors in each KB, 1024 KB's in each MB
> > 16776192sectors/2*1024 --> 8192.5MB
> >
> > You can't calculate the LBA number easily, even if you have more info,
> > cylinders may have a different number of sectors on them.
>
> One of the ways to tell that a drive uses LBA is it always has the
> magic number 16,383 as cylinders. If it's not that number, you can get
> close to the actual size of the drive in megabytes in 98% of the cases
> by dividing the number of cylinders by 2.
>
> Most drives above 8GB use LBA instead of CHS.
>
> You can also rougly calculate Gigabytes by dividing the Max LBA by 2
> million.
>
>
> Your drive is near 100GB. It might even say 100GB on it. It's actually
> 93GB.
> Do you calculate the number of bytes on
> the drive by multiplying the LBA by 512?
Yes.
> Are all drives standardized to 512 bytes per LBA?
Not quite all, some scsi drives can be
formatted with different sized sectors.
> paulmd@efn.org wrote:
>> Eric P. wrote:
>>> mike7411@gmail.com wrote:
>>>
>>>> Is there a standard way you can calculate the LBA number from
>>>> Cylinders, Sectors, and Heads of a disk?
>>>>
>>>> For instance, how could you do it for this disk:
>>>>
>>>> Data Heads - 4.
>>>> Number of Disks - 2.
>>>> Logical Configuration Heads - 16.
>>>> Cylinders - 16,383.
>>>> User Sectors/Track at zone 0 - 63.
>>>> Logical Blocks (LBA) - 195,371,568.
>>>>
>>>> Thank you.
>>>>
>>> Data Heads - 4.
>>> Number of Disks - 2.
>>> *Logical Configuration Heads - 16.
>>> *Cylinders - 16,383.
>>> *User Sectors/Track at zone 0 - 63.
>>> Logical Blocks (LBA) - 195,371,568.
>>>
>>> You cannot calculate an LBA number from above figures.
>>> Those CHS figures (marked *) are read from the disk (by an IDENTIFY
>>> DEVICE command) to calculate a default capacity (below 8GB) while
>>> starting from the disk and have nothing to do with LBA.
>>>
>>> 16heads * 16383cylinders * 64sectors = 16776192sectors
>>> There 2 sectors in each KB, 1024 KB's in each MB
>>> 16776192sectors/2*1024 --> 8192.5MB
>>>
>>> You can't calculate the LBA number easily, even if you have more
>>> info, cylinders may have a different number of sectors on them.
>>
>> One of the ways to tell that a drive uses LBA is it always has the
>> magic number 16,383 as cylinders. If it's not that number, you can
>> get close to the actual size of the drive in megabytes in 98% of the
>> cases by dividing the number of cylinders by 2.
>>
>> Most drives above 8GB use LBA instead of CHS.
>>
>> You can also rougly calculate Gigabytes by dividing the Max LBA by 2
>> million.
>>
>>
>> Your drive is near 100GB. It might even say 100GB on it. It's
>> actually 93GB.