SUMMARY: SCSI disk questions

From: Daryl Crandall (daryl@oceanus.mitre.org)
Date: Fri May 31 1991 - 13:17:08 CDT


Sun-Managers

Here is the summary to my question about SCSI disks. I've gotten all
my new disks running but two of them had to be scaled back somewhat to
accomodate a limitation.

These are quotes and paraphrases from numerous resopondents. The information
may be inappropriate for other situations. The situation is complex and
will need judicious interpretation. Not all questions were answered to my
satisfaction but I must move on.

        Daryl Crandall
        The Mitre Corporation
        daryl@mitre.org

############################################################################
ORIGINAL QUESTION:

I admit my ignorance of SCSI disks having worked primarily with SMD disks
for quite a while. I have a few questions.

I've just received two new types of SCSI disks that are not included in
the Sun format.dat file and I'd like to have a few pointers to the correct
portions of the manuals that speak of these matters.

This may be a question with an RTFM answer, but I don't remember seeing the answer in any manual I've read. How can one determine which type of SCSI
controller is being used by various types of Suns?

What are the consequences of declaring a disk under the wrong SCSI controller
type in the format.dat file?

Is it common for a vendor to ship SCSI disks that are formatted but don't have
the defect list showup when first examined?

What are the pitfalls of using the new large SCSI disks ( >1Gb )?

We have Sun3/50, 3/60, 3/110, 3/180, 4/20, SPARCstation1, SPARCstation2,
4/110, 4/260, 4/280, 4/390 systems. Are there any of these systems that
will not support the large SCSI disks under SunOS-4.1.1?

The two new disk types I've received are HP97549TF and Micropolis 1598-15,
do either of these have any known problems with any of the Sun4's mentioned
above?

I would appreciate receiving working format.dat entries for these disks.
I do have the basic manuals for these disks so some of the information
can be, (and has been) gleaned from them.

My usual policy is to scrap the format provided by the vendor, then verify the defect list against the paper copy and completely reformat, analyze overnight and re-partition any new disks before using them, but I feel on shaky ground until I learn a little more about these SCSI beasts.

The following is a result of trying to format the Micropolis 1598-15 without
a valid format.dat entry on a Sun4/390 under SunOS-4.1.1:

        format> format
        Ready to format. Formatting cannot be interrupted
        and takes 16 minutes (estimated). Continue? y
        Beginning format. The current time is Tue May 14 18:12:23 1991
 
        PAGE 1: retries= 16 (8)
        PAGE 2: inactivity limit= 40 (0)
        Warning: Using default drive geometry.

        PAGE 4: cylinders= 1908 (1921) heads= 16 (16)
        PAGE 3: trk skew= 14 (14) cyl skew= 18 (18) sects/trk= 64 (64)
        trks/zone= 1 (1) alt trks= 16 (112) alt sects/zone= 1 (1)
        Warning: Using default mode select parameters.
        Warning: Drive format may not be correct.

        Formatting...done
 
        Verifying media...
                pass 0 - pattern = 0x7be9c1bd
           1905/15/60
         .
        .
        .
 
        Total of 0 defective blocks repaired.

Can any body tell me how serious the "Warning"s above are?

Any good books to recommend?

        Daryl Crandall
        The Mitre Corporation
        daryl@mitre.org
        (703) 883-7278
##############################################################################
SUMMARY:

I've just received two new types of SCSI disks that are not included in
the Sun format.dat file and I'd like to have a few pointers to the correct
portions of the manuals that speak of these matters.

        man 4 sd

        "System and Network Administration" pp 249, 273

