Últimos Cambios |
||
Blog personal: El hilo del laberinto |
Última Actualización: 15 de octubre de 2009 - Jueves
En este documento abundo en mi experiencia con "Live Upgrade". En este caso describo la migración de Solaris 10 Update 7 (5/09) a Solaris 10 Update 8 (10/09).
Para comprender completamente este documento, habría que leerse los artículos anteriores sobre este tema. Para ir limpiando el asunto sólo enlazo a la actualización anterior, que contiene todos los enlaces históricos sobre "Live Upgrade":
La nueva actualización de Solaris es bastante "light", aunque algunos usuarios encontrará cambios valiosos: Soporte de cuotas de usuario y grupo en ZFS, nuevos drivers, soporte de arranque desde discos de hasta 2 terabytes, módulos de caché para ZFS (útiles sin tenemos una flash pequeña pero rápida), cambios en la gestión de permisos, cacheado y propiedades en ZFS, parcheado paralelo cuando utilizamos zonas Solaris, etc.
Los pasos para actualizar nuestro sistema mediante "Live Upgrade" son los siguientes:
# lustatus Boot Environment Is Active Active Can Copy Name Complete Now On Reboot Delete Status -------------------------- -------- ------ --------- ------ ---------- Solaris10u6 yes no no yes - Solaris10u7 yes yes yes no - # ludelete -f Solaris10u6 System has findroot enabled GRUB WARNING: Boot environmenthas one or more file systems mounted at </.alt.tmp.b-mUg.mnt>. No entry for BE <Solaris10u6> in GRUB menu Determining the devices to be marked free. ERROR: Read-only file system: cannot create mount point </.alt.tmp.b-O6g.mnt/datos/libros> ERROR: failed to create mount point </.alt.tmp.b-O6g.mnt/datos/libros> for file system <datos/libros> ERROR: unmounting partially mounted boot environment file systems ERROR: cannot mount boot environment by icf file </etc/lu/ICF.1> WARNING: Unable to mount ABE <Solaris10u6>: cannot complete lumk_iconf WARNING: Unable to determine disk partition configuration information for BE <Solaris10u6>. WARNING: Unable to determine the devices/datasets to be freed for BE <Solaris10u6>. Updating boot environment configuration database. Updating boot environment description database on all BEs. Updating all boot environment configuration databases. Boot environment <Solaris10u6> deleted. # lustatus Boot Environment Is Active Active Can Copy Name Complete Now On Reboot Delete Status -------------------------- -------- ------ --------- ------ ---------- Solaris10u7 yes yes yes no -
El error del "dataset" "datos/libros" es porque se trata de un "dataset" que existía cuando creé el BE ("Boot Environment"), pero no en este momento. Por eso para poder borrar el BE tengo que usar el "flag" "-f". En condiciones normales no haría falta, y siempre debemos probar primero sin él, y sólo usarlo si sabemos lo que hacemos.
A continuación clonamos el BE actual, para poder actualizarlo:
# lucreate -n Solaris10u8 Checking GRUB menu... System has findroot enabled GRUB Analyzing system configuration. Comparing source boot environment <Solaris10u7> 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 <Solaris10u8>. Source boot environment is <Solaris10u7>. Creating boot environment <Solaris10u8>. Cloning file systems from boot environment <Solaris10u7> to create boot environment <Solaris10u8>. Creating snapshot for <datos/ROOT/Solaris10u7> on <datos/ROOT/Solaris10u7@Solaris10u8>. Creating clone for <datos/ROOT/Solaris10u7@Solaris10u8> on <datos/ROOT/Solaris10u8>. Setting canmount=noauto for </> in zone <global> on <datos/ROOT/Solaris10u8>. Creating snapshot for <datos/ROOT/Solaris10u7/var> on <datos/ROOT/Solaris10u7/var@Solaris10u8>. Creating clone for <datos/ROOT/Solaris10u7/var@Solaris10u8> on <datos/ROOT/Solaris10u8/var>. Setting canmount=noauto for </var> in zone <global> on <datos/ROOT/Solaris10u8/var>. Saving existing file </boot/grub/menu.lst> in top level dataset for BE <Solaris10u8> as//boot/grub/menu.lst.prev. File </boot/grub/menu.lst> propagation successful Copied GRUB menu from PBE to ABE No entry for BE <Solaris10u8> in GRUB menu Population of boot environment <Solaris10u8> successful. Creation of boot environment <Solaris10u8> successful. # lustatus Boot Environment Is Active Active Can Copy Name Complete Now On Reboot Delete Status -------------------------- -------- ------ --------- ------ ---------- Solaris10u7 yes yes yes no - Solaris10u8 yes no no yes -
El siguiente paso consiste en actualizar el sistema operativo en el nuevo BE. Para ello copio la imagen ISO en "/tmp", la monto y actualizo desde ella:
# lofiadm -a /tmp/sol-10-u8-ga-x86-dvd.iso /dev/lofi/1 # mkdir /tmp/sol-10-u8-ga-x86-dvd # mount -o ro -F hsfs /dev/lofi/1 /tmp/sol-10-u8-ga-x86-dvd # luupgrade -n Solaris10u8 -u -s /tmp/sol-10-u8-ga-x86-dvd System has findroot enabled GRUB No entry for BE <Solaris10u8> in GRUB menu Uncompressing miniroot Copying failsafe kernel from media. 63093 blocks miniroot filesystem is <lofs> Mounting miniroot at </tmp/sol-10-u8-ga-x86-dvd/Solaris_10/Tools/Boot> Validating the contents of the media </tmp/sol-10-u8-ga-x86-dvd>. The media is a standard Solaris media. The media contains an operating system upgrade image. The media contains <Solaris> version <10>. Constructing upgrade profile to use. Locating the operating system upgrade program. Checking for existence of previously scheduled Live Upgrade requests. Creating upgrade profile for BE <Solaris10u8>. Checking for GRUB menu on ABE <Solaris10u8>. Saving GRUB menu on ABE <Solaris10u8>. Checking for x86 boot partition on ABE. Determining packages to install or upgrade for BE <Solaris10u8>. Performing the operating system upgrade of the BE <Solaris10u8>. CAUTION: Interrupting this process may leave the boot environment unstable or unbootable. Upgrading Solaris: 100% completed Installation of the packages from this media is complete. Restoring GRUB menu on ABE <Solaris10u8>. Updating package information on boot environment <Solaris10u8>. Package information successfully updated on boot environment <Solaris10u8>. Adding operating system patches to the BE <Solaris10u8>. The operating system patch installation is complete. ABE boot partition backing deleted. PBE GRUB has no capability information. PBE GRUB has no versioning information. ABE GRUB is newer than PBE GRUB. Updating GRUB. GRUB update was successfull. Configuring failsafe for system. Failsafe configuration is complete. INFORMATION: The file </var/sadm/system/logs/upgrade_log> on boot environment <Solaris10u8> contains a log of the upgrade operation. INFORMATION: The file </var/sadm/system/data/upgrade_cleanup> on boot environment <Solaris10u8> contains a log of cleanup operations required. WARNING: <3> packages failed to install properly on boot environment. INFORMATION: The file </var/sadm/system/data/upgrade_failed_pkgadds> on boot environment <Solaris10u8> contains a list of packages that failed to upgrade or install properly. INFORMATION: Review the files listed above. Remember that all of the files are located on boot environment <Solaris10u8>. Before you activate boot environment <Solaris10u8>, determine if any additional system maintenance is required or if additional media of the software distribution must be installed. The Solaris upgrade of the boot environment <Solaris10u8> is partially complete. Installing failsafe Failsafe install is complete. # umount /tmp/sol-10-u8-ga-x86-dvd # lofiadm -d /dev/lofi/1
Los tres paquetes que fallan son: "sendmail" (SUNWsndmr), "Source Compatibility" (SUNWscpr) y "Core Solaris" (SUNWcsr). Los tres casos son debidos a mi estructura personal de "datasets", y se pueden solucionar arrancando el BE y reinstalando esos paquetes.
Lo único que quedaría por hacer ahora es cambiar el BE de arranque y reiniciar el sistema. En mi caso particular, no obstante, tengo algunos problemas que hay que resolver primero:
Como mal menor, puedo arrancar el BE nuevo sin sistema de correo, para poder actualizarlo y probarlo un poco antes de activarlo. La forma más sencilla de lograrlo es eliminar el ejecutable del sistema responsable del correo, de forma que su lanzamiento falle. Para eso podemos utilizar "lumount Solaris10u8", para hacerlo visible y poder eliminarlo.
Hay que tener en cuenta que la actualización del sistema destroza por completo mi configuración de correo. Por tanto es conveniente realizar un backup previo y revisar la actualización con lupa, después.
Aprovecho la resolución de otros problemas para eliminar esta dependencia de Python 2.4, básicamente migrando mis sistemas a Python 2.5 y 2.6. Por tanto este problema desaparecerá hasta que actualicemos a una versión de Solaris que incorpore esas versiones de Python de serie.
Ya solo queda activar el nuevo BE y reiniciar la máquina:
# lustatus Boot Environment Is Active Active Can Copy Name Complete Now On Reboot Delete Status -------------------------- -------- ------ --------- ------ ---------- Solaris10u7 yes yes yes no - Solaris10u8 yes no no yes - # luactivate Solaris10u8 System has findroot enabled GRUB Generating boot-sign, partition and slice information for PBE <Solaris10u7> WARNING: <3> packages failed to install properly on boot environment <Solaris10u8>. INFORMATION: </var/sadm/system/data/upgrade_failed_pkgadds> on boot environment <Solaris10u8> contains a list of packages that failed to upgrade or install properly. Review the file before you reboot the system to determine if any additional system maintenance is required. Generating boot-sign for ABE <Solaris10u8> Saving existing file </etc/bootsign> in top level dataset for BE <Solaris10u8> as <mount-point>//etc/bootsign.prev. Generating partition and slice information for ABE <Solaris10u8> 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/c5t0d0s0 /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 <Solaris10u8> successful. # lustatus Boot Environment Is Active Active Can Copy Name Complete Now On Reboot Delete Status -------------------------- -------- ------ --------- ------ ---------- Solaris10u7 yes yes no no - Solaris10u8 yes no yes no - # init 6
Una vez reiniciados, comprobamos que estamos ejecutando la versión correcta:
# cat /etc/release Solaris 10 10/09 s10x_u8wos_08a X86 Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms. Assembled 16 September 2009 # lustatus Boot Environment Is Active Active Can Copy Name Complete Now On Reboot Delete Status -------------------------- -------- ------ --------- ------ ---------- Solaris10u7 yes no no yes - Solaris10u8 yes yes yes no -
Ahora reinstalamos los tres paquetes fallidos, recreo el servicio de correo, y me aseguro de que todo funciona a la perfección.
Los cambios más reseñables respecto a la anterior actualización son:
Lo ideal es realizar esta actualización antes de activar el nuevo BE, pero ya es tarde para ello. Los pasos a dar para actualizar el "Solaris 10 Companion" en "caliente" son: (se describen perfectamente en el "README" del CD)
[root@tesalia tmp]# cat sol-10-u8-companion-ga.cfg mail= conflict=nocheck setuid=nocheck action=nocheck partial=nocheck instance=overwrite idepend=nocheck rdepend=nocheck space=check # lofiadm -a /tmp/sol-10-u8-companion-ga.iso /dev/lofi/1 # mkdir /tmp/sol-10-u8-companion-ga # mount -o ro -F hsfs /dev/lofi/1 /tmp/sol-10-u8-companion-ga # cd /tmp/sol-10-u8-companion-ga/Solaris_Software_Companion/Solaris_i386/Packages # pkgadd -a /tmp/sol-10-u8-companion-ga.cfg -d . [...] # cd / # umount /dev/lofi/1 # lofiadm -d /dev/lofi/1
Eliminar el BE previo es buena idea cuando actualicemos el formato ZFS de los discos, ya que la versión previa del sistema no podría leerla.
Más información sobre los OpenBadges
Donación BitCoin: 19niBN42ac2pqDQFx6GJZxry2JQSFvwAfS