Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Jun 2017 09:06:59 +0100
From:      Matthew Seaman <matthew@FreeBSD.org>
To:        freebsd-questions@freebsd.org
Subject:   Re: Shift ada device numbers?
Message-ID:  <b965e993-b900-432e-efad-d563a164f5aa@FreeBSD.org>
In-Reply-To: <d30c6f6b-48e8-e12a-ae52-36086fac9495@FreeBSD.org>
References:  <3wxF144QMTzRRqQ@baobab.bilink.it> <20170626212056.38499777@curlew> <alpine.BSF.2.21.1706262228480.37790@mail.fig.ol.no> <d30c6f6b-48e8-e12a-ae52-36086fac9495@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--IPTGsXrrMHIn9AHqhDPMeaKXeL3MNQlqS
Content-Type: multipart/mixed; boundary="k631deehffcGJHFoH0fcRpch4wBmHU8Hb";
 protected-headers="v1"
From: Matthew Seaman <matthew@FreeBSD.org>
To: freebsd-questions@freebsd.org
Message-ID: <b965e993-b900-432e-efad-d563a164f5aa@FreeBSD.org>
Subject: Re: Shift ada device numbers?
References: <3wxF144QMTzRRqQ@baobab.bilink.it>
 <20170626212056.38499777@curlew>
 <alpine.BSF.2.21.1706262228480.37790@mail.fig.ol.no>
 <d30c6f6b-48e8-e12a-ae52-36086fac9495@FreeBSD.org>
In-Reply-To: <d30c6f6b-48e8-e12a-ae52-36086fac9495@FreeBSD.org>

--k631deehffcGJHFoH0fcRpch4wBmHU8Hb
Content-Type: text/plain; charset=utf-8
Content-Language: en-GB
Content-Transfer-Encoding: quoted-printable

On 27/06/2017 00:01, Matthew Seaman wrote:
> On 26/06/2017 21:30, Trond Endrest=C3=B8l wrote:
>> On Mon, 26 Jun 2017 21:20+0100, Mike Clarke wrote:
>>
>>> On Mon, 26 Jun 2017 18:31:04 +0200
>>> Luciano Mannucci <luciano@vespaperitivo.it> wrote:
>>>
>>>> I have a FreeBSD 10.3 RELEASE machine whith root on zfs on two discs=

>>>> and a "standalone" SSD holding database data. I noticed that if I mo=
ve
>>>> the SSD disk to another SATA controller it becomes ada0 and the memb=
ers
>>>> of the zfs are shifted to ada1 and ada2, and the system doesn't work=
:
>>>> in fact it stops at boot because I've put the swap on the ssd and it=

>>>> can't find it anymore.
>>>>
>>>> Is there a way to control whichnumbers are assigned to the disks at
>>>> boot time?
>>>
>>> Some of the responses in https://forums.freebsd.org/threads/36571/
>>> might help. In particular the suggestion at the end to use "zpool imp=
ort
>>> -d /dev poolname" to re-scan /dev to locate the devices.
>>>
>>> If your disk uses GPT partitions you could avoid this problem in the
>>> future by using gpart to add a label to each partition and then using=

>>> "zpool import -d /dev/gpt". This worked for me but it was rather a lo=
ng
>>> time ago and I might not have remembered the exact procedure correctl=
y
>>> so do make sure you have reliable backups before attempting to make
>>> changes like this.
>>>
>>> It may be possible to do something similar for MBR partitions but I'm=

>>> not sure if it's possible to safely assign a label to a live ZFS
>>> partition on a MBR disk.
>>
>> Maybe this is what the OP is looking for:
>>
>> https://lists.freebsd.org/pipermail/freebsd-stable/2013-January/071851=
=2Ehtml
>>
>> I too recommend some form of labels, be it GPT, UFS, or glabel.
>>
>=20
> The term the OP is looking for is 'wired devices' or 'wired down device=
s'
>=20
> See cam(4) and device.hints(5) -- search for this:
>=20
>    hint.device.unit.property=3D"value"
>=20
> in cam(4).  device.hints(5) is mostly used for legacy ISA stuff, but yo=
u
> can use it to control which of your drives is da0, da1 or da2.

Although on reflection, the best way to handle this problem is by using
gpart to label the devices and then using /dev/gpart/labelname as the
device name in /etc/fstab

	Cheers,

	Matthew



--k631deehffcGJHFoH0fcRpch4wBmHU8Hb--

--IPTGsXrrMHIn9AHqhDPMeaKXeL3MNQlqS
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQJ8BAEBCgBmBQJZUhIjXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NTNBNjhCOTEzQTRFNkNGM0UxRTEzMjZC
QjIzQUY1MThFMUE0MDEzAAoJELsjr1GOGkATQ4MP/0NCvI1XSh+LfTNtOn/+mEXX
O6z/W0iPWtwS+Ts27xAqdL+fCCUKHABXxWnHwoJe6F5RDez7GvPxFGFVzpiYtbnn
mGQ3Hst3rJJ+YKi0teANR5mrJS44hKSEGAqMkHoIAerY6XYMgOEN7ih1IHziKm/p
/e/uq0OhNBxL/4vT9WaIbtqM1NSBVYoouTk8F+2+yJ1/iYiVCADKEbs2pR9LSWje
edeS3dDsx/dfH3EcoC5DtfLGARiIDLsDR7pBekJjuSujvOWtWNPfaot7PqYC8iNq
+fTKVxVPU2SR8qbOiwCLwDItQ+o9jumSHWfejqo4/C2XzZOkqY76D1z6OYcz7AUr
YX6eJtEoqGrrOMMC2XO9ZiZNHXefcxqbXCecBH8tTTSgx/RAUj2iWR+Jf/7Hb2iV
6K/Fwhtp7RheVo5zL1Y7bN4crBmzPCLAP+iRKBiWR7UxAQ+9WmMDTMUueNadvvIT
laiqvHCpSZfUZT3YfMk7qVsk7eJ9pQBgua+dLTgUmnipnoyVvv7YTgdYrWvBT5hH
JU30kn26XZ31t4zFsEBrfBu5wD/o7TFdYqU5dgVCyisFKaLNhRuvF5jl7o4gn2Sg
3lzuMvDjh+Z6w5sKQqv2uRH1uI5HXfFDO7Ts2qfCWsE4Ui4/zdumDi8rLlRvXmHW
cU+KDYrJgtLCtWSB/8CD
=lxF3
-----END PGP SIGNATURE-----

--IPTGsXrrMHIn9AHqhDPMeaKXeL3MNQlqS--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b965e993-b900-432e-efad-d563a164f5aa>