Posts Tagged “ZFS”

Vorlesen mit webReader

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…

Comments 1 Kommentar »

Vorlesen mit webReader

Zuletzt habe ich darüber geschrieben wie man mit Vmware Server 2.01 und Solaris10 ein sog. “flying zones”-Szenario aufbauen kann. D.h. man installiert eine Solaris-Zone auf einer shared disk und kann dann  eine sog. Zonenmigration durchführen. D.h. die Zone und die Filesysteme der Zone werden am ersten Rechner exportiert und am zweiten Rechner wird das Ganze dann wieder importiert.

serielles Patching und Zonen

Ein leidiges Thema, insbesondere bei Solaris Zonen, ist das Installieren von Patches. In regelmäßigen Abständen wird man z.B. dazu angehalten das “recommended patch cluster” zu installieren. In der Regel befinden sich Kernelpatches in den Patch-Sammlungen, so dass eine Installation im Single-User-Modus erforderlich ist. Zudem müssen auch alle Zonen beim Patchen verfügbar sein (nicht detached!). Das Standard-Patchinstallationstool von Sun arbeitet dann die Patchinstallation sequentiell ab. Bei einer größeren Anzahl Zonen kann das u.U. zeitkrisch werden.

Parallel Patching, Solaris Liveupgrade, Neuerungen in Solaris10u6 10/08

Gute Neuigkeiten gibt es bei Jeff Victor. Demnächst soll also eine neue Version des patchadd-Kommandos das parallele Patchen von Zonen beherrschen. Aber auch das ist u.U. noch zu zeitinsiv. Seit längerem gibt es bereits die Software Solaris Liveupgrade, die zum Patchen oder Upgraden auf ein neues Release benutzt werden kann. Dabei wird zunächst vom laufenden Solaris eine Kopie erzeugt, ein sog. boot environment (BE), auf der dann die Patches bzw. das Upgrade angewendet werden. Das ganze passiert im normalen Onlinebetrieb. Ist die Aktionen abgeschlossen, wird vom alternativen BE gebootet. Gibt es Ärger hat man ein Fallback auf das verherige BE.

Zunächst wurde Liveupgrade “zone aware” gemacht. D.h. auch Zonen können seit einiger Zeit damit aktualisiert werden. Im Solaris10u6 kam dann die Unterstützung für ZFS-root (ZFS-Pool als Bootumgebung für das Rootfilesystem) und “upgrade-on-attach”. War eine Zone beim Upgrade detached und hat somit einen älteren Stand kann nun beim Attach die Aktualisierung nachgeholt werden.

Infos zum Thema gibt es hier:

Solaris 10 10/08 Installation Guide: Solaris Live Upgrade and Upgrade Planning

Solution  206844: Solaris[TM] Live Upgrade Software: Minimum Patch Requirements

Solaris Liveupgrade bei S10u6 im Praxiseinsatz

Ich möchte also nun die Umgebung aus dem letzten Artikel auf Basis Solaris10u6 mit Hilfe von Liveupgrade auf das aktuelle recommended patch cluster patchen.

bash-3.00# cat /etc/release
Solaris 10 10/08 s10x_u6wos_07b X86
Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
Use is subject to license terms.
Assembled 27 October 2008

# zoneadm list -cv
ID NAME             STATUS     PATH                           BRAND    IP
0 global           running    /                              native   shared
1 zone1            running    /zone1                         native   shared

# lustatus
ERROR: No boot environments are configured on this system
ERROR: cannot determine list of all boot environment names

# lucreate -n s10u6_recpatches
Checking GRUB menu…
Analyzing system configuration.
No name for current boot environment.
INFORMATION: The current boot environment is not named – assigning name <s10x_u6wos_07b>.
Current boot environment is named <s10x_u6wos_07b>.
Creating initial configuration for primary boot environment <s10x_u6wos_07b>.
The device </dev/dsk/c1t0d0s0> is not a root device for any boot environment; cannot get BE ID.
PBE configuration successful: PBE name <s10x_u6wos_07b> PBE Boot Device </dev/dsk/c1t0d0s0>.
Comparing source boot environment <s10x_u6wos_07b> 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 <s10u6_recpatches>.
Source boot environment is <s10x_u6wos_07b>.
Creating boot environment <s10u6_recpatches>.
Cloning file systems from boot environment <s10x_u6wos_07b> to create boot environment <s10u6_recpatches>.
Creating snapshot for <rpool/ROOT/s10x_u6wos_07b> on <rpool/ROOT/s10x_u6wos_07b@s10u6_recpatches>.
Creating clone for <rpool/ROOT/s10x_u6wos_07b@s10u6_recpatches> on <rpool/ROOT/s10u6_recpatches>.
Setting canmount=noauto for </> in zone <global> on <rpool/ROOT/s10u6_recpatches>.
Creating snapshot for <zone1> on <zone1@s10u6_recpatches>.
cannot create ‘.’: missing dataset name
Creating clone for <zone1@s10u6_recpatches> on <zone1-s10u6_recpatches>.
ERROR: cannot create ‘zone1-s10u6_recpatches’: missing dataset name
ERROR: Unable to clone <> on <>.
/usr/lib/lu/luclonefs: zone1@s10u6_recpatches: not found
cannot open ‘zone1-s10u6_recpatches’: dataset does not exist
cannot open ‘zone1-s10u6_recpatches’: dataset does not exist
cannot open ‘zone1-s10u6_recpatches’: dataset does not exist

Saving existing file </boot/grub/menu.lst> in top level dataset for BE <s10u6_recpatches> 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 <s10u6_recpatches> in GRUB menu
Population of boot environment <s10u6_recpatches> successful.
Creation of boot environment <s10u6_recpatches> successful.

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

bash-3.00# zpool list
NAME    SIZE   USED  AVAIL    CAP  HEALTH  ALTROOT
rpool  7.94G  6.78G  1.15G    85%  ONLINE  -
zone1  1.98G   546M  1.45G    26%  ONLINE  -

bash-3.00# zfs list
NAME                                         USED  AVAIL  REFER  MOUNTPOINT
rpool                                       7.07G   766M  38.5K  /rpool
rpool/ROOT                                  5.68G   766M    18K  legacy
rpool/ROOT/s10u6_recpatches                  156K   766M  3.77G  /a/
rpool/ROOT/s10x_u6wos_07b                   5.68G   766M  5.67G  /
rpool/ROOT/s10x_u6wos_07b@s10u6_recpatches  12.0M      -  3.77G  -
rpool/dump                                   900M   766M   900M  -
rpool/export                                  37K   766M    19K  /export
rpool/export/home                             18K   766M    18K  /export/home
rpool/swap                                   512M  1.03G   222M  -
zone1                                        546M  1.42G   545M  /zone1
zone1@s10u6_recpatches                       619K      -   545M  -

bash-3.00# cd /patches/10_x86_Recommended

bash-3.00# luupgrade -n s10u6_recpatches -s /patches/10_x86_Recommended -t `cat  patch_order`
System has findroot enabled GRUB
No entry for BE <s10u6_recpatches> in GRUB menu
Validating the contents of the media </patches/10_x86_Recommended>.
The media contains 152 software patches that can be added.
Mounting the BE <s10u6_recpatches>.
ERROR: unable to mount zones:
/a/zone1 must not be group readable.
/a/zone1 must not be group executable.
/a/zone1 must not be world readable.
/a/zone1 must not be world executable.

could not verify zonepath /a/zone1 because of the above errors.
zoneadm: zone zone1 failed to verify
ERROR: unable to mount zone <zone1> in </a>
ERROR: unmounting partially mounted boot environment file systems
ERROR: cannot mount boot environment by icf file </tmp/.luupgrade.beicf.4645>
cat: cannot open /tmp/.luupgrade.tmp.4645
ERROR: Unable to mount ABE disk slices: < >.
ERROR: Unable to mount the BE <s10u6_recpatches>.

bash-3.00# lumount s10u6_recpatches /a
ERROR: unable to mount zones:
/a/zone1 must not be group readable.
/a/zone1 must not be group executable.
/a/zone1 must not be world readable.
/a/zone1 must not be world executable.
could not verify zonepath /a/zone1 because of the above errors.
zoneadm: zone zone1 failed to verify
ERROR: unable to mount zone <zone1> in </a>
ERROR: unmounting partially mounted boot environment file systems
ERROR: No such file or directory: error unmounting <rpool/ROOT/s10u6_recpatches>
ERROR: umount: warning: rpool/ROOT/s10u6_recpatches not in mnttab
umount: rpool/ROOT/s10u6_recpatches no such file or directory
ERROR: cannot unmount <rpool/ROOT/s10u6_recpatches>
ERROR: cannot mount boot environment by name <s10u6_recpatches>

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