This may be a question with an RTFM answer, but I don't remember seeing the answer in any manual I've read. How can one determine which type of SCSI
controller is being used by various types of Suns?

        examine /var/adm/messages for lines similar to this:

                vmunix: si0 at vme24d16 0x200000 vec 0x40

        Then examine man page for 'sd' which is summarized here:

    CONFIG - SUN-3, SUN-3x, and SUN-4 SYSTEMS
        controller si0 at vme24d16 ? csr 0x200000 priority 2 vector siintr 0x40
        controller si1 at obio ? csr 0x140000 priority 2

        controller sc0 at vme24d16 ? csr 0x200000 priority 2 vector scintr 0x40

        The first two controller lines above specify the first and
        second SCSI host adapters for Sun-3, Sun-3x, and Sun-4 VME
        systems. The third controller line specifies the first and
        only SCSI host adapter on Sun-3/50 and Sun-3/60 systems.

        The next configuration block, following si0 and si1 above,
        describes the configuration for the older sc0 host adapter.
        It uses the same configuration description as the si0 host adapter.

    CONFIG - SPARCsystem 330 and SUN-3/80 SYSTEMS
        controller sm0 at obio ? csr 0xfa000000 priority 2

        The SPARCsystem 330 and Sun-3/80 use an on-board SCSI host
        adapter, sm0. It follows the same rules as described above
        for the Sun-3, Sun-3x, and Sun-4 section.

    CONFIG - SUN-4/110 SYSTEM
        controller sw0 at obio 2 csr 0xa000000 priority 2

        The Sun-4/110 uses an on-board SCSI host adapter, sw0. It
        follows the same rules as described above for the Sun-3, and
        Sun-4 section.

    CONFIG - SUN-3/E SYSTEM
        controller se0 at vme24d16 ? csr 0x300000 priority 2 vector se_intr 0x40

        The Sun-3/E uses a VME-based SCSI host adapter, se0. It
        follows the same rules as described above for the Sun-3 and
        Sun-4 section.

    CONFIG - Sun386i
        controller wds0 at obmem ? csr 0xFB000000 dmachan 7 irq 16 priority 2

        The Sun386i configuration follows the same rules described
        above under the Sun-3 and Sun-4 configuration section. con-
        figuration section.

    CONFIG - Desktop SPARCsystems
        device-driver esp
        scsibus0 at esp

        The Desktop SPARCsystem configuration files specify a device
        driver (esp), and a SCSI bus attached to that device driver,
        and then disks on that SCSI bus at the SCSI Target and Logi-
        cal Unit addresses are specified.

What are the consequences of declaring a disk under the wrong SCSI controller
type in the format.dat file?

        "Probably won't work!"

        "These days just about everything uses the emulex MD21 entry"

        With SCSI disks the controller field refers to disk's controller
        not the CPU's SCSI controller. Disks did not used to have SCSI
        controllers they had ST4096 or ESDI interfaces and a SCSI controller
        provided the translation. The SCSI controller talked SCSI to the Sun
        and the appropriate protocol to the disk. Before the advent of
        non-embedded controllers Sun used the Adaptec ACB4000 and the
        Emulex MD21.

        Almost all embedded SCSI disks have controllers that are
        compatible with the Emulex MD21. Check your disk manual.

        
Is it common for a vendor to ship SCSI disks that are formatted but don't have
the defect list showup when first examined?

        Not common but possible. Of the four disks I received recently
        two were formatted without defect list. The original manufacturer's
        defect list can be extracted from the disk using format and should be
        'commit'ed before doing a format.

What are the pitfalls of using the new large SCSI disks ( >1Gb )?

        Sun's SCSI drivers have not been through QC to determine their
        robustness when using disks larger than ~669Mb. Several people
        reported, however, that they are using >1GB disk quite nicely.

        The 'si' SCSI controller is limited by a 21 bit field to contain the
        sector number which limits disk formatting size to ~1.2Gb sector
        numbers larger than 21 bits will wrap around to the beginning of
        the disk and clobber the information at the front of the disk.

        I don't know about the other types of SCSI controllers.

> Bug Id: 1045071
> Release summary: 4.1.1-beta2
> Synopsis: sd: does not scan past 1 GB when using format utility
> Description:
> The scsa sd driver cannot correctly scan past 1 GB to support
> 1.4 GB SCSI disks when used under format.
> (It works correctly for block, normal, and uscsi I/O.)
>
> I have attached the patch.
>
> The impact of this problem is that format will appear to run
> correctly. It will not can past 1 GB. However, normal vmunix
> operation is unimpaired so you can use these big drives.
>
> There is one problem...DO NOT REPAIR A BLOCK using format.
> When format writes the sun defect list back it will clobber
> any data in the lower 1 GB area of the disk.
> Work around:
> Backup the g and h partitions before reassigning blocks on disks
> bigger than 1 GB and restore the partitions afterwards.
>
>
> ==================================================
> The following shell script patches a 4.1.1 sd.o or a vmunix
> image to fix this problem:
>
> #!/bin/sh
> echo 'sd_maptouscsi+98?W a1366015
> +?W ae940017
> +?W 2800003
> +?W e016c000
> +?W a0142020
> +?W e036c000
> +?W 30800016' | adb -w $1
> # End shell script
>
>
> This generates the code:
>
> _sd_maptouscsi+0x98: srl %i1, 0x15, %l0
> _sd_maptouscsi+0x9c: orcc %l0, %l7, %l7
> _sd_maptouscsi+0xa0: be _sd_maptouscsi + 0xac
> _sd_maptouscsi+0xa4: lduh [%i3], %l0
> _sd_maptouscsi+0xa8: or %l0, 0x20, %l0
> _sd_maptouscsi+0xac: sth %l0, [%i3]
> _sd_maptouscsi+0xb0: ba,a _sd_maptouscsi + 0x108
>
> Which, translated to C, is, effectively,
> if (blkno >> 21) {
> g1 = (not zero)
> dcom->dkc_cmd |= SCMD_GROUPT1;
> }
>
> This then replaces the normally unused code for debug printouts
>
> DPRINTF_IOCTL(devp, "special %s",
> (dcom->dkc_cmd == SCMD_READ) ? "read" : "write");
>
> Public Summary:
> The g and h partitions should be backed up before repairing blocks
> on disks bigger than 1 GB when using format because data may
> be inadvertantly corrupted when the Sun defect list is written
> back (to the wrong) place on the disk.
>
> For disks smaller than 1 GB, this is not a problem.

