From owner-freebsd-stable@FreeBSD.ORG Fri Jan 22 09:09:24 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D928B10656A4 for ; Fri, 22 Jan 2010 09:09:24 +0000 (UTC) (envelope-from byshenknet@byshenk.net) Received: from core.byshenk.net (core.byshenk.net [62.58.73.230]) by mx1.freebsd.org (Postfix) with ESMTP id 574A68FC13 for ; Fri, 22 Jan 2010 09:09:23 +0000 (UTC) Received: from core.byshenk.net (localhost [127.0.0.1]) by core.byshenk.net (8.14.3/8.14.3) with ESMTP id o0M990da025624; Fri, 22 Jan 2010 10:09:00 +0100 (CET) (envelope-from byshenknet@core.byshenk.net) Received: (from byshenknet@localhost) by core.byshenk.net (8.14.3/8.14.3/Submit) id o0M990Mp025623; Fri, 22 Jan 2010 10:09:00 +0100 (CET) (envelope-from byshenknet) Date: Fri, 22 Jan 2010 10:09:00 +0100 From: Greg Byshenk To: Dan Langille Message-ID: <20100122090900.GG2910@core.byshenk.net> References: <4B58FE0B.3010001@langille.org> <20100122090102.GF2910@core.byshenk.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100122090102.GF2910@core.byshenk.net> User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=1.9 required=5.0 tests=ALL_TRUSTED, FH_DATE_PAST_20XX autolearn=no version=3.2.5 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on core.byshenk.net Cc: FreeBSD Stable Subject: Re: device.hints isn't setting what I want X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2010 09:09:25 -0000 On Fri, Jan 22, 2010 at 10:01:02AM +0100, Greg Byshenk wrote: > On Thu, Jan 21, 2010 at 08:23:23PM -0500, Dan Langille wrote: > > First, see also my post: do I want ch0 or pass1? > > > > I have an external tape library and an external tape drive. They are > > not always powered up. My goal: always get the same devices regardless > > of whether or not the tape library is powered on at boot. > > > > After booting, with the tape library powered on, I have these devices: > > > > # camcontrol devlist > > at scbus0 target 5 lun 0 (sa0,pass0) > > at scbus1 target 0 lun 0 (ch0,pass1) > > at scbus1 target 5 lun 0 (sa1,pass2) > > at scbus2 target 0 lun 0 (cd0,pass3) > > at scbus5 target 0 lun 0 (da0,pass4) > > > > In /boot/devices, I have added these entries: > > > > hint.scbus.1.at="ahc0" > > hint.scbus.0.at="ahc1" > > hint.scbus.2.at="acd0" > > hint.scbus.5.at="umass0" > > I think that this is wrong. > > I had a similar issue (multiple tape drives and changer devices that > needed to stay at the same ids). > > Your device.hints entries should look something like this: > > hint.sa.0.at="scbus0" > hint.sa.0.target="5" > hint.sa.0.unit="0" > hint.sa.1.at="scbus0" > hint.sa.1.target="3" > hint.sa.1.unit="0" > hint.sa.2.at="scbus0" > hint.sa.2.target="1" > hint.sa.2.unit="0" > hint.ch.0.at="scbus0" > hint.ch.0.target="4" > hint.ch.0.unit="0" > hint.ch.1.at="scbus0" > hint.ch.1.target="2" > hint.ch.1.unit="0" > hint.ch.2.at="scbus0" > hint.ch.2.target="0" > hint.ch.2.unit="0" > > Which I use to get this: > > # camcontrol devlist > at scbus0 target 0 lun 0 (pass0,ch2) > at scbus0 target 1 lun 0 (sa2,pass1) > at scbus0 target 2 lun 0 (pass2,ch1) > at scbus0 target 3 lun 0 (sa1,pass3) > # > > (Currently the first changer is not powered up.) > > > So I think that what you want is something like: > > hint.sa.0.at="scbus0" > hint.sa.0.target="5" > hint.sa.0.unit="0" > hint.sa.1.at="scbus1" > hint.sa.1.target="5" > hint.sa.1.unit="0" > hint.ch.0.at="scbus1" > hint.ch.0.target="0" > hint.ch.0.unit="0" > [...] Just saw your second message. I don't know if you can wire down 'pass?' the same way, but if you can, I would assume that you need to set it the same way as the 'sa?' and other devices. That is, if you want: > > at scbus0 target 5 lun 0 (sa0,pass0) Then the device.hints entry would look like: hint.pass.0.at="scbus0" hint.pass.0.target="5" hint.pass.0.unit="0" (If you can do that.) -greg -- greg byshenk - gbyshenk@byshenk.net - Leiden, NL