bash-3.00# ludelete s10u6_recpatches
System has findroot enabled GRUB
Checking if last BE on any disk…
ERROR: unable to mount zones:
/.alt.s10u6_recpatches/zone1 must not be group readable.
/.alt.s10u6_recpatches/zone1 must not be group executable.
/.alt.s10u6_recpatches/zone1 must not be world readable.
/.alt.s10u6_recpatches/zone1 must not be world executable.
could not verify zonepath /.alt.s10u6_recpatches/zone1 because of the above errors.
zoneadm: zone zone1 failed to verify
ERROR: unable to mount zone <zone1> in </.alt.s10u6_recpatches>
ERROR: unmounting partially mounted boot environment file systems
ERROR: No such file or directory: error unmounting <rpool/ROOT/s10u6_recpatches>
ERROR: umount: warning: rpool/ROOT/s10u6_recpatches not in mnttab
umount: rpool/ROOT/s10u6_recpatches no such file or directory
ERROR: cannot unmount <rpool/ROOT/s10u6_recpatches>
ERROR: cannot mount boot environment by name <s10u6_recpatches>
ERROR: Failed to mount BE <s10u6_recpatches>.
ERROR: Failed to mount BE <s10u6_recpatches>.
cat: cannot open /tmp/.lulib.luclb.dsk.5254.s10u6_recpatches
ERROR: This boot environment <s10u6_recpatches> is the last BE on the above disk.
ERROR: Deleting this BE may make it impossible to boot from this disk.
ERROR: However you may still boot solaris if you have BE(s) on other disks.
ERROR: You *may* have to change boot-device order in the BIOS to accomplish this.
ERROR: If you still want to delete this BE <s10u6_recpatches>, please use the force option (-f).
Unable to delete boot environment.

bash-3.00# ludelete -f s10u6_recpatches
System has findroot enabled GRUB
No entry for BE <s10u6_recpatches> in GRUB menu
Determining the devices to be marked free.
Updating boot environment configuration database.
Updating boot environment description database on all BEs.
Updating all boot environment configuration databases.
Boot environment <s10u6_recpatches> deleted.

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

bash-3.00# zfs list
NAME                        USED  AVAIL  REFER  MOUNTPOINT
rpool                      7.11G   715M  38.5K  /rpool
rpool/ROOT                 5.73G   715M    18K  legacy
rpool/ROOT/s10x_u6wos_07b  5.73G   715M  5.73G  /
rpool/dump                  900M   715M   900M  -
rpool/export                 37K   715M    19K  /export
rpool/export/home            18K   715M    18K  /export/home
rpool/swap                  512M   984M   243M  -
zone1                       546M  1.42G   545M  /zone1
zone1@s10u6_recpatches      619K      -   545M  -

bash-3.00# zfs destroy zone1@s10u6_recpatches

bash-3.00# zfs list
NAME                        USED  AVAIL  REFER  MOUNTPOINT
rpool                      7.11G   715M  38.5K  /rpool
rpool/ROOT                 5.73G   715M    18K  legacy
rpool/ROOT/s10x_u6wos_07b  5.73G   715M  5.73G  /
rpool/dump                  900M   715M   900M  -
rpool/export                 37K   715M    19K  /export
rpool/export/home            18K   715M    18K  /export/home
rpool/swap                  512M   984M   243M  -
zone1                       545M  1.42G   545M  /zone1

Na bravo! Das war ja der totale Reinfall…

Scheinbar kommt Liveupgrade nicht damit klar, dass die Zone in einem seperaten ZFS-Pool liegt. Das ist aber für die Zonenmigration unabdingbar.

neuer Versuch – Liveupgrade ohne Zonen, nur für ZFS-root

Dazu also erst einmal die Zone1 verschwinden lassen…

bash-3.00# zoneadm -z zone1 detach

bash-3.00# metaset -s zone1data -r

bash-3.00# metaset
Set name = zone1data, Set number = 1
Host                Owner
horst1
horst2
Drive    Dbase
c2t1d0   Yes
c3t1d0   Yes

bash-3.00# zpool export zone1

bash-3.00# zpool list
NAME      SIZE   USED  AVAIL    CAP  HEALTH  ALTROOT
patches  7.94G  2.69G  5.25G    33%  ONLINE  -
rpool    7.94G  4.93G  3.01G    62%  ONLINE  -

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

bash-3.00# lucreate -n s10u6_recpatches
Checking GRUB menu…
System has findroot enabled GRUB
Analyzing system configuration.
Comparing source boot environment <s10x_u6wos_07b> 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 <s10u6_recpatches>.
Source boot environment is <s10x_u6wos_07b>.
Creating boot environment <s10u6_recpatches>.
Cloning file systems from boot environment <s10x_u6wos_07b> to create boot environment <s10u6_recpatches>.
Creating snapshot for <rpool/ROOT/s10x_u6wos_07b> on <rpool/ROOT/s10x_u6wos_07b@s10u6_recpatches>.
Creating clone for <rpool/ROOT/s10x_u6wos_07b@s10u6_recpatches> on <rpool/ROOT/s10u6_recpatches>.
Setting canmount=noauto for </> in zone <global> on <rpool/ROOT/s10u6_recpatches>.
Saving existing file </boot/grub/menu.lst> in top level dataset for BE <s10u6_recpatches> 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 <s10u6_recpatches> in GRUB menu
Population of boot environment <s10u6_recpatches> successful.
Creation of boot environment <s10u6_recpatches> successful.

Na gut, das Erstellen des alternate BE hat also soweit geklappt. Nun zum Patchen..

bash-3.00# cd /patches/10_x86_Recommended/

