[OpenIndiana-discuss] zpool export import alternate cachefile

Gary Mills gary_mills at fastmail.fm
Wed Sep 26 14:06:01 UTC 2012


On Wed, Sep 26, 2012 at 03:51:48PM +0200, Randy S wrote:
> 
> I'm experimenting with creating zpools with an alternate location for 
> the cachefile. Reason: I don't want certain pools to mount at boottime. I
>  know that you have to create a copy of the cachefile so that it won't 
> be removed when you export it. I followed the following procedure (done 
> in a vm and on real hardware)

You don't need a copy.  Just create the cache file during the import.

> 5: import the testpool back: zpool import -c /etc/cache/testpool.cache -a 
> 
> Step 5 is where it goes wrong. I allways get the message: "cannot import
>  'testpool': one or more devices is currently unavailable.

Here's an example from Solaris 10:

    # zpool list
    NAME    SIZE  ALLOC   FREE    CAP  HEALTH  ALTROOT
    rpool   136G  8.66G   127G     6%  ONLINE  -
    # ll /etc/zfs/*.cache    
    -rw-r--r--   1 root     root        1704 Jul 18 13:29 /etc/zfs/zpool.cache
    # ll /etc/zfs/clust.cache
    /etc/zfs/clust.cache: No such file or directory
    # zpool import -o cachefile=/etc/zfs/clust.cache space
    # zpool list
    NAME    SIZE  ALLOC   FREE    CAP  HEALTH  ALTROOT
    rpool   136G  8.66G   127G     6%  ONLINE  -
    space   278G   212M   278G     0%  ONLINE  -
    # ll /etc/zfs/*.cache
    -rw-r--r--   1 root     root        1824 Jul 18 17:51 /etc/zfs/clust.cache
    -rw-r--r--   1 root     root        1716 Jul 18 17:51 /etc/zfs/zpool.cache

-- 
-Gary Mills-		-refurb-		-Winnipeg, Manitoba, Canada-



More information about the OpenIndiana-discuss mailing list