flying zones für Arme – Teil 3: Liveupgrade und ZFS für zoneroot

Wie im letzten Artikel berichtet bin ich beim Liveupgrade über ein Problem gestolpert. Ausgangssituation war eine Solaris10u6-Installation mit ZFS-root-filesystem und eine zone, die sich in einem seperaten ZFS-Pool auf shared disks befand. Das sollte die Möglichkeit der Zonenmigration auf einen anderen phys. Rechner bieten.

Das lucreate-Kommando des Solaris Liveupgrade verschluckte sich aber am seperaten ZFS-Pool. Deshalb führte ich das Patchen zunächst ohne Zone durch (detached) und machte dann einen upgrade-on-attach.

Trotzdem wollte ich nun wissen, warum das nicht komplett mit Liveupgrade klappte. Nach etwas Experimentieren stellte sich heraus, dass lucreate nicht mit dem Zonen-Root direkt im ZFS-Pool umgehen kann. Das Zonen-Root muss in einem untergeordneten Filesystem des Pools liegen.

Hier der Beweis (die Zone wurde bereits von /zone1 nach /zone1/zoneroot umgezogen):

bash-3.00# lustatus
Boot Environment           Is       Active Active    Can    Copy
Name                       Complete Now    On Reboot Delete Status
————————– ——– —— ——— —— ———-
s10x_u6wos_07b             yes      no     no        yes    -
s10u6_recpatches           yes      yes    yes       no     -

bash-3.00# lucreate -n zone_lu_test
Checking GRUB menu…
System has findroot enabled GRUB
Analyzing system configuration.
Comparing source boot environment <s10u6_recpatches> file systems with the
file system(s) you specified for the new boot environment. Determining
which file systems should be in the new boot environment.
Updating boot environment description database on all BEs.
Updating system configuration files.
Creating configuration for boot environment <zone_lu_test>.
Source boot environment is <s10u6_recpatches>.
Creating boot environment <zone_lu_test>.
Cloning file systems from boot environment <s10u6_recpatches> to create boot environment <zone_lu_test>.
Creating snapshot for <rpool/ROOT/s10u6_recpatches> on <rpool/ROOT/s10u6_recpatches@zone_lu_test>.
Creating clone for <rpool/ROOT/s10u6_recpatches@zone_lu_test> on <rpool/ROOT/zone_lu_test>.
Setting canmount=noauto for </> in zone <global> on <rpool/ROOT/zone_lu_test>.
Creating snapshot for <zone1/zoneroot> on <zone1/zoneroot@zone_lu_test>.
Creating clone for <zone1/zoneroot@zone_lu_test> on <zone1/zoneroot-zone_lu_test>.

Saving existing file </boot/grub/menu.lst> in top level dataset for BE <s10x_u6wos_07b> as <mount-point>//boot/grub/menu.lst.prev.
Saving existing file </boot/grub/menu.lst> in top level dataset for BE <zone_lu_test> as <mount-point>//boot/grub/menu.lst.prev.
File </boot/grub/menu.lst> propagation successful
Copied GRUB menu from PBE to ABE
No entry for BE <zone_lu_test> in GRUB menu
Population of boot environment <zone_lu_test> successful.
Creation of boot environment <zone_lu_test> successful.

bash-3.00# lustatus
Boot Environment           Is       Active Active    Can    Copy
Name                       Complete Now    On Reboot Delete Status
————————– ——– —— ——— —— ———-
s10x_u6wos_07b             yes      no     no        yes    -
s10u6_recpatches           yes      yes    yes       no     -
zone_lu_test               yes      no     no        yes    -

bash-3.00# zfs list
NAME                                         USED  AVAIL  REFER  MOUNTPOINT
patches                                     2.69G  5.12G  2.69G  /patches
rpool                                       6.63G  1.19G    40K  /rpool
rpool/ROOT                                  5.24G  1.19G    18K  legacy
rpool/ROOT/s10u6_recpatches                 1.39G  1.19G  4.48G  /
rpool/ROOT/s10u6_recpatches@zone_lu_test    82.5K      -  4.48G  -
rpool/ROOT/s10x_u6wos_07b                   3.86G  1.19G  3.81G  /
rpool/ROOT/s10x_u6wos_07b@s10u6_recpatches  50.5M      -  3.81G  -
rpool/ROOT/zone_lu_test                      163K  1.19G  4.48G  /
rpool/dump                                   900M  1.19G   900M  -
rpool/export                                  37K  1.19G    19K  /export
rpool/export/home                             18K  1.19G    18K  /export/home
rpool/swap                                   512M  1.45G   244M  -
testpool                                     155M   202K   154M  /testpool
zone1                                        871M  1.10G   871M  /zone1
zone1/zoneroot                                18K  1.10G    18K  /zone1/zoneroot
zone1/zoneroot@zone_lu_test                     0      -    18K  -
zone1/zoneroot-zone_lu_test                     0  1.10G    18K  /zone1/zoneroot-zone_lu_test

Nachtrag

Heute habe ich den Liveupgradetest weitergeführt und eine gehörige Überraschung erlebt.

bash-3.00#  cd /patches/java_es_required_os_patches_solaris10-x86