bash-3.00# luupgrade -n s10u6_recpatches -s /patches/10_x86_Recommended -t `cat  patch_order`
System has findroot enabled GRUB
No entry for BE <s10u6_recpatches> in GRUB menu
Validating the contents of the media </patches/10_x86_Recommended>.
The media contains 152 software patches that can be added.
Mounting the BE <s10u6_recpatches>.
Adding patches to the BE <s10u6_recpatches>.
Validating patches…
Loading patches installed on the system…
Done!
Loading patches requested to install.
Version of package SUNWmctag from directory SUNWmctag in patch 121212-02 differs from the package installed on the system.
Version of package SUNWmcosx from directory SUNWmcosx in patch 121212-02 differs from the package installed on the system.
Version of package SUNWmcon from directory SUNWmcon in patch 121212-02 differs from the package installed on the system.
Version of package SUNWmcos from directory SUNWmcos in patch 121212-02 differs from the package installed on the system.
Done!
The following requested patches have packages not installed on the system
Package SUNWgzipS from directory SUNWgzipS in patch 120720-02 is not installed on the system. Changes for package SUNWgzipS will not be applied to the system.
Package SUNWbzipS from directory SUNWbzipS in patch 126869-03 is not installed on the system. Changes for package SUNWbzipS will not be applied to the system.
Package SUNWbreg from directory SUNWbreg in patch 121454-02 is not installed on the system. Changes for package SUNWbreg will not be applied to the system.
Package SUNWdc from directory SUNWdc in patch 121454-02 is not installed on the system. Changes for package SUNWdc will not be applied to the system.
Package SUNWbreg from directory SUNWbreg in patch 121454-02 is not installed on the system. Changes for package SUNWbreg will not be applied to the system.
Package SUNWdc from directory SUNWdc in patch 121454-02 is not installed on the system. Changes for package SUNWdc will not be applied to the system.
Package SUNWsmaS from directory SUNWsmaS in patch 120273-25 is not installed on the system. Changes for package SUNWsmaS will not be applied to the system.
Package SUNWsmbaS from directory SUNWsmbaS in patch 119758-14 is not installed on the system. Changes for package SUNWsmbaS will not be applied to the system.
Package SUNWpostgr-jdbcS from directory SUNWpostgr-jdbcS in patch 123591-09 is not installed on the system. Changes for package SUNWpostgr-jdbcS will not be applied to the system.
Package SUNWpostgrS from directory SUNWpostgrS in patch 123591-09 is not installed on the system. Changes for package SUNWpostgrS will not be applied to the system.
Package SUNWpostgr-tclS from directory SUNWpostgr-tclS in patch 123591-09 is not installed on the system. Changes for package SUNWpostgr-tclS will not be applied to the system.
Package SUNWkxplt from directory SUNWkxplt in patch 120415-23 is not installed on the system. Changes for package SUNWkxplt will not be applied to the system.
Package SUNWinleu from directory SUNWinleu in patch 120415-23 is not installed on the system. Changes for package SUNWinleu will not be applied to the system.
Package SUNWhkleu from directory SUNWhkleu in patch 120415-23 is not installed on the system. Changes for package SUNWhkleu will not be applied to the system.
Package SUNWcxplt from directory SUNWcxplt in patch 120415-23 is not installed on the system. Changes for package SUNWcxplt will not be applied to the system.
Package SUNWhleu from directory SUNWhleu in patch 120415-23 is not installed on the system. Changes for package SUNWhleu will not be applied to the system.
Package SUNWhleu2 from directory SUNWhleu2 in patch 120415-23 is not installed on the system. Changes for package SUNWhleu2 will not be applied to the system.
Package SUNWkleu from directory SUNWkleu in patch 120415-23 is not installed on the system. Changes for package SUNWkleu will not be applied to the system.
Package SUNWtleu from directory SUNWtleu in patch 120415-23 is not installed on the system. Changes for package SUNWtleu will not be applied to the system.
Package SUNWhkplt from directory SUNWhkplt in patch 120415-23 is not installed on the system. Changes for package SUNWhkplt will not be applied to the system.
Package SUNWinplt from directory SUNWinplt in patch 120415-23 is not installed on the system. Changes for package SUNWinplt will not be applied to the system.
Package SUNWtxplt from directory SUNWtxplt in patch 120415-23 is not installed on the system. Changes for package SUNWtxplt will not be applied to the system.
Package SUNWhxplt from directory SUNWhxplt in patch 120415-23 is not installed on the system. Changes for package SUNWhxplt will not be applied to the system.
Package SUNWsunpinyin from directory SUNWsunpinyin in patch 120415-23 is not installed on the system. Changes for package SUNWsunpinyin will not be applied to the system.
Package SUNWsibi from directory SUNWsibi in patch 119082-25 is not installed on the system. Changes for package SUNWsibi will not be applied to the system.
Package SUNWapchS from directory SUNWapchS in patch 122912-15 is not installed on the system. Changes for package SUNWapchS will not be applied to the system.
Package SUNWgrubS from directory SUNWgrubS in patch 138884-01 is not installed on the system. Changes for package SUNWgrubS will not be applied to the system.
Package SUNWsibi from directory SUNWsibi in patch 124629-10 is not installed on the system. Changes for package SUNWsibi will not be applied to the system.
Package SUNWsibi from directory SUNWsibi in patch 119253-31 is not installed on the system. Changes for package SUNWsibi will not be applied to the system.
Package SUNWTkS from directory SUNWTkS in patch 137872-02 is not installed on the system. Changes for package SUNWTkS will not be applied to the system.
Package SUNWipmiS from directory SUNWipmiS in patch 119765-06 is not installed on the system. Changes for package SUNWipmiS will not be applied to the system.
Package SUNWj5jmp from directory SUNWj5jmp in patch 118668-19 is not installed on the system. Changes for package SUNWj5jmp will not be applied to the system.
Package SUNWpngS from directory SUNWpngS in patch 137081-01 is not installed on the system. Changes for package SUNWpngS will not be applied to the system.
Package SUNWsibi from directory SUNWsibi in patch 124631-24 is not installed on the system. Changes for package SUNWsibi will not be applied to the system.
Package SUNWgtarS from directory SUNWgtarS in patch 139100-01 is not installed on the system. Changes for package SUNWgtarS will not be applied to the system.
Package SUNWbindS from directory SUNWbindS in patch 119784-10 is not installed on the system. Changes for package SUNWbindS will not be applied to the system.
Package SUNWzebraS from directory SUNWzebraS in patch 126207-04 is not installed on the system. Changes for package SUNWzebraS will not be applied to the system.
Package SUNWcleu2 from directory SUNWcleu2 in patch 120413-09 is not installed on the system. Changes for package SUNWcleu2 will not be applied to the system.
Package SUNWmysqlS from directory SUNWmysqlS in patch 120293-02 is not installed on the system. Changes for package SUNWmysqlS will not be applied to the system.
Package SUNWimagickS from directory SUNWimagickS in patch 136883-02 is not installed on the system. Changes for package SUNWimagickS will not be applied to the system.
Package SUNWapch2S from directory SUNWapch2S in patch 120544-14 is not installed on the system. Changes for package SUNWapch2S will not be applied to the system.
Package SUNWlxmlS from directory SUNWlxmlS in patch 125732-04 is not installed on the system. Changes for package SUNWlxmlS will not be applied to the system.
The following requested patches are already installed on the system
Requested patch 120720-02 is already installed on the system.
Requested patch 121297-01 is already installed on the system.
Requested patch 122035-05 is already installed on the system.
Requested patch 118344-14 is already installed on the system.
Requested patch 118919-21 is already installed on the system.
Requested patch 120901-03 is already installed on the system.
Requested patch 121334-04 is already installed on the system.
Requested patch 123840-04 is already installed on the system.
Requested patch 127756-01 is already installed on the system.
Requested patch 117435-02 is already installed on the system.
Requested patch 121264-01 is already installed on the system.
Requested patch 119575-02 is already installed on the system.
Requested patch 113000-07 is already installed on the system.
Requested patch 138218-01 is already installed on the system.
Requested patch 121454-02 is already installed on the system.
Requested patch 121454-02 is already installed on the system.
Requested patch 118855-36 is already installed on the system.
Requested patch 126424-03 is already installed on the system.
Requested patch 122641-06 is already installed on the system.
Requested patch 125548-02 is already installed on the system.
Requested patch 125504-02 is already installed on the system.
Requested patch 120012-14 is already installed on the system.
Requested patch 127128-11 is already installed on the system.
Requested patch 119318-01 is already installed on the system.
Requested patch 123612-05 is already installed on the system.
Requested patch 123591-09 is already installed on the system.
Requested patch 128412-01 is already installed on the system.
Requested patch 125542-03 is already installed on the system.
Requested patch 121976-01 is already installed on the system.
Requested patch 138182-01 is already installed on the system.
Requested patch 120202-06 is already installed on the system.
Requested patch 119082-25 is already installed on the system.
Requested patch 138884-01 is already installed on the system.
Requested patch 137138-09 is already installed on the system.
Requested patch 124445-01 is already installed on the system.
Requested patch 126541-02 is already installed on the system.
Requested patch 136999-05 is already installed on the system.
Requested patch 137872-02 is already installed on the system.
Requested patch 138276-01 is already installed on the system.
Requested patch 119765-06 is already installed on the system.
Requested patch 138362-01 is already installed on the system.
Requested patch 119811-05 is already installed on the system.
Requested patch 120330-02 is already installed on the system.
Requested patch 138323-02 is already installed on the system.
Requested patch 128001-01 is already installed on the system.
Requested patch 124189-02 is already installed on the system.
Requested patch 138270-02 is already installed on the system.
Requested patch 119131-33 is already installed on the system.
Requested patch 119901-06 is already installed on the system.
Requested patch 137081-01 is already installed on the system.
Requested patch 123614-01 is already installed on the system.
Requested patch 138624-02 is already installed on the system.
Requested patch 118960-03 is already installed on the system.
Requested patch 128329-01 is already installed on the system.
Requested patch 136840-01 is already installed on the system.
Requested patch 121013-02 is already installed on the system.
Requested patch 119116-34 is already installed on the system.
Requested patch 124458-01 is already installed on the system.
Requested patch 124998-01 is already installed on the system.
Requested patch 138877-01 is already installed on the system.
Requested patch 126207-04 is already installed on the system.
Requested patch 120236-01 is already installed on the system.
Requested patch 138266-01 is already installed on the system.
Requested patch 138105-01 is already installed on the system.
Requested patch 127854-02 is already installed on the system.
Requested patch 138374-02 is already installed on the system.
Requested patch 137033-01 is already installed on the system.
Requested patch 119813-08 is already installed on the system.
Requested patch 120293-02 is already installed on the system.
Requested patch 123939-01 is already installed on the system.
Requested patch 137094-01 is already installed on the system.
Requested patch 121096-02 is already installed on the system.
Requested patch 124939-03 is already installed on the system.
Requested patch 119987-03 is already installed on the system.
Requested patch 137322-01 is already installed on the system.
Requested patch 119904-02 is already installed on the system.
Requested patch 120831-06 is already installed on the system.
Requested patch 126441-01 is already installed on the system.
Requested patch 125280-05 is already installed on the system.
The following requested patches do not update any packages installed on the system
No Packages from patch 121212-02 are installed on the system.
Checking patches that you specified for installation.
Done!
The following requested patches will not be installed because
they have been made obsolete by other patches already
installed on the system or by patches you have specified for installation.
0 All packages from patch 118844-20 are patched by higher revision patches.
1 All packages from patch 122661-08 are patched by higher revision patches.
2 All packages from patch 124205-05 are patched by higher revision patches.
The following requested patches will not be installed because
the packages they patch are not installed on this system.
0 No Packages from patch 120415-23 are installed on the system.
1 No Packages from patch 120413-09 are installed on the system.
Approved patches will be installed in this order:
126869-03 126420-02 119255-65 126539-02 121119-15 120273-25 119758-14 126366-14
120740-05 119060-45 120411-30 122912-15 141009-01 125556-02 137122-06 138628-07
124629-10 119253-31 138372-06 125540-06 137128-05 119214-18 140775-03 123896-10
118668-19 139499-04 121309-16 119314-26 122213-32 139463-02 125185-11 121395-03
138857-02 118669-19 140384-01 120200-15 124631-24 138264-03 139100-01 138286-02
119784-10 119091-32 138224-03 138882-02 139482-01 138242-05 140145-01 119247-35
120223-31 139580-02 125165-13 125953-18 139501-02 139561-02 125333-05 139484-05
141015-01 124394-09 140456-01 136883-02 120095-22 125720-28 120544-14 125732-04
126364-07 138254-02 138867-02 138889-08
Checking installed patches…
Verifying sufficient filesystem capacity (dry run method)…
Installing patch packages…
Patch 126869-03 has been successfully installed.
See /a/var/sadm/patch/126869-03/log for details
Patch packages installed:
SUNWbzip
SUNWsfman
Checking installed patches…
Verifying sufficient filesystem capacity (dry run method)…
Installing patch packages…
Patch 126420-02 has been successfully installed.
See /a/var/sadm/patch/126420-02/log for details
Patch packages installed:
SUNWcsr
SUNWcsu

