From owner-freebsd-hackers Fri Oct 1 11:58:49 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from panzer.kdm.org (panzer.kdm.org [216.160.178.169]) by hub.freebsd.org (Postfix) with ESMTP id C4DC314C4F for ; Fri, 1 Oct 1999 11:58:43 -0700 (PDT) (envelope-from ken@panzer.kdm.org) Received: (from ken@localhost) by panzer.kdm.org (8.9.3/8.9.1) id MAA41083; Fri, 1 Oct 1999 12:56:57 -0600 (MDT) (envelope-from ken) Message-Id: <199910011856.MAA41083@panzer.kdm.org> Subject: Re: SCSI disk naming problem In-Reply-To: <199910011754.KAA19866@george.lbl.gov> from "jin@george.lbl.gov" at "Oct 1, 1999 10:54:00 am" To: jin@george.lbl.gov Date: Fri, 1 Oct 1999 12:56:57 -0600 (MDT) Cc: narvi@haldjas.folklore.ee, hackers@FreeBSD.ORG From: "Kenneth D. Merry" X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG jin@george.lbl.gov wrote... > > On Fri, 1 Oct 1999 jin@george.lbl.gov wrote: > > > > > Current FreeBSD SCSi disk naming mechanism is problem for using more than > > > one disks in the chain during the disk failure. > > > > > > The problem is that the name is not fixed with is SCSI ID. e.g., > > > if one disk is presented in the chain, regardless its SCSI ID, it is > > > always named "da0"; > > > > > > if two disks are installed, the one with lower ID is named da0 and the > > > other will be named as da1. When the lower ID one is crashed, then the > > > other disk will be named as da0 (from da1) after reboot, and it is not > > > mountable due to the name changing. > > > > > > If a system has a UW SCSI controller with 15 disks in the chain, > > > when the first disk (ID = 0) crashed, all rest 14 disks will be > > > useless until either fstab modified or another disk is added with > > > SCSI ID = 0. > > > > > > Why not we use a fixed name corresponding the SCSI ID. That is, > > > disk with ID 0 will be always named as da0, and disk with ID 1 > > > will be always named da1, etc.? > > > > > > Is there problem with fixed disk naming mechanism? [ ... ] > > See LINT on details of how to wire down scsi devices... > > > > Your proposal doesn't take adding a second scsi card into account. > > Well, I did not mean that has to be da0, da1, etc., but similar thing > like dac0t0d0, dac0t1d0, ... dac3t4d0, etc. which is much clear what > disk is. > A few people does not like this one because the name is long, and it > is like some commerical configuration. They said that this is Free > software. You can pretty easily write a script to create device nodes named whatever you want. As long as the major and minor numbers are correct, you can call what would be /dev/da0a /dev/dac0t0d0a or whatever you like. I think it is possible, however, to come up with a somewhat reasonable naming scheme within the current framework. > Manually wiring down disks is OK for a small set of hosts. 100+ hosts > with two or three controllers with 100 TB disks will be terribly pain > during the setup and maintenance. I would suggest that you come up with a standard naming scheme, and then use it across all of your machines. You could do something like: controller ahc0 controller ahc1 controller ahc2 controller scbus0 at ahc0 controller scbus1 at ahc1 controller scbus2 at ahc2 device da0 at scbus0 target 0 unit 0 device da1 at scbus0 target 1 unit 0 device da2 at scbus0 target 2 unit 0 ... device da14 at scbus0 target 14 unit 0 device da20 at scbus1 target 0 unit 0 device da21 at scbus1 target 1 unit 0 ... device da34 at scbus1 target 14 unit 0 device da40 at scbus2 target 0 unit 0 device da41 at scbus2 target 1 unit 0 ... device da54 at scbus2 target 14 unit 0 If you've got reasonably consistent controller hardware across the machines, you could use one wiring setup like the one above for all the machines. If you have different controller drivers on the different machines, you could probably just elminate the controller<->bus wiring and go from there. You can design a maximal wire-down configuration for your largest machine, and it should just work on smaller machines. For instance, if your large machine has 7 SCSI busses and 15 disks per chain, you could set them up as da0 through da134 or so. The wiring configuration, though, would work even for a machine with one disk. Ken -- Kenneth Merry ken@kdm.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message