Re: Adding ZFS as "fs" to zone fails



Hello!

First of, thanks for having replied to my post.

· cindy <cindy.swearingen@xxxxxxx>:

Andrew,

I'm no zones expert but setting a zonepath to a ZFS file system in
the Solaris 10 8/07 release is not supported.

I also tried to /not/ do this. I tried setting zonepath to /tmp/z/t;
/tmp is *NOT* swap. So the issue at hand has nothing to do with
zonepath on ZFS.

Your choices are to add a ZFS dataset or delegate a ZFS
dataset to a non-global zone in the Solaris 10 8/07 release.

Understood. Thanks.

The add fs syntax looks like this:

# zonecfg -z myzone
zonecfg:myzone> add fs
zonecfg:myzone:fs> set type=zfs
zonecfg:myzone:fs> set special=mpool2/fs3
zonecfg:myzone:fs> set dir=/shared/fs2
zonecfg:myzone:fs> end
zonecfg:myzone> exit

That's what I did, see this excerpt from the zoneadm info:

fs:
        dir: /test_fs
        special: pool/zones/test_fs
        raw not specified
        type: zfs
        options: []

In addition, the mpool2/fs3 mountpoint must be set to legacy.

That's what I did, see the excerpt from zfs get all:

pool/zones/test_fs mounted no -
pool/zones/test_fs mountpoint legacy local

The delegated syntax looks like this:

# zonecfg -z myzone
zonecfg:myzone> add dataset
zonecfg:myzone:dataset> set name=mpool2/fs2
zonecfg:myzone:dataset> end
zonecfg:myzone> exit

Ah, okay. For this particular "directory", I'm not interested in
a delegated dataset.

Any other ideas, someone, please?

I googled a bit and found that Solaris used to be broken and LU
just barfed. It seems that this bug is still present. Did Sun
remove that bug in U3 and re-introduce it in U4? What I'm trying
to do is described in the documentation, eg. at

http://docs.sun.com/app/docs/doc/819-5461/6n7ht6qsn?a=view#gbbrq

Links I found:

- http://forum.java.sun.com/thread.jspa?threadID=5106267&messageID=9362750
- http://forum.java.sun.com/thread.jspa?threadID=5105732&messageID=9359873

-> Zones and ZFS broken. Workaround: Add the ZFS fs later, after
having run "zoneadm ... install".

- http://mail.opensolaris.org/pipermail/zones-discuss/2006-July/004926.html
- http://mail.opensolaris.org/pipermail/zones-discuss/2006-July/004936.html

-> Talks about a bug. 6412875 zoneadm mount does not mount filesystems in vfstab

- http://mail.opensolaris.org/pipermail/zones-discuss/2006-July/005315.html

-> zoneadm install broken. Add fs later on.

Could someone please check if that bug was removed in U3 and if that
really is a regression? Or could somebody maybe please verify, if the
following testcase works:

zfs create pool/dummy
zfs set mountpoint=legacy pool/dummy
zonecfg -z dummy
create
set zonepath=/zp
add fs
set type=zfs
set dir=/somewhere
set special=pool/dummy
end
commit
exit
zoneadm -z dummy verify && zoneadm -z dummy install

For me, on Solaris 10 U4 Sparc, this fails:

adm@winds02 /tmp $ sudo -H zoneadm -z dummy install
Preparing to install zone <dummy>.
ERROR: No such file or directory: cannot mount </zp/root/somewhere> in non-global zone to install: the source block device or directory <pool/dummy> cannot be accessed
ERROR: cannot setup zone <dummy> inherited and configured file systems
ERROR: cannot setup zone <dummy> file systems inherited and configured from the global zone
ERROR: cannot create zone boot environment <dummy>

This is expected, at least according to the posts I mentioned above
in this post.

Alexander Skwar
--
Everyone is more or less mad on one point.
-- Rudyard Kipling

.



Relevant Pages

  • Re: Adding ZFS as "fs" to zone fails
    ... I'm unclear why you are trying to set zonepath when you adding a ZFS ... to a non-global zone. ... dummy> cannot be accessed ...
    (comp.unix.solaris)
  • Re: Live Upgrade Solaris 10 update 9 assertion failure
    ... sometimes on zfs. ... prior to live upgrade and then import the ...  (I guess I could do a "zone upgrade on attach" and hope ... I think LU has become more fragile and buggy as more Solaris updates ...
    (comp.unix.solaris)
  • ZFS and Zone questions for migration
    ... Now I'm planning to migrate all my servers running on Solaris 8 to two E450 ... Enterprise servers using Solaris 10 with zones and zfs. ... using zone and zfs configurations. ... In the global zone create /zones as a zfs mountpoint ...
    (SunManagers)
  • Re: Future direction of Solaris?
    ... extra costs as buying from its competitors. ... ZFS is far superior to any native ... The best NAS is a Solaris system with lots of disks and ZFS. ... Zones seem to have dropped out of fashion. ...
    (comp.unix.solaris)
  • Solaris 10 zone from flar
    ... The problem was that we use Solaris 9 and Solaris 10 ... It occurred to me that it could come in handy to install a Solaris 10 ... zone from a flar, just like you would install a branded Solaris 9 ... The first replacement defines the name of the brand, ...
    (comp.unix.solaris)