Patch 138889-08 has been successfully installed.
See /a/var/sadm/patch/138889-08/log for details
Patch packages installed:
SUNWcakr
SUNWckr
SUNWcpcu
SUNWcsd
SUNWcsl
SUNWcslr
SUNWcsr
SUNWcsu
SUNWdtrc
SUNWesu
SUNWhea
SUNWib
SUNWibsdpib
SUNWipfh
SUNWipfu
SUNWmdb
SUNWmdbr
SUNWnxge
SUNWos86r
SUNWrds
SUNWroute
SUNWtavor
Unmounting the BE <s10u6_recpatches>.
The patch add to the BE <s10u6_recpatches> completed.

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

Nach dem erfolgreichen Patchen nun also vom neuen BE starten…

bash-3.00# luactivate s10u6_recpatches
System has findroot enabled GRUB
Generating boot-sign, partition and slice information for PBE <s10x_u6wos_07b>
Saving existing file </etc/bootsign> in top level dataset for BE <s10x_u6wos_07b> as <mount-point>//etc/bootsign.prev.
A Live Upgrade Sync operation will be performed on startup of boot environment <s10u6_recpatches>.

Generating boot-sign for ABE <s10u6_recpatches>
Saving existing file </etc/bootsign> in top level dataset for BE <s10u6_recpatches> as <mount-point>//etc/bootsign.prev.
Generating partition and slice information for ABE <s10u6_recpatches>
Copied boot menu from top level dataset.
Generating multiboot menu entries for PBE.
Generating multiboot menu entries for ABE.
Disabling splashimage
Re-enabling splashimage
No more bootadm entries. Deletion of bootadm entries is complete.
GRUB menu default setting is unaffected
Done eliding bootadm entries.

**********************************************************************

The target boot environment has been activated. It will be used when you
reboot. NOTE: You MUST NOT USE the reboot, halt, or uadmin commands. You
MUST USE either the init or the shutdown command when you reboot. If you
do not use either init or shutdown, the system will not boot using the
target BE.

**********************************************************************

In case of a failure while booting to the target BE, the following process
needs to be followed to fallback to the currently working boot environment:

1. Boot from Solaris failsafe or boot in single user mode from the Solaris
Install CD or Network.

2. Mount the Parent boot environment root slice to some directory (like
/mnt). You can use the following command to mount:

mount -Fzfs /dev/dsk/c1t0d0s0 /mnt

3. Run <luactivate> utility with out any arguments from the Parent boot
environment root slice, as shown below:

/mnt/sbin/luactivate

4. luactivate, activates the previous working boot environment and
indicates the result.

5. Exit Single User mode and reboot the machine.

**********************************************************************

Modifying boot archive service
Propagating findroot GRUB for menu conversion.
File </etc/lu/installgrub.findroot> propagation successful
File </etc/lu/stage1.findroot> propagation successful
File </etc/lu/stage2.findroot> propagation successful
File </etc/lu/GRUB_capability> propagation successful
Deleting stale GRUB loader from all BEs.
File </etc/lu/installgrub.latest> deletion successful
File </etc/lu/stage1.latest> deletion successful
File </etc/lu/stage2.latest> deletion successful
Activation of boot environment <s10u6_recpatches> successful.

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

bash-3.00# init 6
updating /platform/i86pc/boot_archive

Achtung: Es muss zwingend mit init oder shutdown neu gestartet werden!

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# zoneadm list -cv
ID NAME             STATUS     PATH                           BRAND    IP
0 global           running    /                              native   shared
- zone1            configured /zone1                         native   shared

bash-3.00# zpool import zone1

bash-3.00# zpool list
NAME      SIZE   USED  AVAIL    CAP  HEALTH  ALTROOT
patches  7.94G  2.69G  5.25G    33%  ONLINE  -
rpool    7.94G  6.36G  1.58G    80%  ONLINE  -
zone1    1.98G   547M  1.45G    26%  ONLINE  -

bash-3.00# metaset -s zone1data -t

bash-3.00# metaset
Set name = zone1data, Set number = 1
Host                Owner
horst1
horst2             Yes
Drive    Dbase
c2t1d0   Yes
c3t1d0   Yes

Patchen der Zone mit ugrade-on-attach

bash-3.00# zoneadm -z zone1 attach
These patches installed on the source system are inconsistent with this system:
118668: version mismatch
(17) (19)
118669: version mismatch
(17) (19)
119060: version mismatch
(44) (45)
119091: version mismatch
(31) (32)
119214: version mismatch
(17) (18)
119247: version mismatch
(34) (35)
119253: version mismatch
(29) (31)
119255: version mismatch
(59) (65)
119314: version mismatch
(24) (26)
119758: version mismatch
(12) (14)
119784: version mismatch
(07) (10)
120095: version mismatch
(21) (22)
120200: version mismatch
(14) (15)
120223: version mismatch
(29) (31)
120273: version mismatch
(23) (25)
120411: version mismatch
(29) (30)
120544: version mismatch
(11) (14)
120740: version mismatch
(04) (05)
121119: version mismatch
(13) (15)
121309: version mismatch
(14) (16)
121395: version mismatch
(01) (03)
122213: version mismatch
(28) (32)
122912: version mismatch
(13) (15)
123896: version mismatch
(05) (10)
124394: version mismatch
(08) (09)
124629: version mismatch
(09) (10)
124631: version mismatch
(19) (24)
125165: version mismatch
(12) (13)
125185: version mismatch
(08) (11)
125333: version mismatch
(03) (05)
125540: version mismatch
(04) (06)
125720: version mismatch
(24) (28)
125732: version mismatch
(02) (04)
125953: version mismatch
(17) (18)
126364: version mismatch
(06) (07)
126366: version mismatch
(12) (14)
126420: version mismatch
(01) (02)
126539: version mismatch
(01) (02)
126869: version mismatch
(02) (03)
136883: version mismatch
(01) (02)
137122: version mismatch
(03) (06)
137128: version mismatch
(02) (05)
138224: version mismatch
(02) (03)
138242: version mismatch
(01) (05)
138254: version mismatch
(01) (02)
138264: version mismatch
(02) (03)
138286: version mismatch
(01) (02)
138372: version mismatch
(02) (06)
138628: version mismatch
(02) (07)
138857: version mismatch
(01) (02)
138867: version mismatch
(01) (02)
138882: version mismatch
(01) (02)
These patches installed on this system were not installed on the source system:
125556-02
138889-08
139100-01
139463-02
139482-01
139484-05
139499-04
139501-02
139561-02
139580-02
140145-01
140384-01
140456-01
140775-03
141009-01
141015-01

bash-3.00# zoneadm -z zone1 attach -u
Getting the list of files to remove
Removing 1209 files
Remove 198 of 198 packages
Installing 1315 files
Add 198 of 198 packages
Updating editable files
The file </var/sadm/system/logs/update_log> within the zone contains a log of the zone update.

bash-3.00# zoneadm list -cv
ID NAME             STATUS     PATH                           BRAND    IP
0 global           running    /                              native   shared
- zone1            installed  /zone1                         native   shared

bash-3.00# zoneadm -z zone1 boot

bash-3.00# zlogin zone1
[Connected to zone 'zone1' pts/4]
Last login: Thu Apr  9 09:06:23 on pts/5
Sun Microsystems Inc.   SunOS 5.10      Generic January 2005
#
# exit
[Connection to zone 'zone1' pts/4 closed]

Upgrade-on-attach zum Patchen der Zone hat hier wunder geklappt.

weiterer Test nach Einspielen des recommended patch clusters

Nachdem nun Solaris10u6 mit neuestem recommended patch cluster installiert ist möchte ich das Liveupgrade inclusive Zone nochmals testen.

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# zoneadm list -cv
ID NAME             STATUS     PATH                           BRAND    IP
0 global           running    /                              native   shared
2 zone1            running    /zone1                         native   shared

