From owner-freebsd-fs@FreeBSD.ORG Tue Jun 26 10:50:13 2012 Return-Path: Delivered-To: freebsd-fs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB38F1065672 for ; Tue, 26 Jun 2012 10:50:13 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 9D2268FC1A for ; Tue, 26 Jun 2012 10:50:13 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q5QAoD3s021088 for ; Tue, 26 Jun 2012 10:50:13 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q5QAoDrf021087; Tue, 26 Jun 2012 10:50:13 GMT (envelope-from gnats) Date: Tue, 26 Jun 2012 10:50:13 GMT Message-Id: <201206261050.q5QAoDrf021087@freefall.freebsd.org> To: freebsd-fs@FreeBSD.org From: Andriy Gapon Cc: Subject: Re: kern/166566: [zfs] zfs split renders 2 disk (MBR based) mirror unbootable X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Andriy Gapon List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jun 2012 10:50:13 -0000 The following reply was made to PR kern/166566; it has been noted by GNATS. From: Andriy Gapon To: hartzell@alerce.com, bug-followup@FreeBSD.org Cc: Subject: Re: kern/166566: [zfs] zfs split renders 2 disk (MBR based) mirror unbootable Date: Tue, 26 Jun 2012 13:47:50 +0300 [restoring bug-followup] on 25/06/2012 19:48 George Hartzell said the following: > Here are two images (more than one screen full) of the lsdev -v output > from the loader that *actually loads the system* (when it's > working...). I have a theory of what's going on. I believe that after zpool split the following items get updated with new information: - vdev label on the disk that remains in the main pool (ada3 + zroot) - vdev label on the disk that goes to the new pool (ada1 + zsplitroot) - zpool.cache file in the main/active/remaining pool (zroot) The following item still has outdated information: - zpool.cache file in the new pool (zsplitroot) This happens because the new pool gets the contents of the original pool at split start time (before any new ids are generated). The file can not be updated automatically because the new pool remains "un-imported" (exported) after the split. If it is desired that the zsplitroot's zpool.cache is updated it has to be done manually - by importing the pool, etc. I believe that what you see is a result of you always booting in such a way that the zfs boot code and zfsloader find zsplitroot pool before zroot pool. This is confirmed by the screenshot which shows that zsplitroot is listed before zroot. Because of that the stale zpool.cache file is used and as a result the ZFS code in kernel can not find disks/pools based on the stale IDs. I think that you have to change the boot order using BIOS, so that you boot from ada3 disk. You should verify at the loader prompt that that is indeed the case and zroot is found first and is used as a boot pool. If your BIOS either doesn't allow to change boot order, or lies about it or doesn't change bios disk numbering such that a boot disk is the first drive (disk0 / "BIOS drive C"), then I recommend thatyou set 'currdev' loader variable to point to zroot pool. Depending on your zfsloader version it should be done in one of the following ways: set currdev=zfs:zroot: set currdev=zfs1 You can examine default value of the variable (with 'show' command) to see which scheme should be used. Please test this. -- Andriy Gapon