Date: Thu, 19 Jan 2012 17:26:16 +0100 From: Andreas Nilsson <andrnils@gmail.com> To: freebsd-fs@freebsd.org Subject: Booting from zfs snapshot Message-ID: <CAPS9%2BSsyvw=Day%2B1XC8HmzWQG3M=GZE=Nt-qaEQiQTPYME9MrA@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Hello, I'm trying to wrap my head around the process of booting from a zfs snapshot. I have hit a few roadblocks, which I hope this is the adequate list to post to regarding those. A short note on what I'm trying to achieve might be in order. In short: a nanobsd system on zfs only. I want to boot from a snapshot so that when I push out an upgrade with zfs send, I want the root filesystem to remain unchanged. The problems I've hit so far: *1 Making the zpool.cache file available *2 Having / mount via entry in fstab. *1: The zpool.cache is needed to autoimport a pool as I understand it. Is there a way to force the kernel to import a pool during bootup even though no zpool.cache is around? What does this file actually contain? I made an experiment and booted a disk with zfs root from machine a in machine b and that worked. I did partition the disk with gpart using a gpt scheme, and labeled the partition on which the pool resides as os, and upon creation of the zpool used gpt/os as device. Does this mean that as long as gpt/os is available, any machine boot this disk will have the zpool autoimported? *2: Having a line like tank/root/8.2-RELEASE-p5@ro / zfs ro 0 0 in fstab causes mount to throw an error and leave me in single user mode, when the system is booted however mount can mount a zfs snapshot just fine. Setting vfs.root.mountfrom in loader.conf works just fine though. Best regards Andreas Nilsson
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPS9%2BSsyvw=Day%2B1XC8HmzWQG3M=GZE=Nt-qaEQiQTPYME9MrA>