Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!uwm.edu!bionet!agate!ziploc!eps From: eps@toaster.SFSU.EDU (Eric P. Scott) Newsgroups: comp.sys.next Subject: Re: SR2.0 BuildDisk vs SR2.1BuildDisk Message-ID: <1490@toaster.SFSU.EDU> Date: 23 Apr 91 04:04:05 GMT References: <009472C9.1FEB89E0@UAVAX0.CCIT.ARIZONA.EDU> Reply-To: eps@cs.SFSU.EDU (Eric P. Scott) Organization: San Francisco State University Lines: 100 NeXT cleaned out /etc/disktab in 2.1--all the SCSI disks that were listed in 2.0 are GONE. Only the OD description remains. The "disk" utility is supposed to be able to figure out what the disk geometry is, and create a maximally-sized partition. The -p option (new with 2.1) causes two partitions to be created, with -p's argument being the number of blocks to allocate to the root (a) partition; the remainder will be assigned to the clients (b) partition. No, this does not appear on the man page. Another annoyance: unless you use a disktab entry, the disk will be marked for automount=yes, which may provoke a serious security problem later (guess how we found THAT out). As for the original question, part of the mystery surrounds this comment in the 1.0 disktab: # NOTE: Drives that use "cylinder-oriented sparing" do not have # simple values for sectors and tracks, since not all tracks have # the same number of available sectors. Therefore, the tracks and # sectors in these entries don't match the physical device, but are # chosen so that their product exactly matches the number of USABLE # sectors per cylinder. The slight lie about physical sectors/track # is covered up by tuning the file system rotational latency parameter # appropriately. Here's a "real-world" example: We purchased a Fujitsu M2266SA (it should have been a M2266SB, but we let ourselves be talked into it because our supplier was able to get us this more quickly, and we reformatted it to 1024 byte sectors--if you're thinking of getting one of these drives, by all means order the SB version instead!). Here's what scsimodes displays: SCSI information for /dev/rsd1a Drive type: FUJITSU M2266S-1024 1024 bytes per sector 45 sectors per track 15 tracks per cylinder 1658 cylinder per volume (including spare cylinders) 3 spare sectors per cylinder 15 alternate tracks per volume 1113503 usable sectors on volume So the "raw" geometry is 1658 cylinders * (45 sectors/track * 15 tracks/cylinder) = 1658 cylinders * 675 sectors/cylinder = 1119150 sectors But that doesn't agree with The Bottom Line. Let's take a closer look at those numbers. The 15 alternate tracks at 15 tracks per cylinder add up to one complete cylinder, so there are only 1657 usable cylinders. With 3 spare sectors per cylinder, there are only 672 sectors left--what's 1657*672? 1113504. Why does scsimodes show one less? I think it's an error; if you do scsimodes -v that number turns up as "last logical block"--*not* the number of blocks (which does show as 1113504). So how many blocks are available for filesystem use? 1113344. You have to figure in the 160 blocks for the front porch too. I'll leave the rest of the math as an exercise for the reader. We purchased a NeXTstation with internal 400MB drive for use as a NetBoot server (per NeXT's recommendation, it has 32MB of parity RAM, and yes, it really needs it). 400MB is *barely* enough for what needs to be on the root (including swap space!)--so /clients and /Users both need to be on the external Fujitsu. Here's the partitioning: +-------------+-----------------+ | front porch |(pad to full cyl)| +-------------+-----------------+ | (a) /clients 190MB available | +-------------------------------+ | (b) /Users 763MB available | +-------------------------------+ And here's the disktab entry: # FUJITSU M2266S with 3 spare sectors/cyl and 1024 byte sectors # # 'a' partition on M2266S is intended for NetBoot client private trees # If not supporting NetBoot clients, it may be mounted as desired. M2266S-1024|FUJITSU M2266S-1024|FUJITSU M2266S-1024 w/1024 byte sectors:\ :ty=fixed_rw_scsi:nc#1657:nt#16:ns#42:ss#1024:rm#3600:\ :fp#160:bp#0:ng#0:gs#0:ga#0:ao#0:\ :os=sdmach:z0#32:z1#96:ro=b:\ :pa#512:sa#219744:ba#8192:fa#1024:ca#20:da#8192:ra#10:oa=time:\ :ia:ta=4.3BSD:\ :pb#220256:sb#893088:bb#8192:fb#1024:cb#15:db#4096:rb#10:ob=time:\ :ib:tb=4.3BSD: The numbers were chosen to roughly parallel what a Maxtor XT-8760S-1024 would deliver in a "traditional" cube configuration. mkfs complained when we didn't make things an integral number of cylinders. -=EPS=-