bash-3.00# lucreate -n s10u6_zonetest
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 <s10u6_zonetest>.
Source boot environment is <s10u6_recpatches>.
Creating boot environment <s10u6_zonetest>.
Cloning file systems from boot environment <s10u6_recpatches> to create boot environment <s10u6_zonetest>.
Creating snapshot for <rpool/ROOT/s10u6_recpatches> on <rpool/ROOT/s10u6_recpatches@s10u6_zonetest>.
Creating clone for <rpool/ROOT/s10u6_recpatches@s10u6_zonetest> on <rpool/ROOT/s10u6_zonetest>.
Setting canmount=noauto for </> in zone <global> on <rpool/ROOT/s10u6_zonetest>.
Creating snapshot for <zone1> on <zone1@s10u6_zonetest>.
cannot create ‘.’: missing dataset name
Creating clone for <zone1@s10u6_zonetest> on <zone1-s10u6_zonetest>.
ERROR: cannot create ‘zone1-s10u6_zonetest’: missing dataset name
ERROR: Unable to clone <> on <>.
/usr/lib/lu/luclonefs: zone1@s10u6_zonetest: not found
cannot open ‘zone1-s10u6_zonetest’: dataset does not exist
cannot open ‘zone1-s10u6_zonetest’: dataset does not exist
cannot open ‘zone1-s10u6_zonetest’: dataset does not exist

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 <s10u6_zonetest> 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 <s10u6_zonetest> in GRUB menu
Population of boot environment <s10u6_zonetest> successful.
Creation of boot environment <s10u6_zonetest> successful.
bash-3.00#

bash-3.00# ludelete -n s10u6_zonetest -f
System has findroot enabled GRUB
No entry for BE <s10u6_zonetest> in GRUB menu
Determining the devices to be marked free.
Updating boot environment configuration database.
Updating compare databases on boot environment <s10x_u6wos_07b>.
Updating boot environment description database on all BEs.
Updating all boot environment configuration databases.
Boot environment <s10u6_zonetest> deleted.

bash-3.00# zfs destroy zone1@s10u6_zonetest

Tja, auch nach Installieren der aktuell empfohlen Patches klappt das nicht wie gewünscht.

Hat jemand zu diesem Thema eigene Erfahrungen oder Workarounds? Auf Kommentare oder Tips würde ich mich freuen…

Comments Kommentare deaktiviert

Vorlesen mit webReader

Solaris Zones / Container

Sun Microsystems hat Solaris10 eine interessante OS-Virtualisierungslösung kostenlos beigelegt – Solaris Zones, ähnlich zu BSD jails. Im Gegensatz zu XVM (Xen im Solaris-Kernel für X86) oder Logical Domains (Hypervisor für CMT/Niagara) gibt es bei Zones kaum Overhead durch die Virtualisierung. Zudem steht es sowohl im Sparc- als auch im X86-Umfeld zur Verfügung. In einer Zone werden Resourcen der sog. “globalen Zone” genutzt. Es gibt aber auch z.T. die Möglichkeit dediziert Resourcen zuzuweisen, z.B. einen eigenen IP-Stack. Den OS-Kernel hingegen gibt es nur einmal. Die Kombination von OS-Virtualisierung mit Zones und dem Resourcemanagement wird als Container bezeichnet.

Container werden i.d.R. genutzt um Applikationen oder Applikationsschichten voneinander abzuschotten und die Resourcenverteilung zu steuern. So kann ein Container ein SAP ERP Entwicklungs- und Testsystem beinhalten und ein weiterer das Produktionssystem. Die Systeme haben je eine eigene Netzwerkkonfiguration und können weiche oder harten Grenzen für CPU-Auslastung und Speicherverbrauch besitzen.

flying zones

Heruntergefahrene Zonen kann man klonen oder exportieren. Kopiert man die Filesysteme der Zone auf einen anderen Rechner kann man sie dort importieren und die Zone wieder in Betrieb nehmen. Legt man die Filesysteme auf shared storage kann man durch Zuweisen der relevanten Disks auf allen relevanten Rechnern die Filesysteme je nach Bedarf am passenden System in Betrieb nehmen. Danach kann auch die Zone dort wieder in Betrieb genommen werden. Das Verfahren nennt man Zonenmigration. Das wird genutzt um bei Rechnerausfällen Zonen umzuziehen oder um eine bessere Auslastung der vorhandenen Systeme zu erzielen. Als Basis für den Umzug der Filesysteme kann sowohl ZFS als auch UFS auf shared disk sets genutzt werden.

Möchte man den Umzug von Zonen auf andere Rechner automatisieren, die Verfügbarkeit der Zonen/Rechner überwachen lassen und automische Reaktionen in Problemfällen haben, dann kann man den Sun Cluster 3.2 mit dem Zonenagent einsetzen.

Sun verkauft die Implementierung einer solchen Gesamtlösung unter dem Titel “flying zones“. Dabei wird noch das Monitoringtool N1AA Analyzer beigelegt. Dort kann man z.B. den Resourcenverbrauch von best. Zonen aufsummieren lassen und prüfen, ob das denn so zusammen auf einer best. Hardware laufen würde. Außerdem wird einem noch das Softwareinstallationssystem N1AA ans Herz gelegt.

flying zones für Arme im Eigenbau

Im kostenlosen Vmware Server 2.01 auf meinem PC habe ich eine Testumgebung aufgebaut um die Grundzüge von flying zones nachzustellen und zu testen. Wichtig war mir eine realistische Umgebung wie im Betriebsalltag, deshalb bin ich von 2 virt. Rechenzentren ausgegangen. In jedem virt. RZ befindet sich ein Solaris-Host und ein Storagesystem. Auf das Storagesystem jedes RZs kann jeder Server zugreifen. Die Platten im Storagesystem sind als shared disks konfiguriert. Es soll mit host based mirroring erreicht werden, dass trotz Ausfall eines kompletten Storagesystems den Betrieb der Zone nicht gestört wird, egal auf welchem host die Zone aktiv läuft. Auf den Einsatz kostenpflichtiger Clustersoftware zur Automatisierung verzichte ich in diesem Test.

flying zones mit Solaris10 und Vmware Server 2

In der Testumgebung gibt es nur eine Zone. In der Realität wären das natürlich mehr.

Auf jedem Solaris-Host ist Solaris10u6 (10/08) installiert. Dabei wurde ein lokale Platte genutzt um darauf das OS zu installieren. Dabei wurde bereits die neue Funktionalität genutzt ZFS als Rootfilesystem einzusetzen. Eine weitere kleine lokale Platte steht darüber hinaus zur Verfügung. Auf die Grundinstallation der Solaris-hosts gehe ich hier nicht näher ein. Die shared disks sind ebenfalls bereits den hosts bereitgestellt.

Testumgebung auf Vmware Server 2.01

Am Vmware Server ist eigentlich nur die Konfiguration der shared disks interessant. Die Disks werden zunächst in einer virt. Maschine erstellt, dann deren vmx-Dateien angepasst und die relevanten Teile der vmx-Datei in die des anderen hosts übertragen.

Benötigt werden also folgende Platten:

lokale disks pro System:

1 Disk mit >= 5GB für den ZFS-RootPool
1 Disk >= 20MB für die lokale State Database

shared disks (insgesamt):

2 shared Disks (preaallocated) für Zonen-Root (ZFS) 2GB
2 shared Disks (preaallocated) mit Zonen-Daten (UFS) 50MB

relevanter Teil der vmx-Dateien:

scsi1.present = "TRUE"
scsi1.sharedBus = "virtual"
scsi1.virtualDev = "lsilogic"
scsi1:0.present = "TRUE"
scsi1:0.fileName = "D:\Virtual Machines\ext1disk1.vmdk"
scsi1:0.writeThrough = "TRUE"
scsi1:0.mode = "independent-persistent"
scsi1:1.present = "TRUE"
scsi1:1.fileName = "D:\Virtual Machines\ext1disk2.vmdk"
scsi1:1.writeThrough = "TRUE"
scsi1:1.mode = "independent-persistent"
scsi2.present = "TRUE"
scsi2.sharedBus = "virtual"
scsi2.virtualDev = "lsilogic"
scsi2:0.present = "TRUE"
scsi2:0.fileName = "D:\Virtual Machines\ext2disk1.vmdk"
scsi2:0.writeThrough = "TRUE"
scsi2:0.mode = "independent-persistent"
scsi2:1.present = "TRUE"
scsi2:1.fileName = "D:\Virtual Machines\ext2disk2.vmdk"
scsi2:1.writeThrough = "TRUE"
scsi2:1.mode = "independent-persistent"
disk.locking = "FALSE"

VM "horst2" im Vmware Server 2.01

Hier ein Blick auf das System nach der Solaris-Installation:

bash-3.00# zpool list
NAME    SIZE   USED  AVAIL    CAP  HEALTH  ALTROOT
rpool  7.94G  4.65G  3.28G    58%  ONLINE  -

