Re: Adding ZFS as "fs" to zone fails



Alexander,

Sorry, yesterday was a long day... :-)

What I've been saying rather poorly is that you cannot set zonepath to
a ZFS dataset in the Solaris 10 releases as stated here:

http://docs.sun.com/app/docs/doc/817-1592/6mhahup0u?l=en&a=view

Solaris 10 6/06, Solaris 10 11/06, and Solaris 10 8/07: Do Not Place
the Root File System of a Non-Global Zone on ZFS

The zonepath of a non-global zone should not reside on ZFS for this
release. This action might result in patching problems and possibly
prevent the system from being upgraded to a later Solaris 10 update
release.

My zone was already created with this zonepath, installed, and
rebooted:

# zonecfg -z myzone
zonecfg:myzone> info zonepath
zonepath: /zones/myzone
zonecfg:myzone> verify
zonecfg:myzone> exit
#

The zones examples in the ZFS Admin Guide are not complete zone
configuration examples. I will update these
examples to identify them as partial zone configuration examples.

Can you show me where you see a zonepath set to a ZFS dataset in the
Solaris 10 docs so I can get that
fixed, please?

Thanks for the feedback...

Cindy

On Sep 27, 12:47 am, Alexander Skwar <alexan...@xxxxxxxxxx> wrote:
cindy <cindy.swearin...@xxxxxxx> wrote:
Andrew,

Alexander :)

I'm unclear why you are trying to set zonepath when you adding a ZFS
dataset
to a non-global zone.

Because that's documented in the Sun documentation.

What are you trying to achieve with this
zonepath?

What zonepath? The one set with "set zonepath="? Well, a non-global zone
needs a root, doesn't it :)

Please note this line in the error:

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

I know. I don't understand that message. According to the documentation,
it should not show up.

The examples in the doc here we both referenced don't set the zonepath

Yep. The documentation is broken. Can you take that up to the
correct party? Or at least, "Adding ZFS File Systems to a Non-Global Zone"
doesn't show a complete setup, which can also be induced by the fact,
that there's no "commit" and "exit" at the end of the excerpt. Anyway,
it says:

,----[http://docs.sun.com/app/docs/doc/819-5461/6n7ht6qsn?a=view#gbbrq]
| # zonecfg -z zion
| zion: No such zone configured
| Use 'create' to begin configuring a new zone.
| zonecfg:zion> create
| zonecfg:zion> add fs
| zonecfg:zion:fs> set type=zfs
| zonecfg:zion:fs> set special=tank/zone/zion
| zonecfg:zion:fs> set dir=/export/shared
| zonecfg:zion:fs> end
`----

When I do that, I get:

adm@winds02 /tmp $ sudo zonecfg -z zion
zion: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:zion> create
zonecfg:zion> add fs
zonecfg:zion:fs> set type=fs
zonecfg:zion:fs> set type=zfs
zonecfg:zion:fs> set special=pool/zion
zonecfg:zion:fs> set dir=/export/shared
zonecfg:zion:fs> end
zonecfg:zion> verify
zonepath cannot be empty.
zion: Required resource missing

Note that it says "zonepath cannot be empty". Or can I file a bug report
myself to gethttp://docs.sun.com/app/docs/doc/819-5461/6n7ht6qsn?a=view#gbbrq
fixed?

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

See my output below of your test case. This works as documented in
s10u4

It doesn't, as I've shown.

unless I'm
misunderstanding what you are doing...

Well, you didn't follow my testcase :)



Cindy

# zfs create pool/dummy
# zfs set mountpoint=legacy pool/dummy
# zonecfg -z myzone
zonecfg:myzone> add fs
zonecfg:myzone:fs> set type=zfs
zonecfg:myzone:fs> set dir=/shared/dummy
zonecfg:myzone:fs> set special=pool/dummy
zonecfg:myzone:fs> end
zonecfg:myzone> commit
zonecfg:myzone> exit
# zoneadm -z myzone reboot

You missed the uninstall and, more important, *install* step. That's
the whole point of my message... :)

Here's my testcase again for easier reference:

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

Best regards,

Alexander Skwar


.



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: Adding ZFS as "fs" to zone fails
    ... after the zone is installed. ... I've been mostly worried about people using zfs as a root path that I ... Set zonepath to a directory on a UFS ... Install non-global zone ...
    (comp.unix.solaris)
  • Re: Adding ZFS as "fs" to zone fails
    ... dataset to a non-global zone in the Solaris 10 8/07 release. ... see the excerpt from zfs get all: ... Preparing to install zone. ... cannot setup zone <dummy> inherited and configured file systems ...
    (comp.unix.solaris)
  • Re: Cloning a zone on ZFS
    ... /home/dave# zoneadm -z test clone clone ... All the documentation I can find says that the zone test should be created ... from ZFS snapshot and not by copying. ... I'd like to know why zoneadm used ...
    (comp.unix.solaris)
  • Re: Adding ZFS as "fs" to zone fails
    ... a ZFS dataset in the Solaris 10 releases as stated here: ... Set zonepath to a directory on a UFS ... the Root File System of a Non-Global Zone on ZFS ...
    (comp.unix.solaris)