Jerry Jelinek wrote:
Jeff Victor wrote:
Brian Kolaci wrote:
Jerry Jelinek wrote:
Brian Kolaci wrote:
I've tried this as well, still doesn't take it. I've been able to
boot
the zone (without the fs added), play with it, then halt it and
add it
back in. Still gives an error...
could not verify fs /data: could not access zfs dataset
'/zpool/zones/omc/omcdata'
zoneadm: zone omc1 failed to verify
I just tried this and it worked for me. What does your zone and zfs
configuration look like? What build are you running?
OK, here's a whole scenario (which also fails):
# zfs create zpool/tstdata
# zfs set mountpoint=legacy zpool/tstdata
# zfs list
NAME USED AVAIL REFER MOUNTPOINT
zpool 346M 117G 25.5K /zpool
zpool/home 346M 117G 27.5K /zpool/home
zpool/home/bk 346M 117G 346M /zpool/home/bk
zpool/home/zoneadm 102K 117G 102K /zpool/home/zoneadm
zpool/tstdata 24.5K 117G 24.5K legacy
#
# zonecfg -z tst
tst: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:tst> create
zonecfg:tst> set zonepath=/opt/zones/tst
zonecfg:tst> set autoboot=true
zonecfg:tst> add net
zonecfg:tst:net> set address=10.0.0.105
zonecfg:tst:net> set physical=e1000g0
zonecfg:tst:net> end
zonecfg:tst> add fs
zonecfg:tst:fs> set type=zfs
zonecfg:tst:fs> set dir=/data
zonecfg:tst:fs> set special=zpool/tstdata
zonecfg:tst:fs> end
zonecfg:tst> verify
zonecfg:tst> commit
zonecfg:tst> exit
# zoneadm -z tst install
Preparing to install zone <tst>.
ERROR: No such file or directory: cannot mount
</opt/zones/tst/root/data> in non-global zone to install: the source
block device or directory <zpool/tstdata> cannot be accessed
ERROR: cannot setup zone <tst> inherited and configured file systems
ERROR: cannot setup zone <tst> file systems inherited and configured
from the global zone
ERROR: cannot create zone boot environment <tst>
zoneadm: zone 'tst': '/usr/lib/lu/lucreatezone' failed with exit
code 74.
#
Can you see something missing?
Yes. Following the commands above, /zpool/tstdata is not mounted, and
a directory with that name does not exist. Were there other commands
that used to mount the fs?
I tested your command example and got the same results. Further, "ls
/zpool" doesn't show the dir /zpool/tstdata. So I'm not surprised
that the install fails.
This logic isn't really correct. You are looking in the wrong place.
The zfs filesystem won't be mounted under zpool since zpool/tstdata has
the legacy mount property. The filesystem should be mounted within the
non-global zone, not the global zone. The zone itself should mount the
filesystems while it boots (i.e. SMF usually does it) so you don't need
extra commands. The trick is during the install process where we are
not booting the zone. I haven't looked at the LU code in detail here but
I think what could be happening is that we are using an (undocumented)
option to zoneadm to mount the zones filesystems. We might be hitting
this bug:
6412875 zoneadm mount does not mount filesystems in vfstab
or we could be hitting some other problem in the LU code whre it is
supposed to mount the zone's filesystems prior to installation.
Jerry
Not sure if its related as there's no entry in vfstab for the zfs
filesystem.
So there's two things going on here. If you create the filesystem with the
initial zonecfg, then it fails. If you create/install/boot the zone
first, then
add the filesystem, I was able to get it to mount in the local zone.
I'm also looking to mount the filesystem multiple times (read/write on
only one
of the local zones, read-only for the others). I guess it comes down to
whether
you can mount the same zfs filesystem more than once (eg. multiple zones
mount
the same filesystem). I've been able to do this with UFS, but not with
ZFS.
I was able to mount the ZFS filesystem in the global zone and use LOFS
mounts
in each of the filesystems and that seems to work. This way I can have one
zone that does the updates/writes to the filesystem and other zones that
serve
up the content (eg. webserver) using read-only mounts.
_______________________________________________
zones-discuss mailing list
zones-discuss@opensolaris.org