bash-3.00# zpool status rpool
pool: rpool
state: ONLINE
scrub: none requested
config:
NAME        STATE     READ WRITE CKSUM
rpool       ONLINE       0     0     0
c1t0d0s0  ONLINE       0     0     0
errors: No known data errors

bash-3.00# zfs list
NAME                        USED  AVAIL  REFER  MOUNTPOINT
rpool                      5.15G  2.67G  35.5K  /rpool
rpool/ROOT                 3.77G  2.67G    18K  legacy
rpool/ROOT/s10x_u6wos_07b  3.77G  2.67G  3.77G  /
rpool/dump                  900M  2.67G   900M  -
rpool/export                 37K  2.67G    19K  /export
rpool/export/home            18K  2.67G    18K  /export/home
rpool/swap                  512M  3.16G  5.54M  -

bash-3.00# df -h
Filesystem             size   used  avail capacity  Mounted on
rpool/ROOT/s10x_u6wos_07b 7.8G   3.8G   2.7G    59%    /
/devices                 0K     0K     0K     0%    /devices
ctfs                     0K     0K     0K     0%    /system/contract
proc                     0K     0K     0K     0%    /proc
mnttab                   0K     0K     0K     0%    /etc/mnttab
swap                   532M   364K   532M     1%    /etc/svc/volatile
objfs                    0K     0K     0K     0%    /system/object
sharefs                  0K     0K     0K     0%    /etc/dfs/sharetab
/usr/lib/libc/libc_hwcap2.so.1 6.4G   3.8G   2.7G    59%    /lib/libc.so.1
fd                       0K     0K     0K     0%    /dev/fd
swap                   535M   2.7M   532M     1%    /tmp
swap                   532M    32K   532M     1%    /var/run
rpool/export           7.8G    19K   2.7G     1%    /export
rpool/export/home      7.8G    18K   2.7G     1%    /export/home
rpool                  7.8G    35K   2.7G     1%    /rpool
/hgfs                   16G   4.0M    16G     1%    /hgfs
/tmp/VMwareDnD           0K     0K     0K     0%    /var/run/vmblock

bash-3.00# swap -l
swapfile             dev  swaplo blocks   free
/dev/zvol/dsk/rpool/swap 181,1       8 1048568 1047280

Arbeiten mit den shared disks

ZFS für Zonenroot, RAID1 gespiegelt

bash-3.00# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c1t0d0 <DEFAULT cyl 4092 alt 2 hd 128 sec 32>
/pci@0,0/pci15ad,1976@10/sd@0,0
1. c1t1d0 <DEFAULT cyl 47 alt 2 hd 64 sec 32>
/pci@0,0/pci15ad,1976@10/sd@1,0
2. c2t0d0 <VMware,-VMware Virtual S-1.0-2.00GB>
/pci@0,0/pci15ad,790@11/pci15ad,1976@0/sd@0,0
3. c2t1d0 <DEFAULT cyl 47 alt 2 hd 64 sec 32>
/pci@0,0/pci15ad,790@11/pci15ad,1976@0/sd@1,0
4. c3t0d0 <VMware,-VMware Virtual S-1.0-2.00GB>
/pci@0,0/pci15ad,790@11/pci15ad,1976@1/sd@0,0
5. c3t1d0 <DEFAULT cyl 47 alt 2 hd 64 sec 32>
/pci@0,0/pci15ad,790@11/pci15ad,1976@1/sd@1,0
Specify disk (enter its number): 0
selecting c1t0d0
[disk formatted]
/dev/dsk/c1t0d0s0 is part of active ZFS pool rpool. Please see zpool(1M).
/dev/dsk/c1t0d0s2 is part of active ZFS pool rpool. Please see zpool(1M).

bash-3.00# zpool create zone1 mirror c2t0d0 c3t0d0
bash-3.00# zpool list zone1
NAME    SIZE   USED  AVAIL    CAP  HEALTH  ALTROOT
zone1  1.98G    94K  1.98G     0%  ONLINE  -

bash-3.00# zpool status zone1
pool: zone1
state: ONLINE
scrub: none requested
config:
NAME        STATE     READ WRITE CKSUM
zone1       ONLINE       0     0     0
mirror    ONLINE       0     0     0
c2t0d0  ONLINE       0     0     0
c3t0d0  ONLINE       0     0     0
errors: No known data errors

bash-3.00# zfs list
NAME                        USED  AVAIL  REFER  MOUNTPOINT
rpool                      5.15G  2.67G  35.5K  /rpool
rpool/ROOT                 3.77G  2.67G    18K  legacy
rpool/ROOT/s10x_u6wos_07b  3.77G  2.67G  3.77G  /
rpool/dump                  900M  2.67G   900M  -
rpool/export                 37K  2.67G    19K  /export
rpool/export/home            18K  2.67G    18K  /export/home
rpool/swap                  512M  3.16G  5.54M  -
zone1                       106K  1.95G    18K  /zone1

Datenbereich mit UFS-Filesystem auf SVM shared disk set, RAID1 gespiegelt

bash-3.00# metaset -s zone1data -a c2t1d0 c3t1d0 -h horst1 horst2
metaset: horst1: there are no existing databases

Es existiert noch keine lokale state database. Deshalb auf horst1 und horst2 die zweite lokale Platte partitionieren und in der Slice7 eine lokale State Database anlegen.

bash-3.00# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c1t0d0 <DEFAULT cyl 4092 alt 2 hd 128 sec 32>
/pci@0,0/pci15ad,1976@10/sd@0,0
1. c1t1d0 <DEFAULT cyl 47 alt 2 hd 64 sec 32>
/pci@0,0/pci15ad,1976@10/sd@1,0
2. c2t0d0 <VMware,-VMware Virtual S-1.0-2.00GB>
/pci@0,0/pci15ad,790@11/pci15ad,1976@0/sd@0,0
3. c2t1d0 <DEFAULT cyl 47 alt 2 hd 64 sec 32>
/pci@0,0/pci15ad,790@11/pci15ad,1976@0/sd@1,0
4. c3t0d0 <VMware,-VMware Virtual S-1.0-2.00GB>
/pci@0,0/pci15ad,790@11/pci15ad,1976@1/sd@0,0
5. c3t1d0 <DEFAULT cyl 47 alt 2 hd 64 sec 32>
/pci@0,0/pci15ad,790@11/pci15ad,1976@1/sd@1,0
Specify disk (enter its number): 1
selecting c1t1d0
[disk formatted]
FORMAT MENU:
disk       - select a disk
type       - select (define) a disk type
partition  - select (define) a partition table
current    - describe the current disk
format     - format and analyze the disk
fdisk      - run the fdisk program
repair     - repair a defective sector
label      - write label to the disk
analyze    - surface analysis
defect     - defect list management
backup     - search for backup labels
verify     - read and display labels
save       - save new disk/partition definitions
inquiry    - show vendor, product and revision
volname    - set 8-character volume name
!<cmd>     - execute <cmd>, then return
format> fdisk
No fdisk table exists. The default partition for the disk is:
a 100% "SOLARIS System" partition
Type "y" to accept the default partition,  otherwise type "n" to edit the
partition table.
y
quit
format> part
PARTITION MENU:
0      - change `0' partition
1      - change `1' partition
2      - change `2' partition
3      - change `3' partition
4      - change `4' partition
5      - change `5' partition
6      - change `6' partition
7      - change `7' partition
select - select a predefined table
modify - modify a predefined partition table
name   - name the current table
print  - display the current table
label  - write partition map and label to the disk
!<cmd> - execute <cmd>, then return
quit
partition> print
Current partition table (original):
Total disk cylinders available: 46 + 2 (reserved cylinders)
Part      Tag    Flag     Cylinders      Size            Blocks
0 unassigned    wm       0             0         (0/0/0)      0
1 unassigned    wm       0             0         (0/0/0)      0
2     backup    wu       0 - 45       46.00MB    (46/0/0) 94208
3 unassigned    wm       0             0         (0/0/0)      0
4 unassigned    wm       0             0         (0/0/0)      0
5 unassigned    wm       0             0         (0/0/0)      0
6 unassigned    wm       0             0         (0/0/0)      0
7 unassigned    wm       0             0         (0/0/0)      0
8       boot    wu       0 -  0        1.00MB    (1/0/0)   2048
9 unassigned    wm       0             0         (0/0/0)      0
partition> 7
Part      Tag    Flag     Cylinders      Size            Blocks
7 unassigned    wm       0             0         (0/0/0)      0
Enter partition id tag[unassigned]:
Enter partition permission flags[wm]:
Enter new starting cyl[0]:
Enter partition size[0b, 0c, 0e, 0.00mb, 0.00gb]: 46c
partition> print
Current partition table (unnamed):
Total disk cylinders available: 46 + 2 (reserved cylinders)
Part      Tag    Flag     Cylinders      Size            Blocks
0 unassigned    wm       0             0         (0/0/0)      0
1 unassigned    wm       0             0         (0/0/0)      0
2     backup    wu       0 - 45       46.00MB    (46/0/0) 94208
3 unassigned    wm       0             0         (0/0/0)      0
4 unassigned    wm       0             0         (0/0/0)      0
5 unassigned    wm       0             0         (0/0/0)      0
6 unassigned    wm       0             0         (0/0/0)      0
7 unassigned    wm       0 - 45       46.00MB    (46/0/0) 94208
8       boot    wu       0 -  0        1.00MB    (1/0/0)   2048
9 unassigned    wm       0             0         (0/0/0)      0
partition> label
Ready to label disk, continue? y
partition> quit
FORMAT MENU:
disk       - select a disk
type       - select (define) a disk type
partition  - select (define) a partition table
current    - describe the current disk
format     - format and analyze the disk
fdisk      - run the fdisk program
repair     - repair a defective sector
label      - write label to the disk
analyze    - surface analysis
defect     - defect list management
backup     - search for backup labels
verify     - read and display labels
save       - save new disk/partition definitions
inquiry    - show vendor, product and revision
volname    - set 8-character volume name
!<cmd>     - execute <cmd>, then return
quit
format> quit
bash-3.00#

