Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Sep 2010 09:10:22 -0700
From:      Freddie Cash <fjwcash@gmail.com>
To:        freebsd-stable@freebsd.org
Subject:   Re: How to predict drive number change for 7.3->8.1 upgrade?
Message-ID:  <AANLkTinCiDX2zfeM74BonLe3Ndq44jOz1Tj4mPJScUfm@mail.gmail.com>
In-Reply-To: <201009171238.o8HCcwCl084727@lurza.secnetix.de>
References:  <y9l7himgit9.fsf@deinprogramm.de> <201009171238.o8HCcwCl084727@lurza.secnetix.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Sep 17, 2010 at 5:38 AM, Oliver Fromme <olli@lurza.secnetix.de> wro=
te:
> Michael Sperber <sperber@deinprogramm.de> wrote:
> =C2=A0> I just upgraded my desktop system from 7.3 to 8.1, and the main h=
ard
> =C2=A0> drive, which was /dev/ad6 before is now /dev/ad10. =C2=A0Conseque=
ntly, the
> =C2=A0> initial boot failed when trying to mount the root file system fro=
m ad6.
> =C2=A0>
> =C2=A0> The desktop system is now fixed, but I also have a rented server =
with
> =C2=A0> only a serial console, and I worry that the upgrade is going to l=
eave me
> =C2=A0> with a dead machine. =C2=A0Is there any way to predict how the dr=
ive number
> =C2=A0> changes? =C2=A0(Why does it change at all?) =C2=A0If so, what's t=
he proper way to
> =C2=A0> tell the system the initial root device *before* rebooting?
>
> Remove "options ATA_STATIC_ID" from your kernel config
> before building the new kernel and rebooting. =C2=A0Then your
> first disk will be ad0, no matter what controller and
> channel it is connected to. =C2=A0Be sure to update your
> /etc/fstab file.

Problem with doing that (no ATA_STATIC_ID) is that if you change the
order that your PCI devices are enumerated, you will change the order
in which your disks are probed, and all your numbers change again.  :)
 And there's an option for this in every BIOS I've worked with.  Plus,
moving addon controllers from one slot to another will also re-number
your devices.

The best, long-term, solution is to label your devices/filesystems so
that the name never changes, no matter what happsn to the underlying
device nodes.  There are multiple ways to do so, depending on whether
you want to label the disk, the slice, the partition, or the
filesystem:
  - glabe;
  - gpart labels
  - filesystem labels

--=20
Freddie Cash
fjwcash@gmail.com



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