Shift ada device numbers?

Trond Endrestøl Trond.Endrestol at fagskolen.gjovik.no
Mon Jun 26 20:30:43 UTC 2017


On Mon, 26 Jun 2017 21:20+0100, Mike Clarke wrote:

> On Mon, 26 Jun 2017 18:31:04 +0200
> Luciano Mannucci <luciano at 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.      |
+-------------------------------+------------------------------------+


More information about the freebsd-questions mailing list