Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Jun 2017 22:30:16 +0200 (CEST)
From:      =?ISO-8859-1?Q?Trond_Endrest=F8l?= <Trond.Endrestol@fagskolen.gjovik.no>
To:        Mike Clarke <jmc-freebsd2@milibyte.co.uk>
Cc:        Luciano Mannucci <luciano@vespaperitivo.it>, freebsd-questions@freebsd.org
Subject:   Re: Shift ada device numbers?
Message-ID:  <alpine.BSF.2.21.1706262228480.37790@mail.fig.ol.no>
In-Reply-To: <20170626212056.38499777@curlew>
References:  <3wxF144QMTzRRqQ@baobab.bilink.it> <20170626212056.38499777@curlew>

next in thread | previous in thread | raw e-mail | index | archive | help
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 move
> > the SSD disk to another SATA controller it becomes ada0 and the members
> > 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 import
> -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 long
> time ago and I might not have remembered the exact procedure correctly
> 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.html

I too recommend some form of labels, be it GPT, UFS, or glabel.

-- 
+-------------------------------+------------------------------------+
| Vennlig hilsen,               | Best regards,                      |
| Trond Endrestøl,              | Trond Endrestøl,                   |
| IT-ansvarlig,                 | System administrator,              |
| Fagskolen Innlandet,          | Gjøvik Technical College, Norway,  |
| tlf. mob.   952 62 567,       | Cellular...: +47 952 62 567,       |
| sentralbord 61 14 54 00.      | Switchboard: +47 61 14 54 00.      |
+-------------------------------+------------------------------------+
From owner-freebsd-questions@freebsd.org  Mon Jun 26 23:02:26 2017
Return-Path: <owner-freebsd-questions@freebsd.org>
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 46391D93CC6
 for <freebsd-questions@mailman.ysv.freebsd.org>;
 Mon, 26 Jun 2017 23:02:26 +0000 (UTC)
 (envelope-from matthew@FreeBSD.org)
Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk
 [81.2.117.100])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client CN "smtp.infracaninophile.co.uk",
 Issuer "infracaninophile.co.uk" (not verified))
 by mx1.freebsd.org (Postfix) with ESMTPS id 771DB6E293
 for <freebsd-questions@freebsd.org>; Mon, 26 Jun 2017 23:02:24 +0000 (UTC)
 (envelope-from matthew@FreeBSD.org)
Received: from liminal.local (unknown
 [IPv6:2001:8b0:151:1:1c1d:86a1:a200:b700])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (No client certificate requested)
 (Authenticated sender: m.seaman@infracaninophile.co.uk)
 by smtp.infracaninophile.co.uk (Postfix) with ESMTPSA id 4C1C0CB4A
 for <freebsd-questions@freebsd.org>; Mon, 26 Jun 2017 23:02:03 +0000 (UTC)
Authentication-Results: smtp.infracaninophile.co.uk;
 dmarc=none header.from=FreeBSD.org
Authentication-Results: smtp.infracaninophile.co.uk/4C1C0CB4A; dkim=none;
 dkim-atps=neutral
Subject: Re: Shift ada device numbers?
To: freebsd-questions@freebsd.org
References: <3wxF144QMTzRRqQ@baobab.bilink.it> <20170626212056.38499777@curlew>
 <alpine.BSF.2.21.1706262228480.37790@mail.fig.ol.no>
From: Matthew Seaman <matthew@FreeBSD.org>
Message-ID: <d30c6f6b-48e8-e12a-ae52-36086fac9495@FreeBSD.org>
Date: Tue, 27 Jun 2017 00:01:47 +0100
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0)
 Gecko/20100101 Thunderbird/52.2.1
MIME-Version: 1.0
In-Reply-To: <alpine.BSF.2.21.1706262228480.37790@mail.fig.ol.no>
Content-Type: multipart/signed; micalg=pgp-sha512;
 protocol="application/pgp-signature";
 boundary="fbMeS41kcqSITAh2aB4NQh8jJjv7nMPmb"
