From owner-freebsd-current@FreeBSD.ORG Sun Sep 27 12:01:10 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 EF9BE1065676 for ; Sun, 27 Sep 2009 12:01:09 +0000 (UTC) (envelope-from edhoprima@gmail.com) Received: from mail-pz0-f202.google.com (mail-pz0-f202.google.com [209.85.222.202]) by mx1.freebsd.org (Postfix) with ESMTP id C5AF98FC22 for ; Sun, 27 Sep 2009 12:01:09 +0000 (UTC) Received: by pzk40 with SMTP id 40so1787229pzk.7 for ; Sun, 27 Sep 2009 05:01:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=Pj9bGArjxZ/1Mf//6TV1BjfNvWj/q9HkqNZk4AHta8M=; b=a3KU+kqpH+x6sl5u+VoceOCSvXemDVIDgxwxxQtbS16eH8uj0z56mfJr26YoevDh3D CW0MKsNYaal1UTyVSgkynwz2wSN2ebWGSuQOG2f7qbAgylAVSLb2hOEZgdl3g7irTenT Yqi0qkUS6XOl4FYGgMFc/oV/+1zTBwiW5Yhkc= 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 :cc:content-type:content-transfer-encoding; b=XtcixAbfeXZCRh6B/loqhzu2TPz6FH+8VnXNOjEcIjAjHFTvEbirsV2U2GcIwRULP4 UyUUKMDxfUI6UY804iM4kepOVbpG2B75Zm92tTTG8IIQZZc9z+iikGPWtIhjR0ItzRr1 S68TBePa5kKHd29dwUSMtIOZULgjEgfR4Yzy4= MIME-Version: 1.0 Received: by 10.142.2.34 with SMTP id 34mr163437wfb.143.1254052869346; Sun, 27 Sep 2009 05:01:09 -0700 (PDT) In-Reply-To: References: Date: Sun, 27 Sep 2009 19:01:09 +0700 Message-ID: From: Edho P Arief To: krad Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-current@freebsd.org Subject: Re: make world on a zfs 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: Sun, 27 Sep 2009 12:01:10 -0000 On Sun, Sep 27, 2009 at 6:45 PM, krad wrote: > HI, > > I have a pure zfs system at home, and was interested in how most others a= re > implementing theirs with regard to the os installation. > > Most of the guides I have seen have a zpool eg system made up of > mirrored/raided vdevs, but they usually install the os on the root zfs fs > for that pool, and have that in loader.conf > > eg > > vfs.root.mountfrom=3D"zfs:system" > > I have done this slightly differently on my system. I initially installed > onto /system/root. Therefore my loader.conf has the following line > > vfs.root.mountfrom=3D"zfs:system/root" > > Nothing special there. However this next bit is the cool bit. > > Next time i want to upgrade the os i do one of the following > > > zfs snapshot system/root@20090926 > > # if i want speed > zfs clone system/root@20090926 system/root_20090926 > > # =C2=A0or better way but a bit slower (2-3 mins) > zfs send system/root@20090926 | zfs receive system/root_20090926 > > I tend to use the send and receive, as disk space isn't really an issue a= nd > I dont like having the dependency that you clones as it makes it more > complicated to delete old file systems. > > Now lets install the new os > > > zfs set mountpoint=3Dlegacy system/root_20090926 > mount -t zfs system/root_20090926 /mnt > sed -i -e "system\/root\"/system\/root_20090926\"/" /mnt/boot/loader.conf > export DESTDIR=3D/mnt > cd /usr/src > make installkernel && make installworld > zpool set bootfs=3Dsystem/root_20090926 system > mergmaster > init 6 > > The system will now boot onto the new filesystem. If there is a problem I > can just boot in with my rescue usb stick and flip the bootfs flag back a= nd > bang im back in the old os. > > Why not just use snapshots I hear you say. Well if I roll back the os I h= ave > lost the new stuff I have installed. This is ok in terms of getting the o= s > back up. However in terms of getting the new installation fixed this isn'= t > much help. This way I can flip flop back and two between the installation= s. > This could be ideal for people who want to have a quick look at current > every now and again. It would be really cool if this type of thing could = get > integrated into the make world scripts. > > Before anyone points out I did steal this idea from opensolaris. > > Ideally =C2=A0I need to do is see if I can get something built into beast= ie, to > choose the bootfs for the pool. I'm not sure this is viable, as once you > have started to load the loader, you must have chosen the bootfs. Has any= one > looked at this already and can they offer any advice? > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org= " > I've done this before - but instead of make installword I did 'freebsd-update upgrade -r ' instead by chrooting to the new root environment. --=20 O< ascii ribbon campaign - stop html mail - www.asciiribbon.org