Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Aug 2015 12:18:05 +0100
From:      Matthew Seaman <matthew@FreeBSD.org>
To:        freebsd-questions@freebsd.org
Subject:   Re: how to assure that a certain device (e.g. /dev/pass1) always is /dev/pass1 on subsequent reboots?
Message-ID:  <55DEF1ED.4040701@FreeBSD.org>
In-Reply-To: <938335435.8523670.1440671907486.JavaMail.zimbra@logitravel.com>
References:  <938335435.8523670.1440671907486.JavaMail.zimbra@logitravel.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?55DEF1ED.4040701>