Did you try it as a single command, somewhat like:

zpool create -R /a -o cachefile=/a/etc/zfs/zpool.cache mypool c3d0

Using altroots and cachefile(=none) explicitly is a nearly-documented
way to avoid caching pools which you would not want to see after
reboot, i.e. removable media.
 
I think that after the AI is done and before reboot you might want to 
reset the altroot property to point to root (or be undefined) so that 
the data pool is mounted into your new rpools hierarchy and not 
under "/a/mypool" again ;)
 
And if your AI setup does not use the data pool, you might be better 
off not using altroot at all, maybe...

----- Original Message -----
From: Matt Keenan <matt...@opensolaris.org>
Date: Friday, May 27, 2011 13:25
Subject: [zfs-discuss] Ensure Newly created pool is imported automatically in 
new BE
To: zfs-discuss@opensolaris.org

> Hi,
> 
> Trying to ensure a newly created data pool gets import on boot 
> into a 
> new BE.
> 
> Scenario :
>    Just completed a AI install, and on the client 
> before I reboot I want 
> to create a data pool, and have this pool automatically imported 
> on boot 
> into the newly installed AI Boot Env.
> 
>    Trying to use the -R altroot option to zpool create 
> to achieve this or
> the zpool set -o cachefile property, but having no luck, and 
> would like 
> some advice on what the best means of achieving this would be.
> 
> When the install completes, we have a default root pool "rpool", which
> contains a single default boot environment, rpool/ROOT/solaris
> 
> This is mounted on /a so I tried :
>     zpool create -R /a mypool c3d0
> 
> Also tried :
>     zpool create mypool c3d0
>     zpool set -o cachefile=/a mypool
> 
> I can clearly see /a/etc/zfs/zpool.cache contains information 
> for rpool, 
> but it does not get any information about mypool. I would expect 
> this 
> file to contain some reference to mypool. So I tried :
>     zpool set -o cachefile=/a/etc/zfs/zpool.cache
> 
> Which fails.
> 
> Any advice would be great.
> 
> cheers
> 
> Matt
> _______________________________________________
> zfs-discuss mailing list
> zfs-discuss@opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
 
 
-- 

+============================================================+ 
|                                                            | 
| Климов Евгений,                                 Jim Klimov | 
| технический директор                                   CTO | 
| ЗАО "ЦОС и ВТ"                                  JSC COS&HT | 
|                                                            | 
| +7-903-7705859 (cellular)          mailto:jimkli...@cos.ru | 
|                        CC:ad...@cos.ru,jimkli...@gmail.com | 
+============================================================+ 
| ()  ascii ribbon campaign - against html mail              | 
| /\                        - against microsoft attachments  | 
+============================================================+
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to