From owner-freebsd-questions@freebsd.org Mon Jun 26 20:19:47 2017 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 E13EED90BEF for ; Mon, 26 Jun 2017 20:19:47 +0000 (UTC) (envelope-from jmc-freebsd2@milibyte.co.uk) Received: from smarthost01d.mail.zen.net.uk (smarthost01d.mail.zen.net.uk [212.23.1.7]) by mx1.freebsd.org (Postfix) with ESMTP id A78C164315 for ; Mon, 26 Jun 2017 20:19:47 +0000 (UTC) (envelope-from jmc-freebsd2@milibyte.co.uk) Received: from [82.71.56.121] (helo=curlew.milibyte.co.uk) by smarthost01d.mail.zen.net.uk with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1dPaU5-0003dv-1i; Mon, 26 Jun 2017 20:19:45 +0000 Received: from [192.168.1.13] (helo=curlew) by curlew.milibyte.co.uk with esmtp (Exim 4.89) (envelope-from ) id 1dPaVE-0001ro-SZ; Mon, 26 Jun 2017 21:20:59 +0100 Date: Mon, 26 Jun 2017 21:20:56 +0100 From: Mike Clarke To: Luciano Mannucci Cc: freebsd-questions@freebsd.org Message-ID: <20170626212056.38499777@curlew> In-Reply-To: <3wxF144QMTzRRqQ@baobab.bilink.it> References: <3wxF144QMTzRRqQ@baobab.bilink.it> X-Mailer: Claws Mail 3.15.0 (GTK+ 2.24.31; amd64-portbld-freebsd11.0) MIME-Version: 1.0 X-SA-Exim-Connect-IP: 192.168.1.13 X-SA-Exim-Mail-From: jmc-freebsd2@milibyte.co.uk X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on curlew.lan X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.1 Subject: Re: Shift ada device numbers? Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SA-Exim-Version: 4.2 X-SA-Exim-Scanned: Yes (on curlew.milibyte.co.uk) X-Originating-smarthost01d-IP: [82.71.56.121] Feedback-ID: 82.71.56.121 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 20:19:48 -0000 On Mon, 26 Jun 2017 18:31:04 +0200 Luciano Mannucci 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. -- Mike Clarke