*BSD News Article 54511


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!lll-winken.llnl.gov!sol.ctr.columbia.edu!ctr4m.ctr.columbia.edu!wpaul
From: wpaul@ctr.columbia.edu (Bill Paul)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Second SCSI disk
Date: 5 Nov 1995 17:16:53 GMT
Organization: Columbia University Center for Telecommunications Research
Lines: 68
Message-ID: <47iri5$8g8@sol.ctr.columbia.edu>
References: <47gtv0$5s8@titan.ci.ua.pt>
NNTP-Posting-Host: ctr4m.ctr.columbia.edu
X-Newsreader: TIN [version 1.2 PL2]

Daring to challenge the will of the almighty Leviam00se,
Fernando Cozinheiro (cooker@ci.ua.pt) had the courage to say:

: I'm trying to install a new  (second)  SCSI disk on our FreeBSD  system,
: but I  don't  know  exactly  how to do it,  because  I  can't  find  any
: appropriate documentation.

Hah. Real sysadmins don't need no steenkeeng documentation.

Well, not usually.

: - I have one SCSI  controler  (Adaptec  AHA2940) and I've setup the disk
:   using an SCSI ID not in use.  If I choose 5 for example,  what are the
:   name of the devices:  sd0s5x?

Why don't you just try it and watch the probe messages from the kernel
when it boots? It'll _TELL_ you what devide it thinks it is.

What happens with the GENERIC kernel is that the SCSI code assigns
disks in the other in which it detects them. This means that the
first SCSI disk it finds (possibly target 0) will be called sd0,
the second sd1, the third sd2, and so forth.

What you're doing is confusing slice numbers with unit numbers.
sd0s5a is SCSI Disk 0, Slice 5, partition a. This slice business
is an attempt to coexist with MS-DOS and other OSes that need
to think in terms of DOS-style disk partitions. If the only OS on
your machine is FreeBSD, then forget about the slices entirely
and just use the standard device naming convention (sd0a, sd0b, sd0c,
sd1a, sd1b, sd1c, etc...).

I can't imaging why anyone would want anything besides FreeBSD on
their system in the first place. :)

: - I've used this  phylosophy,  but when I try to do "newfs  /dev/sd0s5c"
:   the system answers with "newfs:  /dev/sd0s5c:  Device not configured".
:   Do I need to recompile the kernel.

Not unless you want to. As I said, just plug the disk in and WATCH
WHAT THE KERNEL TELLS YOU. And don't forget: you can't newfs the disk
until you've labeled and partitioned it.

If you want to override the kernel's automatic allocation of SCSI
disk numbers, then you can 'wire down' device assignments to specific
targets on specific controllers using the syntax shown in /sys/i386/conf/LINT.

You did read the /sys/i386/conf/LINT file to see how it's done, didn't
you? No? Well now's your chance.

Basically, you van say things like:

controller scbus0 at ahb0 /* for ah1542 controller -- substitute as needed */
disk sd1 at scbus0 target 1 unit 0
disk sd5 at scbus0 target 5 unit 0

This is the way you configure SCSI devices in SunOS.

-Bill

--
=============================================================================
-Bill Paul            (212) 854-6020 | System Manager
Work:         wpaul@ctr.columbia.edu | Center for Telecommunications Research
Home:  wpaul@skynet.ctr.columbia.edu | Columbia University, New York City
=============================================================================
License error: The license for this .sig file has expired. You must obtain
a new license key before any more witty phrases will appear in this space.
=============================================================================