From owner-freebsd-fs@FreeBSD.ORG Sat Mar 26 13:52:20 2011 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4C131065675 for ; Sat, 26 Mar 2011 13:52:20 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 5D5FC8FC0C for ; Sat, 26 Mar 2011 13:52:19 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p2QDqBtZ098895 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 26 Mar 2011 15:52:11 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id p2QDqBGi059825; Sat, 26 Mar 2011 15:52:11 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id p2QDqBRm059824; Sat, 26 Mar 2011 15:52:11 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 26 Mar 2011 15:52:11 +0200 From: Kostik Belousov To: Bruce Evans Message-ID: <20110326135211.GB78089@deviant.kiev.zoral.com.ua> References: <20110326003818.GT78089@deviant.kiev.zoral.com.ua> <20110327000956.U1316@besplex.bde.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LsLZkRs1u+fwC9y3" Content-Disposition: inline In-Reply-To: <20110327000956.U1316@besplex.bde.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: freebsd-fs@freebsd.org Subject: Re: tying down adaX to physical interfaces X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Mar 2011 13:52:20 -0000 --LsLZkRs1u+fwC9y3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Mar 27, 2011 at 12:24:03AM +1100, Bruce Evans wrote: > On Sat, 26 Mar 2011, Kostik Belousov wrote: >=20 > >On Fri, Mar 25, 2011 at 05:21:50PM -0700, Michael DeMan wrote: > >>Hi All, > >> > >>I seem to recall that there is a way to do this, but can no longer goog= le=20 > >>it. > >> > >>Basically, for NCQ support with SATA devices we are using the 'ada'=20 > >>driver, which of course has SCSI like behavior. > >>... > >I use the following stanza in /boot/device.hints for machine with intel > >on-board ahci and siis in pcie: > >hint.scbus.0.at=3D"ahcich0" > >hint.ada.0.at=3D"scbus0" > >hint.scbus.1.at=3D"ahcich1" > >hint.ada.1.at=3D"scbus1" > >hint.scbus.2.at=3D"ahcich2" > >hint.ada.2.at=3D"scbus2" > >hint.scbus.3.at=3D"ahcich3" > >hint.ada.3.at=3D"scbus3" > >hint.scbus.4.at=3D"ahcich4" > >hint.ada.4.at=3D"scbus4" > >hint.scbus.5.at=3D"siisch0" > >hint.ada.5.at=3D"scbus5" > >hint.scbus.6.at=3D"siisch1" > >hint.ada.6.at=3D"scbus6" >=20 > To hijack this thread a little, I'll ask how people handle removable media > changing the addresses of non-removable media. I use the following to > prevent USB drives stealing da0 from my 1 real SCSI disk on 1 machine: >=20 > hint.scbus.0.at=3D"sym0" > hint.da.0.at=3D"scbus0" >=20 > This works OK and is easy to manage with only 1 SCSI disk. But 1 of my > USB drives also steals cd0 from a not-so-real ATAPI drive under atapicam, > depending on whether the USB drive is present at boot time: >=20 > USB drive not present at boot time: > ad* (no SCSI disks on this machine) > cd0 =3D acd0 (but no further ATAPI drives on this machine) > insert USB drive: > da1 (da0 was reserved by above) > cd1 (phantom ATAPI drive on the USB drive. Accessing this hangs > parts of the ata system but it doesn't get used since various > places only point cd0) >=20 > USB drive present at boot time: > ad* > da1 on USB > cd0 phantom on USB > cd1 =3D acd[0 or 1] (normal cd0). Accessing cd0 now hangs parts of = the > ata system and this happens too easily since various places point > to cd0. >=20 > How do people defend agains random USB drives present or not at boot time? Wouldn't it be cd0 on scbusX on ahciY, and cd1 on scbusZ on umass-simT ? I believe similar hints would wire the cd0/cd1 in your case. >=20 > Bruce --LsLZkRs1u+fwC9y3 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk2N74oACgkQC3+MBN1Mb4hi1QCgw/ObHcf5p7Xh8+m+gBWZx02x Lh8AoPRvGEZ+L5QDNypkUCSVAyVLac0T =O+Z3 -----END PGP SIGNATURE----- --LsLZkRs1u+fwC9y3--