bash-3.00# metadb -a -f c1t1d0s7

bash-3.00# metadb
flags           first blk       block count
a        u         16              8192            /dev/dsk/c1t1d0s7
bash-3.00# echo "set md:mirrored_root_flag=1" >> /etc/system

Auf horst1 nun das shared disk set anlegen.

bash-3.00# metaset -s zone1data -a -h horst1 horst2
metaset: horst2: rpc.metad: Permission denied

Dem Dienst fehlen die Berechtigungen.

Auf horst1

bash-3.00# echo horst2 > /.rhosts

Auf horst2

bash-3.00# echo horst1 > /.rhosts

Auf horst1 nun das shared disk set erstellen:

bash-3.00# metaset -s zone1data -a -h horst1 horst2

bash-3.00# metaset -s zone1data -a c2t1d0 c3t1d0

bash-3.00# metaset
Set name = zone1data, Set number = 1
Host                Owner
horst1             Yes
horst2
Drive    Dbase
c2t1d0   Yes
c3t1d0   Yes

bash-3.00# metadb -s zone1data
flags           first blk       block count
a        u         16              8192            /dev/dsk/c2t1d0s7
a        u         16              8192            /dev/dsk/c3t1d0s7

Nun die RAID1-Spiegelung mit Solaris Volummanager (SVM) aufsetzen:

bash-3.00# metainit -s zone1data d11 1 1 c2t1d0s0
zone1data/d11: Concat/Stripe is setup

bash-3.00# metainit -s zone1data d12 1 1 c3t1d0s0
zone1data/d12: Concat/Stripe is setup

bash-3.00# metainit -s zone1data d10 -m d11
zone1data/d10: Mirror is setup

bash-3.00# metattach -s zone1data d10 d12
zone1data/d10: submirror zone1data/d12 is attached

bash-3.00# metastat -s zone1data
zone1data/d10: Mirror
Submirror 0: zone1data/d11
State: Okay
Submirror 1: zone1data/d12
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 86016 blocks (42 MB)
zone1data/d11: Submirror of zone1data/d10
State: Okay
Size: 86016 blocks (42 MB)
Stripe 0:
Device     Start Block  Dbase        State Reloc Hot Spare
c2t1d0s0          0     No            Okay   Yes
zone1data/d12: Submirror of zone1data/d10
State: Okay
Size: 86016 blocks (42 MB)
Stripe 0:
Device     Start Block  Dbase        State Reloc Hot Spare
c3t1d0s0          0     No            Okay   Yes
Device Relocation Information:
Device   Reloc  Device ID
c3t1d0   Yes    id1,sd@f0000000049d7b0e80006e5c10004
c2t1d0   Yes    id1,sd@f0000000049d7b0e80004846b0003

Im Anschluss die Platte mit UFS formatieren:

bash-3.00# newfs /dev/md/zone1data/rdsk/d10
/dev/md/zone1data/rdsk/d10: Unable to find Media type. Proceeding with system determined parameters.
newfs: construct a new file system /dev/md/zone1data/rdsk/d10: (y/n)? y
/dev/md/zone1data/rdsk/d10:     86016 sectors in 42 cylinders of 64 tracks, 32 sectors
42.0MB in 3 cyl groups (16 c/g, 16.00MB/g, 7680 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 32832, 65632,

Konfiguration und Installation der Zone zone1

bash-3.00# zonecfg -z zone1
zone1: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:zone1> create
zonecfg:zone1> set zonepath=/zone1
zonecfg:zone1> set autoboot=false
zonecfg:zone1> add fs
zonecfg:zone1:fs> set dir=/daten
zonecfg:zone1:fs> set special=/dev/md/zone1data/dsk/d10
zonecfg:zone1:fs> set raw=/dev/md/zone1data/rdsk/d10
zonecfg:zone1:fs> set type=ufs
zonecfg:zone1:fs> end
zonecfg:zone1> add net
zonecfg:zone1:net> set physical=e100g0
zonecfg:zone1:net> set address=192.168.178.61
zonecfg:zone1:net> end
zonecfg:zone1> exit

bash-3.00# zoneadm list -c
global
zone1

bash-3.00# cat /etc/zones/index
# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
# ident "@(#)zones-index        1.2     04/04/01 SMI"
#
# DO NOT EDIT: this file is automatically generated by zoneadm(1M)
# and zonecfg(1M).  Any manual changes will be lost.
#
global:installed:/
zone1:configured:/zone1:

bash-3.00# cat /etc/zones/zone1.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE zone PUBLIC "-//Sun Microsystems Inc//DTD Zones//EN" "file:///usr/share/lib/xml/dtd/zonecfg.dtd.1">
<!--
DO NOT EDIT THIS FILE.  Use zonecfg(1M) instead.
-->
<zone name="zone1" zonepath="/zone1" autoboot="false">
<inherited-pkg-dir directory="/lib"/>
<inherited-pkg-dir directory="/platform"/>
<inherited-pkg-dir directory="/sbin"/>
<inherited-pkg-dir directory="/usr"/>
<filesystem special="/dev/md/zone1data/dsk/d10" raw="/dev/md/zone1data/rdsk/d10" directory="/daten" type="ufs"/>
<network address="192.168.178.61" physical="e100g0"/>
</zone>

bash-3.00# chmod 700 /zone1

bash-3.00# zoneadm -z zone1 install
Preparing to install zone <zone1>.
Checking <ufs> file system on device </dev/md/zone1data/rdsk/d10> to be mounted at </zone1/root>
Creating list of files to copy from the global zone.
Copying <8135> files to the zone.
Initializing zone product registry.
Determining zone package initialization order.
Preparing to initialize <1186> packages on the zone.
Initialized <1186> packages on zone.
Zone <zone1> is initialized.
The file </zone1/root/var/sadm/system/logs/install_log> contains a log of the zone installation.

bash-3.00# zoneadm list -cv
ID NAME             STATUS     PATH                           BRAND    IP
0 global           running    /                              native   shared
- zone1            installed  /zone1                         native   shared

bash-3.00# zoneadm -z zone1 boot

bash-3.00# zlogin -C zone1
[Connected to zone 'zone1' console]
143/143
Reading ZFS config: done.
Select a Language
0. English
1. German
2. es
3. fr
Please make a choice (0 - 3), or press h or ? for help:1
...
Auf welcher Art von Terminal arbeiten Sie?
1) ANSI Standard CRT
2) DEC VT52
3) DEC VT100
4) Heathkit 19
5) Lear Siegler ADM31
6) PC-Konsole
7) Sun-Kommando-Shell
 8) Sun-Workstation
9) Televideo 910
10) Televideo 925
11) Wyse Modell 50
12) X Terminal Emulator (xterms)
13) CDE Terminal Emulator (dtterm)
14) Andere
Geben Sie die gewünschte Zahl ein und drücken Sie Eingabetaste: 3
...
System identification is completed.
rebooting system due to change(s) in /etc/default/init
[NOTICE: Zone rebooting]
SunOS Release 5.10 Version Generic_137138-09 64-bit
Copyright 1983-2008 Sun Microsystems, Inc.  All rights reserved.
Use is subject to license terms.
Hostname: zone1
Reading ZFS config: done.
zone1 console login: Apr  5 13:33:22 zone1 sendmail[6008]: My unqualified host name (localhost) unknown; sleeping for retry
root
Password:
Apr  5 13:33:44 zone1 login: ROOT LOGIN /dev/console
Sun Microsystems Inc.   SunOS 5.10      Generic January 2005

# svcadm disable svc:*sendmail*

