I have a system with ZFS root that imports another zpool from a start
method.  It uses a separate cache file for this zpool, like this:

        if [ -f $CCACHE ]
        then
            echo "Importing $CPOOL with cache $CCACHE"
            zpool import -o cachefile=$CCACHE -c $CCACHE $CPOOL
        else
            echo "Importing $CPOOL with device scan"
            zpool import -o cachefile=$CCACHE $CPOOL
        fi

It also exports that zpool from the stop method, which has the side
effect of deleting the cache.  This all works nicely when the server
is rebooted.

What will happen when the server is halted without running the stop
method, so that that zpool is not exported?  I know that there is a
flag in the zpool that indicates when it's been exported cleanly.  The
cache file will exist when the server reboots.  Will the import fail
with the `The pool was last accessed by another system.' error, or
will the import succeed?  Does the cache change the import behavior?
Does it recognize that the server is the same system?  I don't want
to include the `-f' flag in the commands above when it's not needed.

-- 
-Gary Mills-        -Unix Group-        -Computer and Network Services-
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to