Upgrade de versión Servidor Solaris 11
Con la llegada de Solaris 11 ya se puede subir la versión de “release” fácilmente. Hasta ahora, en Solaris 10, si queríamos pasar del “Update X” al “Update Y” había que reinstalar el servidor. El instalador detectaba que existía una versión instalada y daba la opción de subir de “release“. En Solaris 11 sin embargo, gracias al gestor de paquetes que tiene es mucho mas fácil y el tiempo de parada se ha disminuido al máximo.
Veamos como se haría en el siguiente ejemplo. Tenemos un servidor con los siguientes datos:
- Release:
# more /etc/release
Oracle Solaris 11 11/11 X86
Copyright (c) 1983, 2011, Oracle and/or its affiliates.
All rights reserved. Assembled 18 October 2011
- Uname:
# uname -a
SunOS HOSTNAME 5.11 11.0 i86pc i386 i86pc
- Kernel:
# pkg info system/kernel
Name: system/kernel
Summary: Core Kernel
Description: Core operating system kernel, device drivers and other modules.
Category: System/Core
State: Installed
Publisher: solaris
Version: 0.5.11
Build Release: 5.11
Branch: 0.175.0.11.0.4.1
Packaging Date: 30 de agosto de 2012 14:21:42
Size: 32.04 MB
FMRI: pkg://solaris/system/kernel@0.5.11,5.11-0.175.0.11.0.4.1:20120830T142142Z
- Entire:
# pkg info entire
Name: entire
Summary: entire incorporation including Support Repository Update (Oracle Solaris 11 11/11 SRU 11.4).
Description: This package constrains system package versions to the same
build. WARNING: Proper system update and correct package
selection depend on the presence of this incorporation.
Removing this package will result in an unsupported system. For
more information see https://support.oracle.com/CSP/main/article
?cmd=show&type=NOT&doctype=REFERENCE&id=1372094.1.
Category: Meta Packages/Incorporations
State: Installed
Publisher: solaris
Version: 0.5.11 (Oracle Solaris 11 SRU 11.4)
Build Release: 5.11 Branch: 0.175.0.11.0.4.1
Packaging Date: 1 de septiembre de 2012 01:14:39
Size: 5.45 kB
FMRI: pkg://solaris/entire@0.5.11,5.11-0.175.0.11.0.4.1:20120901T011439Z
- Boot Environments:
root@solaris11repo:~# beadm list
BE Active Mountpoint Space Policy Created
— —— ———- —– —— ——-
solaris-1 NR / 10.82G static 2012-10-10 16:26
Como vemos actualmente tenemos la versión 5.11 SRU 11.4. Procedemos a lanzar el parcheo del servidor indicando que cree un nuevo Boot Environment:
# pkg update –require-new-be –be-name SolarisU11.1 –accept
————————————————————
Package: pkg://solaris/consolidation/osnet/osnet-incorporation@0.5.11,5.11-0.175.1.0.0.24.2:20120919T184141Z
License: usr/src/pkg/license_files/lic_OTN
Oracle Technology Network Developer License Agreement
Oracle Solaris, Oracle Solaris Cluster and Oracle Solaris Express
…
Oracle may contact you to ask if you had a satisfactory experience installing and using this OTN software download.
Packages to remove: 1
Packages to install: 36
Packages to update: 455
Mediators to change: 2
Create boot environment: Yes
Create backup boot environment: No
DOWNLOAD PKGS FILES XFER (MB)
Completed 492/492 25247/25247 467.8/467.8
PHASE ACTIONS
Removal Phase 8164/8164
Install Phase 17909/17909
Update Phase 14639/14639
PHASE ITEMS
Package State Update Phase 945/945
Package Cache Update Phase 455/455
Image State Update Phase 2/2
A clone of solaris-1 exists and has been updated and activated.
On the next boot the Boot Environment SolarisU11.1 will be
mounted on ‘/’. Reboot when ready to switch to this updated BE.
The following unexpected or editable files and directories were
salvaged while executing the requested package operation; they
have been moved to the displayed location in the image:
var/crash -> /tmp/tmpa0wceg/var/pkg/lost+found/var/crash-20121029T111717Z
—————————————————————————
NOTE: Please review release notes posted at: https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&doctype=REFERENCE&id=1372094.1
—————————————————————————
Se ha creado un nuevo “Boot Environment” donde se ha realizado el upgrade de versión y que se ha activado para el próximo reinicio:
# beadm list
BE Active Mountpoint Space Policy Created
— —— ———- —– —— ——-
SolarisU11.1 R – 7.41G static 2012-10-29 11:11
solaris-1 N / 525.0K static 2012-10-10 16:26
Una vez reiniciado y arrancado con el nuevo “Boot Environment” podemos realizar las mismas comprobaciones que al inicio y veremos como estamos en una nueva ““Release” de Solaris 11, la 11.1:
- Release
# cat /etc/release
Oracle Solaris 11.1 X86
Copyright (c) 1983, 2012, Oracle and/or its affiliates. All rights reserved.
Assembled 19 September 2012
- Uname
# uname -a
SunOS solaris11repo 5.11 11.1 i86pc i386 i86pc
- Kernel
# pkg info system/kernel
Name: system/kernel
Summary: Core Kernel
Description: Core operating system kernel, device drivers and other modules.
Category: System/Core
State: Installed
Publisher: solaris
Version: 0.5.11
Build Release: 5.11
Branch: 0.175.1.0.0.24.2
Packaging Date: 19 de septiembre de 2012 18:50:11
Size: 32.59 MB
FMRI: pkg://solaris/system/kernel@0.5.11,5.11-0.175.1.0.0.24.2:20120919T185011Z
- Entire
# pkg info entire
Name: entire
Summary: Incorporation to lock all system packages to the same build
Description: This package constrains system package versions to the same
build. WARNING: Proper system update and correct package
selection depend on the presence of this incorporation.
Removing this package will result in an unsupported system.
Category: Meta Packages/Incorporations
State: Installed
Publisher: solaris
Version: 0.5.11
Build Release: 5.11
Branch: 0.175.1.0.0.24.2
Packaging Date: 19 de septiembre de 2012 19:01:35
Size: 5.46 kB
FMRI: pkg://solaris/entire@0.5.11,5.11-0.175.1.0.0.24.2:20120919T190135Z
En el caso de que deseemos actualizar el servidor que contiene nuestro repositorio para poder actualizar el resto de nuestra infraestructura, deberemos primero realizar el upgrade sobre este servidor. A continuación, ya se podría actualizar el repositorio para tener los paquetes de la última Release:
- Desde los repositorios de release (publicos de Oracle)
# pkgrecv -s http://pkg.oracle.com/solaris/release/ -d /export/repoSolaris11 ‘*’
Processing packages for publisher solaris…
Retrieving and evaluating 4401 package(s)…
PROCESS ITEMS GET (MB) SEND (MB)
Completed 1270/1270 5894/5894 19638/19638
- Desde los repositorios de Soporte (es necesario un CSI activo):
# pkgrecv -s https://pkg.oracle.com/solaris/support/ -d /export/repoSolaris11\ –key /var/pkg/ssl/Oracle_Solaris_11_Support.key.pem \ –cert /var/pkg/ssl/Oracle_Solaris_11_Support.certificate.pem ‘*’
Processing packages for publisher solaris …
Retrieving and evaluating 4414 package(s)…
PROCESS ITEMS GET (MB) SEND (MB)
Completed 6/6 4.5/4.5 12.0/12.0