[Coco] KenTon - determining size of SCSI hard drive? (RGB-DOS HD-UTILS)
Gene Heskett
gheskett at shentel.net
Mon Feb 6 11:38:19 EST 2017
On Monday 06 February 2017 09:29:57 Allen Huffman wrote:
> > On Feb 6, 2017, at 8:24 AM, Robert Gault <robert.gault at att.net>
> > wrote:
> >
> > If all you want to do is determine the formatted size of the OS-9
> > partition on your hard drive, just use Free. Unless you intend to
> > low level format some hard drives, you shouldn't need to know more
> > than is in LSN0 of the OS-9 partition.
>
> But that's only useful if it's previously formatted at the correct
> size. In this case, I don't actually know how many sectors the drive
> has. :-(
>
> > You could always look up the specs on the drive via the Internet.
>
> Good idea. I did, but am only finding "135 MB". And I know that's
> marketing MB, 1000/bytes per.
>
> I know it's really a 128MB, but I don't know exactly how many sectors.
> I did find a few pages on it, including one as recent as 2011, but
> they don't mention sectors.
If talking about 256 byte sectors, and one bit in the fat per sector,
then that limit is in decimal bytes, 131,072,000 IIRC. The maximum size
of the fat is 65536 bytes. At a cluster size of 1, it can represent 8x
that in sectors=524,288 sectors, times 256 to get bytes=134,217,728.
The Maxtor 7120s I ran for 20 years, was just a few sectors short of
that, but they were using a different number base then so they called it
a 120 meg drive. Your figure of $7FFFF when you hit the first error on
the next sector would correspond to that 1 sector per cluster limit
because $00000 is a valid sector, making $7FFFF the last sector you can
reach. My main HD is using a cluster size of 4, and a bit under 500
megs is available to os9 out of a 1 gigabyte drive. The rest is
available to hdbdos as banks of 256 virtual 35 track SS floppies. Thats
41,287,680 bytes per bank of 256 floppies. So presently that drive has
nearly half of it still unused. But by changing the base offset in the
floppy descriptor (ofs,wpc), more banks could be put to use.
When I added a second identical drive, I didn't limit format from doing
the whole drive, so that drive has a whole gigabyte, at a cluster size
of 16 available to os9. That means a file containing "hello coco" , less
than 1 sector long, occupies 16 sectors on the disk. But that file
could have another 15 sectors worth of data appended to it without
taking up any more actual space. And it just works. I wrote a dsave
based backup utility that I've run several times, but it takes a couple
days to run to make a full backup of the first drive to the 2nd. I'd
guess I may have by now, 100 megs of it used.
Not including the vdisks of course since I'm not much of an rsdos user,
I've never backed up quite a pile of 5.25" floppies to vdisks.
> I manually wrote out to 7FFFF sectors, I think, before errors, so I
> guess that's it. It's a few sectors larger than what OS-9 can use, but
> dEd was still able to get that far.
>
> -- Allen
Yup, you hit the end of the fat, Allen.
Scsiquery could tell you its MUCH larger. Someone, Brian I think, told
you what to do to the makefile to get it included in the .dsk images.
That may make them bigger than a 35trkss image though. Accessing
the .dsk thru drivewire, thats not a problem. I have one such file thats
2/3rds full at 10 megabytes. Sneakernet stuff I've downloaded with
linux, and I put it in that drivewire disk to make it instantly
available on my coco3.
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>
More information about the Coco
mailing list