From owner-freebsd-questions@freebsd.org Thu Aug 27 11:18:23 2015 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B38869C32C9 for ; Thu, 27 Aug 2015 11:18:23 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3cd3:cd67:fafa:3d78]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.infracaninophile.co.uk", Issuer "infracaninophile.co.uk" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 5B2311A71 for ; Thu, 27 Aug 2015 11:18:23 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from zero-gravitas.local (no-reverse-dns.metronet-uk.com [85.199.232.226] (may be forged)) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.15.2/8.15.2) with ESMTPSA id t7RBICwY082296 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO) for ; Thu, 27 Aug 2015 12:18:12 +0100 (BST) (envelope-from matthew@FreeBSD.org) Authentication-Results: smtp.infracaninophile.co.uk; dmarc=none header.from=FreeBSD.org DKIM-Filter: OpenDKIM Filter v2.10.3 smtp.infracaninophile.co.uk t7RBICwY082296 Authentication-Results: smtp.infracaninophile.co.uk/t7RBICwY082296; dkim=none; dkim-atps=neutral X-Authentication-Warning: lucid-nonsense.infracaninophile.co.uk: Host no-reverse-dns.metronet-uk.com [85.199.232.226] (may be forged) claimed to be zero-gravitas.local Subject: Re: how to assure that a certain device (e.g. /dev/pass1) always is /dev/pass1 on subsequent reboots? To: freebsd-questions@freebsd.org References: <938335435.8523670.1440671907486.JavaMail.zimbra@logitravel.com> From: Matthew Seaman X-Enigmail-Draft-Status: N1110 Message-ID: <55DEF1ED.4040701@FreeBSD.org> Date: Thu, 27 Aug 2015 12:18:05 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <938335435.8523670.1440671907486.JavaMail.zimbra@logitravel.com> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="KwmPcHPNcBkK4RGPUx4IEpWtCv5niantA" X-Virus-Scanned: clamav-milter 0.98.7 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on lucid-nonsense.infracaninophile.co.uk X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Aug 2015 11:18:23 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --KwmPcHPNcBkK4RGPUx4IEpWtCv5niantA Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 2015/08/27 11:38, Raimund Sacherer wrote: > I need to make sure that certain devices always have their > corresponding device names (like /dev/pass1) assigned. I need this for > auto changers in our backup server (but not only there). >=20 > I have vastly more linux knowledge and there you can for example > create udev rules which rename the device to what you need. What is > the equivalent way on FreeBSD? Loader hints? You probably don't need to worry about this: for permanently wired peripherals, the device names will generally be stable across reboots. For something like an autochanger -- given they're always plugged into the system and you can assume they're powered on -- then the devices will be numbered in the order the kernel probes for them at boot. That's repeatable: so long as you aren't changing connections you can be satisfied that /dev/pass1 will refer to the same device before and after a reboot. However, if you do need it: For SCSI / SAS / SATA devices see: device.hints(5) https://www.freebsd.org/doc/handbook/device-hints.html To obtain the bus, device, etc. parameters you'll need, see: camcontrol(8) Otherwise, if your devices are connected via USB, then: devd(8) usbcontrol(8) USB device mappings etc. are assumed to change at run time, as devices are plugged in and out, and may not even be present at boot, which makes it tricky to ensure the same physical device always gets the same device number. For your requirement to work, the devices would have to be permanently wired into the system. Cheers, Matthew --KwmPcHPNcBkK4RGPUx4IEpWtCv5niantA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQJ8BAEBCgBmBQJV3vH0XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQxOUYxNTRFQ0JGMTEyRTUwNTQ0RTNGMzAw MDUxM0YxMEUwQTlFNEU3AAoJEABRPxDgqeTna8sP/j/NCGcrXRu68kHEXO/rQdHZ eTKYtPyWvxcZa9wQZn3xf4g0bh7/y4cTSpVPy9hGbDF6Jcy8xLRZHewCZsT2zifx oCX6nuK8t8l7HiYeQh6nI4SOEkTjWAtYu8Qgc3Y1A32QOII9AP0NC2BUJIEvClAh EtZbDpCxQfANUDlXWxecI7uHbVvM4wdKaHfTq60Zh1oiSpmKb/BX5YMyNHyGLAja 11kHTv9aw6mnwu5a0lmwevjLlNlnaSmZXqjxONXi+3zpXfsgvbI293xfkYVZWyTO 51U0FHNS5Mj3R37SHmPY1EGwsG2EKZpaNyubLTPI9dVdftcJqsGRCwzkkX3pBoJB egoaumQD4HjODMXaEtaIOH21vUUNeNB2+o7VMPn2cxeJA0+yuYUHe0PDxccqXd9w l/t/ZS3/26JrxlYapqSw5NGlSLxW9ZkISvoHmRtaUp+z5Dbcy1Lqm1/3nvg3tMId SKN70LXB9cGEDchlIgwaC6PKFjXE29TdWdJnp7HRFJDXf4KyY3fWd+++HiM1M5FS QL0cAsDjIytF3jTAmahUsUQ4LOkJE+vCe5vD7jqa4MOguQ2FtosC31McrG9wh+VO tCCkBJkq8fVICal0kF/SW2k8pAk644Va7FVsAjjRbOPT6gGTbcX+PG+CBKikmjHO nxMkT4OPSRr5KhKfvC90 =yXyI -----END PGP SIGNATURE----- --KwmPcHPNcBkK4RGPUx4IEpWtCv5niantA--