Le 14/07/10 17:07, Gerard Henry a écrit :
hello all,
i need to move zones from serv1 to serv2. Every server is os2009.06 b111b
On serv1, i have, after detach:
serv1 # zfs list -r rpool/zones/bibcmi4
NAME USED AVAIL REFER MOUNTPOINT
rpool/zones/bibcmi4 1.46G 8.43G 38K /zones/bibcmi4
rpool/zones/bibcmi4/ROOT 1.46G 8.43G 18K legacy
rpool/zones/bibcmi4/ROOT/zbe 1.33M 8.43G 828M legacy
c 1.45G 8.43G 877M /zones/bibcmi4/root
following this post:
http://mail.opensolaris.org/pipermail/zones-discuss/2010-February/006060.html
i send the snapshots on serv2, and i have:
serv2 # zfs list -r rpool/zones/bibcmi4
NAME USED AVAIL REFER MOUNTPOINT
rpool/zones/bibcmi4 1.29G 45.9G 38K /zones/bibcmi4
rpool/zones/bibcmi4/ROOT 1.29G 45.9G 19K legacy
rpool/zones/bibcmi4/ROOT/zbe 494M 45.9G 494M legacy
rpool/zones/bibcmi4/ROOT/zbe-2 825M 45.9G 825M /zones/bibcmi4/root
(the last line was legacy, and i set the mountpoint manually)
i did a zonecfg, with "create -a"
but now, it fails to attach:
serv2 # zoneadm -z bibcmi4 attach
ERROR: The -a, -d or -r option is required when there is no active root dataset.
i found another thread related to this message:
http://opensolaris.org/jive/thread.jspa?messageID=439124
but unfortunately, it doesn't help.
The option doesn't exist in zoneadm, so i don't understand what's happen.
The official docs http://docs.sun.com/app/docs/doc/817-1592/zone?a=view doesn't
take this case into account (zonepaths on zfs).
I need to move zones before upgrading to b134,
thanks in advance for help,
gerard
We've got the same issue in opensvc zones start:
even with zfs property org.openlaris.libbe:active = active on zonepath
root dataset
To success zone attach we needed to do the following:
mount -F zfs rpool/zones/bibcmi4/ROOT/zbe-2 /zones/bibcmi4/root
Then zoneadm -z bibcmi4 attach is ok
The definition of the opensvc service need then the preboot tag:
[fs#1]
dev = z2_root/ROOT/zbe
mnt = /z2_root/root
mnt_opt =
type = zfs
globalfs = True
tags = preboot
Full service definition:
[default]
app = OSVC
vm_name = z2
comment = lab zone
mode = zone
service_type = DEV
nodes = osol1.opensvc.com osol2.opensvc.com
autostart_node = osol1.opensvc.com
drpnode =
[ip#1]
ipdev = lo0
ipname = 127.0.0.102
[pool#1]
poolname = z2_root
tags = preboot
[pool#2]
poolname = z2_data
tags = postboot
[fs#1]
dev = z2_root/ROOT/zbe
mnt = /z2_root/root
mnt_opt =
type = zfs
globalfs = True
tags = preboot
[fs#2]
dev = z2_data/appdata2
mnt = /appdata2
mnt_opt = defaults
type = zfs
tags = postboot
[fs#3]
dev = z2_data/appdata3
mnt = /appdata3
mnt_opt = defaults
type = zfs
tags = postboot
[fs#4]
dev = z2_data/appdata4
mnt = /appdata4
mnt_opt = defaults
type = zfs
tags = postboot
[fs#5]
dev = z2_data/appdata4/subds
mnt = /appdata3/subdir
mnt_opt = defaults
type = zfs
tags = postboot
[fs#6]
dev = z2_data/appdata3/subds
mnt = /appdata4/subdir
mnt_opt = defaults
type = zfs
tags = postboot
[fs#7]
dev = z2_data/appdata1
mnt = /appdata1
mnt_opt = defaults
type = zfs
tags = postboot
Then the stop service action is :
r...@osol1.opensvc.com:~# /opt/opensvc/etc/z2.opensvc.com stop
Z2.OPENSVC.COM.FS#6 - INFO - zfs umount z2_data/appdata3/subds
Z2.OPENSVC.COM.FS#4 - INFO - zfs umount z2_data/appdata4
Z2.OPENSVC.COM.FS#5 - INFO - zfs umount z2_data/appdata4/subds
Z2.OPENSVC.COM.FS#3 - INFO - zfs umount z2_data/appdata3
Z2.OPENSVC.COM.FS#2 - INFO - zfs umount z2_data/appdata2
Z2.OPENSVC.COM.FS#7 - INFO - zfs umount z2_data/appdata1
Z2.OPENSVC.COM.POOL#2 - INFO - zpool export z2_data
Z2.OPENSVC.COM.ZONE - INFO - zlogin z2 /sbin/init 0
Z2.OPENSVC.COM.ZONE - INFO - Waiting for ipkg poststate complete: 4519
/bin/ksh -p /usr/lib/brand/ipkg/poststate z2 /z2_root 5 4
Z2.OPENSVC.COM.ZONE - INFO - Waiting for ipkg poststate complete: 4519
/bin/ksh -p /usr/lib/brand/ipkg/poststate z2 /z2_root 5 4
Z2.OPENSVC.COM.ZONE - INFO - Waiting for ipkg poststate complete: 4519
/bin/ksh -p /usr/lib/brand/ipkg/poststate z2 /z2_root 5 4
Z2.OPENSVC.COM.ZONE - INFO - Waiting for ipkg poststate complete: 4519
/bin/ksh -p /usr/lib/brand/ipkg/poststate z2 /z2_root 5 4
4584 /bin/ksh -p /usr/lib/brand/ipkg/poststate z2 /z2_root 5 4
Z2.OPENSVC.COM.ZONE - INFO - zoneadm -z z2 detach
Z2.OPENSVC.COM.ZONE - INFO - detach done in 0:00:01.400383 - ret 0 - logs in
Z2.OPENSVC.COM.FS#1 - INFO - zfs umount z2_root/ROOT/zbe
Z2.OPENSVC.COM.POOL#1 - INFO - zpool export z2_root
Z2.OPENSVC.COM.IP#1 - INFO - 127.0.0.102 is already down on lo0
The start action is :
r...@osol1.opensvc.com:~# /opt/opensvc/etc/z2.opensvc.com start
Z2.OPENSVC.COM.POOL#1 - INFO - zpool import z2_root
Z2.OPENSVC.COM.FS#1 - INFO - fs(z2_root/ROOT/zbe /z2_root/root) is
already mounted
Z2.OPENSVC.COM.ZONE - INFO - zoneadm -z z2 attach
Z2.OPENSVC.COM.ZONE - INFO - output:
Log File: /var/tmp/z2.attach_log.H0aixj
Attaching...
Global zone version: ent...@0.5.11,5.11-0.134:20100302T023003Z
Non-Global zone version: ent...@0.5.11,5.11-0.134:20100302T023003Z
Evaluation: Packages in z2 are in sync with global zone.
Attach complete.
Z2.OPENSVC.COM.ZONE - INFO - attach done in 0:00:09.420799 - ret 0 -
logs in Log File: /var/tmp/z2.attach_log.H0aixj
Attaching...
Global zone version: ent...@0.5.11,5.11-0.134:20100302T023003Z
Non-Global zone version: ent...@0.5.11,5.11-0.134:20100302T023003Z
Evaluation: Packages in z2 are in sync with global zone.
Attach complete.
Z2.OPENSVC.COM.ZONE - INFO - zoneadm -z z2 ready
Z2.OPENSVC.COM.ZONE - INFO - ready done in 0:00:04.797098 - ret 0 - logs in
Z2.OPENSVC.COM.IP#1 - INFO - ifconfig lo0:5 plumb 127.0.0.102 netmask +
broadcast + up zone z2
Z2.OPENSVC.COM.ZONE - INFO - zoneadm -z z2 boot
Z2.OPENSVC.COM.ZONE - INFO - boot done in 0:00:02.228589 - ret 0 - logs in
Z2.OPENSVC.COM.POOL#2 - INFO - zpool import z2_data
Z2.OPENSVC.COM.FS#1 - INFO - fs(z2_root/ROOT/zbe /z2_root/root) is
already mounted
Z2.OPENSVC.COM.FS#7 - INFO - fs(z2_data/appdata1 /z2_root/root/appdata1)
is already mounted
Z2.OPENSVC.COM.FS#2 - INFO - fs(z2_data/appdata2 /z2_root/root/appdata2)
is already mounted
Z2.OPENSVC.COM.FS#3 - INFO - fs(z2_data/appdata3 /z2_root/root/appdata3)
is already mounted
Z2.OPENSVC.COM.FS#5 - INFO - fs(z2_data/appdata4/subds
/z2_root/root/appdata3/subdir) is already mounted
Z2.OPENSVC.COM.FS#4 - INFO - fs(z2_data/appdata4 /z2_root/root/appdata4)
is already mounted
Z2.OPENSVC.COM.FS#6 - INFO - fs(z2_data/appdata3/subds
/z2_root/root/appdata4/subdir) is already mounted
cyril.galibern
http://www.opensvc.com
_______________________________________________
zones-discuss mailing list
zones-discuss@opensolaris.org