bash-3.00# df -h
Dateisystem           Größe belegt verfügbar Kapazität Eingehängt auf
/                        0K   541M   1,4G    28%    /
/daten                  39M   1,0M    34M     3%    /daten
/dev                   2,0G   541M   1,4G    28%    /dev
/lib                   6,4G   3,8G   2,7G    59%    /lib
/platform              6,4G   3,8G   2,7G    59%    /platform
/sbin                  6,4G   3,8G   2,7G    59%    /sbin
/usr                   6,4G   3,8G   2,7G    59%    /usr
proc                     0K     0K     0K     0%    /proc
ctfs                     0K     0K     0K     0%    /system/contract
mnttab                   0K     0K     0K     0%    /etc/mnttab
objfs                    0K     0K     0K     0%    /system/object
swap                   452M   316K   452M     1%    /etc/svc/volatile
/usr/lib/libc/libc_hwcap2.so.1 6,4G   3,8G   2,7G    59%    /lib/libc.so.1
fd                       0K     0K     0K     0%    /dev/fd
swap                   452M    36K   452M     1%    /tmp
swap                   452M    12K   452M     1%    /var/run
bash-3.00# exit
# ^D
zone1 console login: ~.
[Connection to zone 'zone1' console closed]

Zonenmigration

Zone exportieren

bash-3.00# zlogin zone1 init 0

bash-3.00# zoneadm list -cv
ID NAME             STATUS     PATH                           BRAND    IP
0 global           running    /                              native   shared
- zone1            installed  /zone1                         native   shared

bash-3.00# zoneadm -z zone1 detach
bash-3.00# zoneadm list -cv
ID NAME             STATUS     PATH                           BRAND    IP
0 global           running    /                              native   shared
- zone1            configured /zone1                         native   shared

bash-3.00# ls -l /zone1
total 3343
-rw-r--r--   1 root     root     1618163 Apr  5 14:25 SUNWdetached.xml
drwxr-xr-x  13 root     root          52 Apr  5 14:22 dev
drwxr-xr-x  19 root     root          21 Apr  5 13:44 root

ZFS-Pool mit Zonenroot exportieren

bash-3.00# zpool export zone1

bash-3.00# zpool list
NAME    SIZE   USED  AVAIL    CAP  HEALTH  ALTROOT
rpool  7.94G  5.02G  2.92G    63%  ONLINE  -

SVM disk set mit UFS-Filesystem für Daten exportieren

bash-3.00# metaset
Set name = zone1data, Set number = 1
Host                Owner
horst1             Yes
horst2
Drive    Dbase
c2t1d0   Yes
c3t1d0   Yes

bash-3.00# metaset -s zone1data -r

bash-3.00# metaset
Set name = zone1data, Set number = 1
Host                Owner
horst1
horst2
Drive    Dbase
c2t1d0   Yes
c3t1d0   Yes

Auf horst2:

ZFS-Pool importieren

bash-3.00# zpool list
NAME    SIZE   USED  AVAIL    CAP  HEALTH  ALTROOT
rpool  7.94G  4.65G  3.28G    58%  ONLINE  -

bash-3.00# zpool import
pool: zone1
id: 12609083278336438915
state: ONLINE
action: The pool can be imported using its name or numeric identifier.
config:
zone1       ONLINE
mirror    ONLINE
c2t0d0  ONLINE
c3t0d0  ONLINE

bash-3.00# zpool import zone1

bash-3.00# zpool list
NAME    SIZE   USED  AVAIL    CAP  HEALTH  ALTROOT
rpool  7.94G  4.65G  3.28G    58%  ONLINE  -
zone1  1.98G   544M  1.45G    26%  ONLINE  -

SVM disk set importieren

bash-3.00# metaset
Set name = zone1data, Set number = 1
Host                Owner
horst1
horst2
Drive    Dbase
c2t1d0   Yes
c3t1d0   Yes

bash-3.00# metaset -s zone1data -t

bash-3.00# metaset
Set name = zone1data, Set number = 1
Host                Owner
horst1
horst2             Yes
Drive    Dbase
c2t1d0   Yes
c3t1d0   Yes

bash-3.00# metastat -s zone1data d10
zone1data/d10: Mirror
Submirror 0: zone1data/d11
State: Okay
Submirror 1: zone1data/d12
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 86016 blocks (42 MB)
zone1data/d11: Submirror of zone1data/d10
State: Okay
Size: 86016 blocks (42 MB)
Stripe 0:
Device     Start Block  Dbase        State Reloc Hot Spare
c2t1d0s0          0     No            Okay   Yes
zone1data/d12: Submirror of zone1data/d10
State: Okay
Size: 86016 blocks (42 MB)
Stripe 0:
Device     Start Block  Dbase        State Reloc Hot Spare
c3t1d0s0          0     No            Okay   Yes
Device Relocation Information:
Device   Reloc  Device ID
c2t1d0   Yes    id1,sd@f0000000049d7b0e80004846b0003
c3t1d0   Yes    id1,sd@f0000000049d7b0e80006e5c10004

Zone zone1 importieren und wieder in Betrieb nehmen:

bash-3.00# zonecfg -z zone1
zone1: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:zone1> create -a /zone1
zonecfg:zone1> exit

bash-3.00# zoneadm list -cv
ID NAME             STATUS     PATH                           BRAND    IP
0 global           running    /                              native   shared
- zone1            configured /zone1                         native   shared

bash-3.00# zoneadm -z zone1 attach

bash-3.00# zoneadm list -cv
ID NAME             STATUS     PATH                           BRAND    IP
0 global           running    /                              native   shared
- zone1            installed  /zone1                         native   shared

bash-3.00# zoneadm -z zone1 boot

bash-3.00# zoneadm list -cv
ID NAME             STATUS     PATH                           BRAND    IP
0 global           running    /                              native   shared
2 zone1            running    /zone1                         native   shared

bash-3.00# zlogin zone1
[Connected to zone 'zone1' pts/5]
Last login: Sun Apr  5 14:22:15 on pts/5
Sun Microsystems Inc.   SunOS 5.10      Generic January 2005

# df -h
Filesystem             size   used  avail capacity  Mounted on
/                        0K   545M   1.4G    28%    /
/daten                  39M   5.0M    30M    15%    /daten
/dev                   2.0G   545M   1.4G    28%    /dev
/lib                   6.4G   3.8G   2.7G    59%    /lib
/platform              6.4G   3.8G   2.7G    59%    /platform
/sbin                  6.4G   3.8G   2.7G    59%    /sbin
/usr                   6.4G   3.8G   2.7G    59%    /usr
proc                     0K     0K     0K     0%    /proc
ctfs                     0K     0K     0K     0%    /system/contract
mnttab                   0K     0K     0K     0%    /etc/mnttab
objfs                    0K     0K     0K     0%    /system/object
swap                   437M   300K   437M     1%    /etc/svc/volatile
/usr/lib/libc/libc_hwcap2.so.1 6.4G   3.8G   2.7G    59%    /lib/libc.so.1
fd                       0K     0K     0K     0%    /dev/fd
swap                   437M    36K   437M     1%    /tmp
swap                   437M    12K   437M     1%    /var/run

# ls -l /daten
total 8176
-rw-r--r--   1 root     root     4165061 Apr  5 14:14 lksf_book_alpha.pdf
drwx------   2 root     root        8192 Apr  5 12:13 lost+found

VM "horst2" Remote Console des Vmware Server 2.01

Fazit

Zonen sind ne nette Sache. Mit der Möglichkeit der Zonenmigration wird das Thema aber erst richtig interessant und RZ-tauglich.

Weiterführende Literatur, etc.

Solaris Volume Manager Administration Guide

ZFS Administration Guide

Solaris Containers

Devices and Filesystems

Solaris10u6 10/08

Blog O’Matty zu shared disks unter Vmware Server 2

P.S.

Der nächste Test wird Liveupgrade mit ZFS-Rootfilesystem und Zonen zum Thema haben…

Comments 3 Kommentare »

Vorlesen mit webReader

Wer das ZFS Webgui vermisst hat – hier die relevanten Patches um es wieder lauffähig zu bekommen:

141105 — < 01 — 1 SunOS 5.10_x86: ZFS Administration Java Web Console Patch
141104 — < 01 — 1 SunOS 5.10: ZFS Administration Java Web Console Patch

Mit patchadd installieren und danach den Webserver durchstarten: /usr/sbin/smcwebserver restart

Anschliessend wie gewohnt https://localhost:6789/zfs/zfsmodule/Index aufrufen.

zfs webgui

Comments 4 Kommentare »

Vorlesen mit webReader

Thecus (Halle 13, D85) stellt auf der Cebit neue NAS-Systeme vor, darunter auch das N5500 mit 5 Disks. Das Gerät soll stromsparend und leise arbeiten, mit einem Intel Celeron ausgestattet sein und als Filesysteme ext3, XFS und ZFS unterstützen.

Ich habe noch keine Details zum OS des Geräts gefunden, bzgl. ZFS vermute ich aber mal schwer, dass das mit ZFS auf Fuse realisiert wird.

Comments 3 Kommentare »