From owner-freebsd-stable@FreeBSD.ORG Fri Jan 22 09:01:26 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 9F9A5106566B for ; Fri, 22 Jan 2010 09:01:26 +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 1EBA78FC16 for ; Fri, 22 Jan 2010 09:01:25 +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 o0M912G3025464; Fri, 22 Jan 2010 10:01:02 +0100 (CET) (envelope-from byshenknet@core.byshenk.net) Received: (from byshenknet@localhost) by core.byshenk.net (8.14.3/8.14.3/Submit) id o0M9122P025463; Fri, 22 Jan 2010 10:01:02 +0100 (CET) (envelope-from byshenknet) Date: Fri, 22 Jan 2010 10:01:02 +0100 From: Greg Byshenk To: Dan Langille Message-ID: <20100122090102.GF2910@core.byshenk.net> References: <4B58FE0B.3010001@langille.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B58FE0B.3010001@langille.org> 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:01:26 -0000 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" [...] -- greg byshenk - gbyshenk@byshenk.net - Leiden, NL