X-BeenThere: freebsd-questions@freebsd.org
X-Mailman-Version: 2.1.23
Precedence: list
List-Id: User questions <freebsd-questions.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-questions>, 
 <mailto:freebsd-questions-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-questions/>;
List-Post: <mailto:freebsd-questions@freebsd.org>
List-Help: <mailto:freebsd-questions-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-questions>, 
 <mailto:freebsd-questions-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 26 Jun 2017 23:02:26 -0000

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--fbMeS41kcqSITAh2aB4NQh8jJjv7nMPmb
Content-Type: multipart/mixed; boundary="wrSKGNtNEj2W9jfB3DdO37viSJrRFLFAl";
 protected-headers="v1"
From: Matthew Seaman <matthew@FreeBSD.org>
To: freebsd-questions@freebsd.org
Message-ID: <d30c6f6b-48e8-e12a-ae52-36086fac9495@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>
In-Reply-To: <alpine.BSF.2.21.1706262228480.37790@mail.fig.ol.no>

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

On 26/06/2017 21:30, Trond Endrest=C3=B8l wrote:
> On Mon, 26 Jun 2017 21:20+0100, Mike Clarke wrote:
>=20
>> 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 mov=
e
>>> the SSD disk to another SATA controller it becomes ada0 and the membe=
rs
>>> 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 impo=
rt
>> -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 lon=
g
>> time ago and I might not have remembered the exact procedure correctly=

>> 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.
>=20
> Maybe this is what the OP is looking for:
>=20
> https://lists.freebsd.org/pipermail/freebsd-stable/2013-January/071851.=
html
>=20
> 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 devices'=


See cam(4) and device.hints(5) -- search for this:

   hint.device.unit.property=3D"value"

in cam(4).  device.hints(5) is mostly used for legacy ISA stuff, but you
can use it to control which of your drives is da0, da1 or da2.

	Cheers,

	Matthew


--wrSKGNtNEj2W9jfB3DdO37viSJrRFLFAl--

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

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

iQJ8BAEBCgBmBQJZUZJbXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NTNBNjhCOTEzQTRFNkNGM0UxRTEzMjZC
QjIzQUY1MThFMUE0MDEzAAoJELsjr1GOGkATQT4P/1CgI2EGLUVtLu9kF7Qa8QOK
JNczuKifTDgemFifDA5JLHNw2/9nAI61rC/YAb6WIJTmzoZEthhfkFpTujkmGzfA
evyxTOaXa/ygPyKuSNShcQxoC08idicvBJ0DSaN6MrYW/rZKLdTCW1ytBmPd5Ntf
+H6jonGQMFW0SiGt1eP8XG7+sKkP4LcZZVvFl7qvsN8SazgLsb5TwoJKHH1bjJad
R0UeWPZ9wBNkw/bupmZu9uafzWib/iyMucY/TPYu/vSJPLxcO5uTXSTKNLl6sB7v
2GYCL+q8XuElk+pMlCtnP0DAz3R0FEVt5NdDvJihgPv++mOXhyrGIlZoqGEM3ge6
s5733Hm0ut+6sixLAfnfe1xxTDKXt3hk+mnYoRVZ0+/8tE2awl8cfKhmQs/9zhLb
G9QI1QOtmJTmsMkvD/qn6qwwm8SAnhwxEK9mk1b0EqjOIcOdlyNELJIJ7viAIs1h
6m2WRNf87z2VexAUIaWEXwdo3GbHJAiaFwhM2+Ie+I+p4CkKLJ5njDNr2L8Xvw2h
NxPnIXQf6ePHPd8+rSxLjpJbB9iqVHUsbpm0iv2ktkmMMQIJau1KHwlSH4pXbsRx
1Z5GI4bVCvVI76+aTsKgFb+1u7spMNsyGn+ABqvsTqNedbBnR/PeM+oWElx3a2a2
doLllfZBmALhFSAq+iXB
=L7gt
-----END PGP SIGNATURE-----

--fbMeS41kcqSITAh2aB4NQh8jJjv7nMPmb--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.21.1706262228480.37790>