Welcome, Guest. Please login or register.

Author Topic: Max hard drive size?  (Read 28517 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline johnklos

  • Full Member
  • ***
  • Join Date: Feb 2010
  • Posts: 190
    • Show all replies
Re: Max hard drive size?
« on: January 02, 2011, 07:54:37 PM »
Both IDE and SCSI can only directly handle 2^32 (or 4 billion) sectors, which is 2 terabytes (or 2,199,023,255,552 bytes).

Both IDE and SCSI are extensible, so they technically can talk to drives which are larger, but if the chips don't directly support the larger sizes, then the CPU must do all the work of preparing and sending commands which ask for sectors beyond the 32 bit boundary, which means it's possible but slower.

When it comes to the Amiga's IDE, the CPU already does all the work, so it wouldn't be any slower, but someone would have to update the IDE drivers.

I've personally run 2 TB drives on both the Amiga's IDE and on the CyberStorm PPC SCSI under NetBSD. I don't have any 3 TB drives yet, but when I get one I'll pop one in and see how it works.
« Last Edit: January 02, 2011, 07:57:35 PM by johnklos »
 

Offline johnklos

  • Full Member
  • ***
  • Join Date: Feb 2010
  • Posts: 190
    • Show all replies
Re: Max hard drive size?
« Reply #1 on: January 02, 2011, 09:25:22 PM »
Quote from: ChaosLord;603438
No.  It depends how big the sectors are.

My apologies that I didn't put a sufficient number of "generally" disclaimers. You know what I mean - drives with sector sizes other than 512 bytes are exceedingly rare, plus the new drives which have 4k sectors start up in a mode where they deliver 512 byte sectors by default, plus since there are no native SCSI devices larger than 2 TB and SCSI to IDE or SATA adapters have not been updated yet to support 4k sectors, and since the IDE bus on the Amiga can't support sector sizes for hard drives other than 512 bytes without modifying drivers, the answer is still the same - 2TB.
 

Offline johnklos

  • Full Member
  • ***
  • Join Date: Feb 2010
  • Posts: 190
    • Show all replies
Re: Max hard drive size?
« Reply #2 on: January 03, 2011, 01:00:57 AM »
Quote from: xerces8;603477
Where does the 2 TB limit come from? trackdisk64 with 64 bit addressing should be able to handle more. Or SCSI direct.  Just wondering....


It comes from using a 32 bit value to count sectors (2^32 times 512 bytes per sector).
 

Offline johnklos

  • Full Member
  • ***
  • Join Date: Feb 2010
  • Posts: 190
    • Show all replies
Re: Max hard drive size?
« Reply #3 on: January 03, 2011, 09:24:29 AM »
Quote from: freqmax
Btw, SCSI read can handle 64-bit sector addressing.


Well, yes and no. Unless the ROMs in the later Amiga 4000T and A4091 were explicitly updated, SCSI on the Amiga would mean the WDC 33C93 chip which came on the A590, A2091, and Amiga 3000. This chip didn't support 16 byte commands, so it didn't support READ 16 or WRITE 16.

Quote from: xerces8;603527
By whom?
trackdisk64 does not count sectors.
RDB uses like 3x32 bits.
SCSI can handle loads of sectors, ATA also.
And SFS can also handle more.
So where does the limit come from?


The limitation comes from the fact that the size of the LBA (logical block addressing) fields supported by the most common SCSI chips in Amigas is 32 bits.

IDE is another issue. Since the Amiga doesn't have an IDE chip to speak of (all the work is done by the CPU), it's possible to support arbitrarily large IDE drives, but the ROMs definitely don't support booting anything beyond the first bit of a drive (how far? 2 gigs? 4 gigs? 8 gigs? 128 gigs?) While AmigaOS can't use space beyond 128 gigs on the IDE bus (I've tried), NetBSD has no limits:

Code: [Select]
wd0 at atabus0 drive 0: <ST32000542AS>
wd0: drive supports 16-sector PIO transfers, LBA48 addressing
wd0: 1863 GB, 3876021 cyl, 16 head, 63 sec, 512 bytes/sect x 3907029168 sectors
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133)

Get someone to update the IDE code, and you're all set!
 

Offline johnklos

  • Full Member
  • ***
  • Join Date: Feb 2010
  • Posts: 190
    • Show all replies
Re: Max hard drive size?
« Reply #4 on: January 03, 2011, 05:58:12 PM »
Quote from: xerces8;603565
These two contradict. (at least partly).  :confused:

No, they don't contradict. They state different reasons for the same thing. I can't say that I know enough about trackdisk64 and NSD, but it's perfectly reasonable to think that they don't necessarily support more than 2^32 blocks. The 64 bitness is certainly a reference to complete drive size in bytes.

It's entirely possible that both reasons are valid and true.
 

Offline johnklos

  • Full Member
  • ***
  • Join Date: Feb 2010
  • Posts: 190
    • Show all replies
Re: Max hard drive size?
« Reply #5 on: January 03, 2011, 07:25:12 PM »
Quote from: Selles;603572
Why do you guys need such large hard drives on an Amiga computer? Is it ego?


I can't speak for others, but I had a 2 TB drive in my Amiga 4000 because I use my Amiga to maintain backups of various sites, such as:

archive.info-mac.org
debian.lcs.mit.edu
ftp.apple.asimov.net
ftp.mayn.de
metalab.unc.edu
sunsite.unc.edu
http://www.aux-penelope.com

My A4000 is also an active Aminet mirror (us3.aminet.net).

Granted, my usage isn't typical, but it is interesting to learn the limits of older hardware as it helps inform the future. The fact that SCSI could support 2 TB drives back in the day when a large hard drive was 40 megabytes is pretty amazing.

There is such a concept as "enough". The 2 TB drive in my A4000 started showing issues after just a year of use, so I put it on the IDE bus and bought a hardware mirroring enclosure which has two 500 gig SATA laptop drives. With all of the archives in place, I'm using only 70% of the 500 gigs, so did I really need a 2 TB drive? No. Is it good to know that 2 TB drives will work? Certainly.
 

Offline johnklos

  • Full Member
  • ***
  • Join Date: Feb 2010
  • Posts: 190
    • Show all replies
Re: Max hard drive size?
« Reply #6 on: January 05, 2011, 10:45:51 PM »
Quote from: KatManDEW;604089
I jumped through all kinds of hoops two years ago and I can't get my A2000 or A1200 to use more than 4 gig. My A2000 uses a GVP 040 with SCSI, and my A1200 uses IDE.


You have to manually enter meaningful cylinders, sectors per track, tracks per cylinder, and sectors per cylinder numbers into HDToolBox yourself most of the time.

Franko: Perhaps you'd be willing to contribute a tiny bit of your technical experience to help get the FastATA supported under NetBSD?
http://mail-index.NetBSD.org/port-amiga/2011/01/03/msg007507.html
 

Offline johnklos

  • Full Member
  • ***
  • Join Date: Feb 2010
  • Posts: 190
    • Show all replies
Re: Max hard drive size?
« Reply #7 on: January 06, 2011, 12:54:58 AM »
Quote from: Franko;604135
I'd be happy to help if I can but don't have a clue what NetBSD is... :(

NetBSD is a free Unix operating system from Berkeley (the school). It's based off of 4.4BSD and its lineage goes back to the beginning of Unix in the 1970s:

http://en.wikipedia.org/wiki/Bsd

I think RadosĂ…aw just needs some pointers about general setup of the FastATA and about interrupt handling versus polling, et cetera. Please take a look at the link and if you have some ideas, just shoot an email off to port-amiga@netbsd.org.

Thanks!
« Last Edit: January 06, 2011, 12:56:55 AM by johnklos »
 

Offline johnklos

  • Full Member
  • ***
  • Join Date: Feb 2010
  • Posts: 190
    • Show all replies
Re: Max hard drive size?
« Reply #8 on: January 07, 2011, 07:39:15 AM »
Quote from: KatManDEW;604179
Can you give me some quick tips on that? I have a 50 gig SCSI drive in my A2000 and a 20 gig IDE drive in my A1200.


In NetBSD is a program called factor which helps, but you can do it manually if you like. Let's take the 50 gig drive as an example. I used to have a ton of Seagate full height 3.5" 50 gig hard drives like the ST150176LC or LW, so your might be similar. This model has 97,693,755 total sectors. Factoring that we get:

97693755: 3 5 6512917

That doesn't break down nicely, so let's round down a bit. Let's try:

97693750: 2 5 5 5 5 5 7 7 11 29

So now we can create some numbers for sectors per track, tracks per cylinder, et cetera. A good general guideline is to have less than 10,000 tracks. I'll just take:

5 * 5 * 11 * 29 = 7975 cylinders

That leaves us with 12250 sectors per cylinder which we can break down as:

5 * 5 * 7 = 175 sectors per track and 2 * 5 * 7 = 70 tracks per cylinder.

In summary:
7975 cylinders
175 sectors per track
70 tracks per cylinder
12250 sectors per cylinder

As long as the total number of sectors doesn't exceed the total size of the drive, you're good to go.