From owner-freebsd-current@FreeBSD.ORG Wed Jul 15 03:41:04 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54304106566C for ; Wed, 15 Jul 2009 03:41:04 +0000 (UTC) (envelope-from ari@ish.com.au) Received: from fish.ish.com.au (eth5921.nsw.adsl.internode.on.net [59.167.240.32]) by mx1.freebsd.org (Postfix) with ESMTP id 182808FC14 for ; Wed, 15 Jul 2009 03:41:03 +0000 (UTC) (envelope-from ari@ish.com.au) Received: from ip-149.ish.com.au ([203.29.62.149]:63303) by fish.ish.com.au with esmtpa (Exim 4.69) (envelope-from ) id 1MQwFO-0003P8-1u; Wed, 15 Jul 2009 14:37:38 +1000 Message-ID: <4A5D4D25.3040908@ish.com.au> Date: Wed, 15 Jul 2009 13:29:41 +1000 From: Aristedes Maniatis User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.1pre) Gecko/20090709 Shredder/3.0b3pre MIME-Version: 1.0 To: freebsd-current@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Jurgen Weber Subject: Problematic upgrade from 7.2 to 8.0 with ZFS file system X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2009 03:41:04 -0000 Last night we upgraded one of our servers from 7.2 to 8.0-beta1 using the freebsd-update tool and following the instructions on Colin's blog. I believe this problem will occur even if we had used a source update mechanism. The usual upgrade path is to install the new kernel, reboot, then install world. This fails because when rebooting into the 8.0 kernel with 7.2 userland, ZFS is unable to properly initialise and the file systems are not mounted. In our case we are booting with a small UFS partition to load the kernel, and then mounting /usr /var, etc from ZFS as per these instructions [1]. The problem with ZFS userland being out of sync with the kernel has been seen before [2] [3]. However now with lots of people running ZFS and starting to upgrade to 8.0, I think this will bite many more. The workaround is to drop into single user mode, mount all the zfs partitions, and do the userland install. mount -t zfs /usr mount -t zfs /var mount -o rw tank/root / Those mount commands are slightly non-obvious and took a little guessing to get right. You can't use the 'zfs mount' command since it is broken at this point in time. The other solution is to install userland BEFORE you reboot into the new kernel, although that may cause its own set of problems. Whatever the final solution, this needs to be clearly documented and ideally freebsd-update needs to detect the problem and advise the user about what to do. Ari Maniatis [1] http://www.ish.com.au/solutions/articles/freebsdzfs [2] http://www.nabble.com/Re%3A-ZFS-MFC-heads-up-p23651130.html [3] http://www.nabble.com/zfs-version-13-kernel-and-zfs-version-6-userland-tool--td20650216.html --------------------------> ish http://www.ish.com.au Level 1, 30 Wilson Street Newtown 2042 Australia phone +61 2 9550 5001 fax +61 2 9550 4001 GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A