Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Apr 1998 22:31:16 -0600 (MDT)
From:      "Justin T. Gibbs" <gibbs@narnia.plutotech.com>
To:        Chuck Robey <chuckr@glue.umd.edu>
Cc:        scsi@FreeBSD.ORG
Subject:   Re: CAM drivers
Message-ID:  <199804240431.WAA28199@narnia.plutotech.com>
In-Reply-To: <Pine.BSF.3.96.980423200731.334B-100000@localhost>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <Pine.BSF.3.96.980423200731.334B-100000@localhost> you wrote:
> I hope this is the right place to post about the cam stuff ...
> 
> Anyhow, I just went ahead and applied the CAM patches, and booted a CAM
> kernel.  No explosions yet, but some observations here.  Like, the
> instructions to install cam didn't include changing the fstab stuff to
> use the new sdn disk devices instead of the new dan devices, so I
> figured that was the reason that the bootup messsages said sd0, sd1,
> etc.

The major and minor numbers for the da device match those of the sd
device.  The reason the boot messages occassionally specify "sd"
rather than "da" is because of a bunch of tables scattered about
in places like the boot code and various bits of the kernel that
have this string hard coded.  I think I fixed most of these just
after the last snapshot was cut, but in the end, all of these tables
will have to die when DEVFS comes on the scene.  You won't be able
to do a simple lookup from major number to device name.

> After that, I changed my fstab to use the new devices, rebooted,
> and whala!, it *still* used the sdn names in boot.  Uhh, ok, when
> getting ready to post this message, I checked my dmesg, where the
> mountable filesystem stuff showed up as dan, the swap spaces as sdn, and
> I'm pretty sure there were *no* dan messages in the actual onscreen boot
> messages.

You must have gotten something like this, or you wouldn't have booted
at all:

da0 at ahc0 bus 0 target 1 lun 0
da0: <SEAGATE ST32155N 0318> Fixed Direct Access SCSI2 device 
da0: Serial Number 003075630T1G56
da0: 20.0MB/s transfers (20.0MHz, offset 15), Tagged Queueing Enabled
da0: 2049MB (4197405 512 byte sectors: 255H 63S/T 261C)

> It occurs to me, since all the discussions of a complete cutover fromt eh
> old drivers to the new, that I can't understand why there needs to be
> any new name for the disks at all ... can't the sdn names just be
> reused, if the new and old stuff is never going to coexist?

The new name was chosen, not because it wouldn't conflict with the old
name, but because the old name wasn't appropriate.  The da driver deals
with "direct access devices".  In the future, those direct access devices
may be attached via ATAPI, not SCSI, and even today, there are several
devices that respond to this protocol, but are not disks at all.

> One last point ... the initial boot prompt still talked about wd0 or
> sd0.  Make world ain't going to change that one .... so folks better get
> ready for a lot of confused newbie questions, from folks wondering why
> they have to specify a non-existent disk device.

And the same will be true for booting off of a mylex raid adapter or an
IDE cdrom, etc, etc.  You can fix this with a make world and installing
new boot blocks so that the "da" name shows up if it really bothers you.
We should probably ask for the BIOS drive to boot from instead of attempting
to map names onto them, but it is rather hard to determine the mapping
from BIOS drive to FreeBSD device once you're in the kernel.

--
Justin

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-scsi" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199804240431.WAA28199>