Date: Sun, 27 Sep 2009 19:01:09 +0700 From: Edho P Arief <edhoprima@gmail.com> To: krad <kraduk@googlemail.com> Cc: freebsd-current@freebsd.org Subject: Re: make world on a zfs system Message-ID: <a3780c060909270501u2de46cb6m95df4dd9a4da9be3@mail.gmail.com> In-Reply-To: <d36406630909270445l2307186ej52f0b248b224d9e6@mail.gmail.com> References: <d36406630909270445l2307186ej52f0b248b224d9e6@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Sep 27, 2009 at 6:45 PM, krad <kraduk@googlemail.com> 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 <version>' instead by chrooting to the new root environment. --=20 O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a3780c060909270501u2de46cb6m95df4dd9a4da9be3>