Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Jul 2014 15:25:57 +0100
From:      Mike Clarke <>
Subject:   Re: Backing up zfs system to external disk
Message-ID:  <1855317.BxjNgUaonN@curlew.lan>
In-Reply-To: <1947386.pOQVzt1YdP@curlew.lan>
References:  <1947386.pOQVzt1YdP@curlew.lan>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On Saturday 26 July 2014 13:14:16 Mike Clarke wrote:

> The script imports the backup pool with the -N option to avoid 
> mounting filesystems on top of the running system, updates the
> backup  pool to the latest snapshot with zfs send | zfs receive and
> then exports the backup pool.
> This normally works fine except in the rare cases when the system
> is  shut down or crashes while the backup pool is still imported.
> If this happens then problems arise on the next reboot because
> filesystems will be mounted from both the system and backup pools
> using identical mountpoints.

After further study of the manpages and some experiments I now see the 
cause of my problem. I should have used "zpool import -N -o 
cachefile=none". This creates a temporary pool which is not cached so 
will not be available for mounting next time the system is booted.

This now leads me to wonder why the -N option doesn't follow the 
design of "-R /some_mountpoint" and "-o altroot=/some_mountpoint", 
both of which default to set cachefile to none. Is there some subtle 
reason for the -N option not doing the same or is this a bug in the 
system? I can't imagine any situation where anyone would want to 
import a pool without mounting it and require it to be automatically 
mounted after rebooting.

Mike Clarke

Want to link to this message? Use this URL: <>