I have a number of hard drives lying around, and I’d like to know what their size is without having to plug them in. There’s just too many of them.
Anyway, most don’t have their size written on them, but have the cylinders / heads / sectors listed out. Can I use these to figure out the size of the drive in MB without any other info?
I don’t know if it’s possible to determine the size from the cylinder/head/sector data, but what I’ve done is to simply search Google for the brand and model drive. One of the results is often the specifications page on the manufacturer’s website. Or you might try going to Maxtor, Seagate, or whoever’s website directly and looking for specifications for older products.
Used to be you could calculate the number of available bytes by Heads x Cylinders x Sectors x 512 for IDE drives. I don’t know if that’s the case with newer drives today, but I bet someone around here does.
It’s still true, but the drive controller often does some translating in the middle so that the head cyl and sector don’t necessarily translate to the true head, cyl, and sector being used physically on the drive. Many drives have multiple different configurations that they allow. Some of the configurations are specifically to get around BIOS limitations and such, and if you calculate out how much data you get with that particular head/cyl/sector you may find that it’s actually less than other configurations. This would mean that there are unused physical sectors on the disk in that case.
Programs that try and be spiffy and minimize the movement of the heads and such by organizing things in particular sectors don’t necessarily get better performance on a modern drive, due to the actual movement of the head not necessarily corresponding to the head and cylinder being requested and the fact that the data is often held in large caches on the drive as well.
Update: Not any more. Extract from (just one example) Seagate ST380811AS [80 GB SATA] data sheet:
Bytes per sector 512
Default sectors per track 63
Default read/write heads 16
Default cylinders 16,383
…if you multiply those numbers together you get a little over a tenth of the stated 80 GB capacity. All rather confusing - I think you have to just go with the flow and hope for the best now.
Anyway, modern drives use logical block addressing instead of CHS to addresss sectors, similar to how early PCs used segmented memory addresses while they now use a flat linear memory space; that is, to address sector #1,000,000, you just send that sector number to the drive, which then converts it to the proper coordinates (the drive still uses internal CHS addressing). If provided, CHS numbers are just to satisfy the BIOS by putting some numbers in; the computer knows that the drive actually has more capacity.
Also, newer drives are now using a 4,096 byte sector format, both due to the ability to use better error correction (which is needed pretty much all the time; modern hard drives aren’t possible without error correction) and address more capacity with the same number of sectors (which are limited by the controller, leading to problems with high capacity drives in older computers, which can’t use the full capacity).