Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Sep 2010 18:20:35 +0400
From:      "Marat N.Afanasyev" <amarat@ksu.ru>
To:        Michael Sperber <sperber@deinprogramm.de>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: How to predict drive number change for 7.3->8.1 upgrade?
Message-ID:  <4C937933.4060707@ksu.ru>
In-Reply-To: <y9liq247asc.fsf@deinprogramm.de>
References:  <201009171238.o8HCcwCl084727@lurza.secnetix.de>	<y9lr5gs7cjh.fsf@deinprogramm.de> <4C93674B.20300@ksu.ru> <y9liq247asc.fsf@deinprogramm.de>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a cryptographically signed message in MIME format.

--------------ms080004020109060702010503
Content-Type: text/plain; charset=KOI8-R; format=flowed
Content-Transfer-Encoding: quoted-printable

Michael Sperber wrote:
>
> "Marat N.Afanasyev"<amarat@ksu.ru>  writes:
>
>> Michael Sperber wrote:
>>>
>>> Oliver Fromme<olli@lurza.secnetix.de>   writes:
>>>
>>>> Michael Sperber<sperber@deinprogramm.de>   wrote:
>>>>    >   I just upgraded my desktop system from 7.3 to 8.1, and the ma=
in hard
>>>>    >   drive, which was /dev/ad6 before is now /dev/ad10.  Consequen=
tly, the
>>>>    >   initial boot failed when trying to mount the root file system=
 from ad6.
>>>>    >
>>>>    >   The desktop system is now fixed, but I also have a rented ser=
ver with
>>>>    >   only a serial console, and I worry that the upgrade is going =
to leave me
>>>>    >   with a dead machine.  Is there any way to predict how the dri=
ve number
>>>>    >   changes?  (Why does it change at all?)  If so, what's the pro=
per way to
>>>>    >   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.  Then your
>>>> first disk will be ad0, no matter what controller and
>>>> channel it is connected to.  Be sure to update your
>>>> /etc/fstab file.
>>>
>>> Ah, excellent - that's what I was looking for.  Thanks!
>>>
>> beware of drago^Wchanging of adX numbers each time you add/remove
>> drive ;) It's better to label filesystems, imho ;)
>
> This is a rented server, so I no drive will ever be removed or added.
> On the other hand, if I understand it correctly, I'll need to unmount
> the root partition in order to label it - right?
>
you may try the following commands:

sysctl kern.geom.debugflags=3D16

foreach fs (your-filesystems)
glabel label your-$fs-label your-$fs-device
end

echo geom_label_load=3D"YES" >> /boot/loader.conf
reboot

and see if the labels appear in /dev/label

--=20
SY, Marat


--------------ms080004020109060702010503--



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