From owner-freebsd-stable@FreeBSD.ORG Fri Sep 17 16:37:15 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2628A1065673 for ; Fri, 17 Sep 2010 16:37:15 +0000 (UTC) (envelope-from fjwcash@gmail.com) Received: from mail-ew0-f54.google.com (mail-ew0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id A98A98FC19 for ; Fri, 17 Sep 2010 16:37:14 +0000 (UTC) Received: by ewy22 with SMTP id 22so1330356ewy.13 for ; Fri, 17 Sep 2010 09:37:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=CmYGEoQ7+g6QaorhGIwiqRWRXYtnurdLjERLTkvEy18=; b=Of77deKnSdW/aU/n5r7YNR+ok8YQ6N+zX/TTdkRlO+zWnHorK+yMqb6BtgEapoDhpv nQ0EzFzdexir9A0tkiRRJrNQ3YLDwmFDP/HOmimOniewSbYZhByg+BS+HS0LgKWtSp74 2a13lMN2DW3vmqd77mpUk4N6DRqDTflpnpBco= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=URnlYhfVf+IQJiolnbrZsC8Tozjgp4vMoYbPJ31GLrA8X7vWGHO+AovGwQs5Pc4nP6 TpF8+6qzp2IjxC9+ylrvBLVZiyqwVWoadA7YZimbH8ihzwnYqreIIOvsZutkTqBfdNTn CA7F8eUh3nZXNTxEh5BDvmFE3VRXk3dkVpp3I= MIME-Version: 1.0 Received: by 10.223.106.209 with SMTP id y17mr2070285fao.105.1284739822566; Fri, 17 Sep 2010 09:10:22 -0700 (PDT) Received: by 10.223.110.197 with HTTP; Fri, 17 Sep 2010 09:10:22 -0700 (PDT) In-Reply-To: <201009171238.o8HCcwCl084727@lurza.secnetix.de> References: <201009171238.o8HCcwCl084727@lurza.secnetix.de> Date: Fri, 17 Sep 2010 09:10:22 -0700 Message-ID: From: Freddie Cash To: freebsd-stable@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: How to predict drive number change for 7.3->8.1 upgrade? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2010 16:37:15 -0000 On Fri, Sep 17, 2010 at 5:38 AM, Oliver Fromme wro= te: > Michael Sperber 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