We have Sun3/50, 3/60, 3/110, 3/180, 4/20, SPARCstation1, SPARCstation2,
4/110, 4/260, 4/280, 4/390 systems. Are there any of these systems that
will not support the large SCSI disks under SunOS-4.1.1?

        WORK, BUT NOT 100%
        4/280 with Sun's SCSI-3 controller (si)

        
        WORK OK
        1.6GB drives (Wren 8's) on a SS2 under SunOS 4.1.1

        Micropolis 1598 on a spacstation 1+ (4/65)

The two new disk types I've received are HP97549TF and Micropolis 1598-15,
do either of these have any known problems with any of the Sun4's mentioned
above?

        I formatted the HP97549TF on a Sun4/390 (sm controller) without
        problem. The disk is now mounted on a Sun4/60 (SS1) and running
        without problems so far.

        The Micropolis 1598-15 on a 4/280 (si controller) couldn't format
        properly beyond 1896 cylinders.

I would appreciate receiving working format.dat entries for these disks.
I do have the basic manuals for these disks so some of the information
can be, (and has been) gleaned from them.

        
#disk_type = "Micropolis 1598-15" \
# : ctlr = MD21 : fmt_time = 5 : cache = 0x10: trks_zone = 15 \
# : ncyl = 1919 : acyl = 2 : pcyl = 1928 : nhead = 15 : nsect = 70 \
# : rpm = 3600 : bpt = 41664 : asect = 5 : atrks = 30
#
# NOTE: This entry uses only 1895 cylinders instead of 1928 because of a
# limitation in the Sun SCSI-3 controller driver 'si' which cannot
# format more than about 1.2GB due to a 21 bit field restriction
# - daryl -
disk_type = "1.2Gb Micropolis 1598-15" \
        : ctlr = MD21 : fmt_time = 5 : cache = 0x10: trks_zone = 15 \
        : ncyl = 1878 : acyl = 2 : pcyl = 1895 : nhead = 15 : nsect = 70 \
        : rpm = 3600 : bpt = 41664 : asect = 5 : atrks = 30

 disk_type = "HP 97549T" \
         : ctlr = MD21 : fmt_time = 4 \
         : ncyl = 1906 : acyl = 2 : pcyl = 1908 : nhead = 16 : nsect = 64 \
         : rpm = 4002 : bpt = 38350

Any good books to recommend?

        "TFM"

        "the SCSI spec from ANSI"

        Emulex MD21 spec.

        NCR 5380 SBC chip manual.

        NCR 53C90 and 53C90A chip manuals.

##############################################################################
Thanks to:

tony@cosc.canterbury.ac.nz
RBEBB@USC.PPPL.GOV
dcornwel@community-chest.mitre.org (Donna Cornwell)
tgsmith@East.Sun.COM (Timothy G. Smith - Technical Consultant Sun Baltimore)
todd@flex.eng.mcmaster.ca
randy@ncbi.nlm.nih.gov (Rand S. Huntzinger)
"...the 'cutting edge' of technology..." <DHOLAKIA@intellicorp.com>
bit!markm@decwrl.dec.com (Mark Morrissey)
claude@genethon.genethon.fr (Claude Scarpelli)
"Michael S. Maiten" <msm@energetic.com>
Kevin Sheehan {Consulting Poster Child} <sundev!ronin!kevin@sun.com>



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:06:14 CDT