bash-3.00# luupgrade -n zone_lu_test -s /patches/java_es_required_os_patches_solaris10-x86 -t `cat  patch_order`
System has findroot enabled GRUB
No entry for BE <zone_lu_test> in GRUB menu
Validating the contents of the media </patches/java_es_required_os_patches_solaris10-x86>.
The media contains 19 software patches that can be added.
Mounting the BE <zone_lu_test>.
ERROR: mount point </a/zone1> is already in use, mounted on </zone1>
ERROR: failed to create mount point </a/zone1> for file system </zone1>
ERROR: unmounting partially mounted boot environment file systems
ERROR: cannot mount boot environment by icf file </tmp/.luupgrade.beicf.12595>
cat: cannot open /tmp/.luupgrade.tmp.12595
ERROR: Unable to mount ABE disk slices: < >.
ERROR: Unable to mount the BE <zone_lu_test>.

bash-3.00# zfs list
NAME                                         USED  AVAIL  REFER  MOUNTPOINT
patches                                     2.88G  4.93G  2.88G  /patches
rpool                                       6.63G  1.18G    40K  /rpool
rpool/ROOT                                  5.25G  1.18G    18K  legacy
rpool/ROOT/s10u6_recpatches                 1.40G  1.18G  4.49G  /
rpool/ROOT/s10u6_recpatches@zone_lu_test     103K      -  4.49G  -
rpool/ROOT/s10x_u6wos_07b                   3.86G  1.18G  3.81G  /
rpool/ROOT/s10x_u6wos_07b@s10u6_recpatches  50.5M      -  3.81G  -
rpool/ROOT/zone_lu_test                      172K  1.18G  4.49G  /a/
rpool/dump                                   900M  1.18G   900M  -
rpool/export                                  37K  1.18G    19K  /export
rpool/export/home                             18K  1.18G    18K  /export/home
rpool/swap                                   512M  1.44G   244M  -
testpool                                     155M   202K   154M  /testpool
zone1                                        871M  1.10G   871M  /zone1
zone1/zoneroot                                18K  1.10G    18K  /zone1/zoneroot
zone1/zoneroot@zone_lu_test                     0      -    18K  -
zone1/zoneroot-zone_lu_test                     0  1.10G    18K  /zone1/zoneroot-zone_lu_test

So, so… Das klappt wohl nicht wie geplant.

bash-3.00# lumount zone_lu_test /b
ERROR: unable to mount zones:
cannot mount ‘/zone1/zoneroot’: directory is not empty
zoneadm: zone ‘zone1′: zone root /zone1/zoneroot/root already in use by zone zone1
zoneadm: zone ‘zone1′: call to zoneadmd failed
ERROR: unable to mount zone <zone1> in </b>
ERROR: unmounting partially mounted boot environment file systems
ERROR: No such file or directory: error unmounting <rpool/ROOT/zone_lu_test>
ERROR: umount: warning: rpool/ROOT/zone_lu_test not in mnttab
umount: rpool/ROOT/zone_lu_test no such file or directory
ERROR: cannot unmount <rpool/ROOT/zone_lu_test>
ERROR: cannot mount boot environment by name <zone_lu_test>


bash-3.00# zfs list
NAME                                         USED  AVAIL  REFER  MOUNTPOINT
patches                                     2.88G  4.93G  2.88G  /patches
rpool                                       6.63G  1.18G    40K  /rpool
rpool/ROOT                                  5.25G  1.18G    18K  legacy
rpool/ROOT/s10u6_recpatches                 1.40G  1.18G  4.49G  /
rpool/ROOT/s10u6_recpatches@zone_lu_test     116K      -  4.49G  -
rpool/ROOT/s10x_u6wos_07b                   3.86G  1.18G  3.81G  /
rpool/ROOT/s10x_u6wos_07b@s10u6_recpatches  50.5M      -  3.81G  -
rpool/ROOT/zone_lu_test                      172K  1.18G  4.49G  /b
rpool/dump                                   900M  1.18G   900M  -
rpool/export                                  37K  1.18G    19K  /export
rpool/export/home                             18K  1.18G    18K  /export/home
rpool/swap                                   512M  1.44G   244M  -
testpool                                     155M   202K   154M  /testpool
zone1                                        871M  1.10G   871M  /zone1
zone1/zoneroot                                18K  1.10G    18K  /zone1/zoneroot
zone1/zoneroot@zone_lu_test                     0      -    18K  -
zone1/zoneroot-zone_lu_test                     0  1.10G    18K  /zone1/zoneroot

bash-3.00# lumount
s10u6_recpatches on /

Also irgendwie scheint der lumount mit der Zone azf seperaten ZFS-Pool nicht zurecht zu kommen.

Fazit

Gibt es also tatsächlich nur upgrade-on-attach als funktionierende Variante für Zonen auf seperaten ZFS-Pools? Hat hier jemand Anregungen oder Erfahrungen? Bitte die Kommentarfunktion nutzen…

This entry was posted in Solaris, Virtualisierung, ZFS and tagged , , , , . Bookmark the permalink.

One Response to flying zones für Arme – Teil 3: Liveupgrade und ZFS für zoneroot

  1. Kai says:

    Eventuell ähnliches Problem wie bei sep. /var und /opt ZFS-Dateisystemen innerhalb des RPOOLs. Damit der LiveUpgrade des RPOOLs – vor und wieder zurück – funktionierte, mußte ich für besagte ZFS-Dateisysteme die Option “canmount=nouato” setzen. Ich hatte jeweils auch so eine Meldung wie “cannont mount xxx/xxxx …. directory is not emty” Danach ging’s
    Gruß, Kai

Hinterlasse eine Antwort

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind markiert *

*

Du kannst folgende HTML-Tags benutzen: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>