Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 2 Oct 2021 11:54:40 +0100
From:      Steve O'Hara-Smith <steve@sohara.org>
To:        David Christensen <dpchrist@holgerdanske.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: zfs q regarding backup strategy
Message-ID:  <20211002115440.85c4342a49fe6e4573c37dd0@sohara.org>
In-Reply-To: <809e4f3b-9e59-eb53-5b7d-0bcf7e401cd5@holgerdanske.com>
References:  <YVZM1HnPuwIUQpah@ceres.zyxst.net> <ba54a415-da45-e662-73fe-65702c4131e2@holgerdanske.com> <YVcXsF5NFq2abE%2B7@ceres.zyxst.net> <20211001222816.a36e9acbd4e8829aed3afb68@sohara.org> <809e4f3b-9e59-eb53-5b7d-0bcf7e401cd5@holgerdanske.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 1 Oct 2021 16:10:44 -0700
David Christensen <dpchrist@holgerdanske.com> wrote:

> On 10/1/21 14:28, Steve O'Hara-Smith wrote:

> The one time I tried booting a system with two OS drives, two boot 
> pools, and two root pools convinced me to never to try that again.

	Been there, done that, rebuilt the system!

> My backup plan for OS instances is to take an image of the device with 
> dd(1).  For this reason, I keep my OS instances small enough to fit on 
> "16 GB" devices and use one device per OS instance.

	Sounds like a good strategy, I'm relying on mirrors and simplicity
for OS images currently.

> > Also there is the
> > irritating detail that one of the properties of a ZFS filesystem is its
> > mount point and while you can run zfs recv in such a way as not to mount
> > the received filesystems they will get mounted on reboot which makes
> > backing up several root filesystems to an archive server a little
> > tricky!
> 
> 
> Are you referring to the zpool(8) property 'altroot'?

	If only it were a persistent property it would be more useful and
if it were available at filesystem level.

> I recall that FreeNAS uses altroot, and it is persistent across reboots. 

	Oh now that's a neat trick.

>   I wonder how they accomplished that?  Import scripts on boot and 
> export scripts on shutdown?  But, how to deal with an unclean shutdown 
> and/or failed export?  STFW I do not see any clues.

	Thinking about it I'd guess they register the altroot in some
database (append to a text file perhaps) at the time they set it on
receiving the initial stream for the filesystem and creating the
filesystem, then as you say use a boot time script to restore the altroot
settings.

	I wonder if the FreeNAS solution is available for use, I only see
some python libraries in the ports.

> Perhaps a top-level "archive" pool, one ZFS volume per <source>, one 
> pool per volume, and some work-around to achieve persistent altroot's (?).

	A separate pool for each archive ? I don't like that pools are
rather inflexible things, I rather want to share that stack of big disks.

-- 
Steve O'Hara-Smith <steve@sohara.org>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20211002115440.85c4342a49fe6e4573c37dd0>