From owner-freebsd-current@FreeBSD.ORG Thu Jan 29 22:15:19 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 86918106567B for ; Thu, 29 Jan 2009 22:15:19 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from zim.MIT.EDU (ZIM.MIT.EDU [18.95.3.101]) by mx1.freebsd.org (Postfix) with ESMTP id 468E08FC26 for ; Thu, 29 Jan 2009 22:15:19 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from zim.MIT.EDU (localhost [127.0.0.1]) by zim.MIT.EDU (8.14.3/8.14.2) with ESMTP id n0TLvKbh003023; Thu, 29 Jan 2009 16:57:20 -0500 (EST) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by zim.MIT.EDU (8.14.3/8.14.2/Submit) id n0TLvKge003022; Thu, 29 Jan 2009 16:57:20 -0500 (EST) (envelope-from das@FreeBSD.ORG) Date: Thu, 29 Jan 2009 16:57:20 -0500 From: David Schultz To: Philipp Wuensche Message-ID: <20090129215720.GA2889@zim.MIT.EDU> Mail-Followup-To: Philipp Wuensche , freebsd-current@FreeBSD.ORG References: <4981EBC6.1000907@h3q.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4981EBC6.1000907@h3q.com> Cc: freebsd-current@FreeBSD.ORG Subject: Re: Solaris live upgrade like FreeBSD ZFS-rootfs update 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: Thu, 29 Jan 2009 22:15:20 -0000 On Thu, Jan 29, 2009, Philipp Wuensche wrote: > With ZFS suddenly some neat stuff is easly possible with FreeBSD, like > the Solaris Live Upgrade feature. The idea behinde Live Upgrade is that > you have more than one bootable-environment to boot from making it very > painless to upgrade to newer FreeBSD versions without loosing the > possibility to boot your known-good boot-environemt. So you can't end up > with a broken userland or kernel and you can even go back to your old > userland and kernel if the new ones do not work for you. Nice. Right now, upgrading from source involves the multi-step dance of: - build - installkernel - reboot in single user mode - mergemaster -p - installworld - mergemaster This sequence is designed to maximize the odds that you can recover easily if something goes wrong, but many users don't know how to recover, and you can still shoot yourself in the foot if installworld fails, e.g., due to a new bug in libc. But since both ZFS and UFS support snapshots now, it would be great if the process were something like: - drop to single user mode - take snapshots of / and /usr - install everything - reboot But if something goes wrong, only ZFS has the ability to roll back to the last snapshot, and even then I'm not sure if you can actually boot from that snapshot in order to recover. Nonetheless, perhaps it's worth incorporating the idea of "take a snapshot before you upgrade" into the documented upgrade procedure. More than once, it's saved me the headache of finding a CD with a version of libc that will work with my kernel.