Solaris 10 10/08 Installationshandbuch: Solaris Live Upgrade und Planung von Upgrades

ProcedureSo migrieren Sie ein UFS-Dateisystem auf ein ZFS-Dateisystem


Hinweis –

Damit Sie ein aktives UFS-Root-Dateisystem (/) in ein ZFS-Root-Pool migrieren können, müssen Sie den Namen des Root-Pools angeben. Die kritischen Dateisysteme werden dann in das Root-Pool kopiert.


  1. Arbeiten Sie die folgenden Schritte ab, wenn Sie Solaris Live Upgrade zum ersten Mal verwenden.


    Hinweis –

    Damit Sie mit Solaris Live Upgrade neue ZFS-Boot-Umgebungen installieren können, muss auf Ihrem System mindestens Solaris-Release 10 10/08 installiert sein. In früheren Releases ist die ZFS- und Solaris Live Upgrade-Software zum Durchführen dieser Aufgaben nicht enthalten.


    1. Entfernen Sie - falls erforderlich - vorhandene Solaris Live Upgrade-Packages von Ihrem System. Wenn Sie ein Upgrade auf ein neues Release durchführen, müssen Sie die Packages dieses Release installieren.

      Die drei Solaris Live Upgrade-Packages SUNWluu, SUNWlur und SUNWlucfg enthalten die zum Aktualisieren mithilfe von Solaris Live Upgrade erforderliche Software. Diese Pakete enthalten die bestehende Software, neue Funktionen sowie Bugfixes. Wenn Sie die vorhandenen Packages nicht entfernen und die neuen Packages auf Ihrem System installieren, bevor Sie Solaris Live Upgrade ausführen, schlägt das Aktualisieren auf die Zielversion fehl.


      # pkgrm SUNWlucfg SUNWluu SUNWlur
      
    2. Installieren Sie die Solaris Live Upgrade-Packages des Release, auf das Sie aktualisieren möchten. Eine Anleitung finden Sie unter  Installieren von Solaris Live Upgrade.

    3. Vor der Installation und dem Ausführen von Solaris Live Upgrade müssen Sie die folgenden Patches installieren. Diese Patches gewährleisten, dass auf Ihrem System die neuesten Fehlerbehebungen und Leistungsmerkmale installiert sind.

      Vergewissern Sie sich auf SunSolve, dass Sie die aktuellste Patch-Liste haben. Suchen Sie auf der SunSolve-Website nach dem Informationsdokument 206844 (früher 72099).

      • Melden Sie sich als Superuser an oder nehmen Sie eine entsprechende Rolle an.

      • Zum Speichern der Patches auf einer lokalen Festplatte sollten Sie ein Verzeichnis wie z. B. /var/tmp/lupatches erstellen und die Patches in dieses Verzeichnis herunterladen.

      • Laden Sie von der SunSolve -Website die Patchliste herunter.

      • Wechseln Sie in das Patch-Verzeichnis.


        # cd /var/tmp/lupatches
        
      • Installieren Sie die Patches mit dem Befehl patchadd.


        # patchadd Patch-ID
        

        Patch-ID sind die Patchnummern. Trennen Sie mehrere Patch-Namen mit Leerzeichen voneinander.


        Hinweis –

        Sie müssen die Patches in der im Dokument 206844 angegebenen Reihenfolge installieren.


      • Starten Sie, falls erforderlich, das System neu. Bei einigen Patches ist ein Systemneustart erforderlich.

        Nur x86: Das System muss neu gestartet werden, anderenfalls schlägt Solaris Live Upgrade fehl.


        # init 6
        
  2. Erstellen Sie ein ZFS-Root-Pool.

    Damit das ZFS-Root-Pool gebootet und aktualisiert werden kann, muss es sich auf einem einzigen Slice befinden.


    # zpool create rpool  c0t1d0s5
    
    rpool

    Legt den Namen des neu anzulegenden ZFS-Root-Pools fest.

    c0t1d0s5

    Erstellt das neue Root-Pool auf Festplatten-Slice c0t1d0s5 .

    Informationen zum Erstellen eines neuen Root-Pools finden Sie in Solaris ZFS - Administrationshandbuch.

  3. Migrieren Sie das UFS-Root-Dateisystem (/) auf das neue ZFS-Root-Pool.


    # lucreate [-c ufsBU] -n neue-zfsBU -p rpool
    
    -c ufsBU

    Weist der aktuellen Boot-Umgebung den Namen ufsBU zu. Diese Option ist nicht obligatorisch und wird nur beim Erstellen der ersten Boot-Umgebung verwendet. Wenn Sie lucreate zum ersten Mal ausführen und dabei keine Option -c angeben, erstellt die Software automatisch einen Standardnamen.

    -n neue-zfsBU

    Weist der zu erstellenden Boot-Umgebung den Namen neue-zfsBU zu. Der Name muss auf dem System einmalig sein.

    -p rpool

    Legt das neu erstellte ZFS-Root-Dateisystem (/) in dem in rpool definierten ZFS-Root-Pool an.

    Das Erstellen der neuen ZFS-Boot-Umgebung kann eine gewisse Zeit dauern. Die Daten des UFS-Dateisystems werden in das ZFS-Root-Pool kopiert. Nach dem Erstellen der inaktiven Boot-Umgebung können Sie die neue ZFS-Boot-Umgebung mithilfe der Befehle luupgrade bzw. luactivate aktualisieren bzw. aktivieren.

  4. (Optional) Überprüfen Sie, ob die Boot-Umgebung vollständig ist.

    In diesem Beispiel erzeugt der Befehl lustatus einen Bericht, ob die erstellte Boot-Umgebung vollständig und bootfähig ist.


    # lustatus
    boot environment   Is         Active   Active     Can	    Copy
    Name               Complete   Now	  OnReboot   Delete	 Status
    -----------------------------------------------------------------
    ufsBE               yes       yes      yes        no         -
    new-zfsBE           yes       no       no        yes         -
  5. (Optional) Überprüfen Sie die grundlegenden Dataset-Informationen auf dem System.

    Der Befehl list zeigt die Namen aller auf dem System vorhandenen Datasets an. In diesem Beispiel ist rpool der Name des ZFS-Pools und neue-zfsBU der Name der neu erstellten ZFS-Boot-Umgebung.


    # zfs list
    NAME                        USED  AVAIL  REFER  MOUNTPOINT
    rpool                      9.29G  57.6G    20K  /rpool
    rpool/ROOT                 5.38G  57.6G    18K  /rpool/ROOT
    rpool/ROOT/new-zfsBE       5.38G  57.6G   551M  /tmp/.alt.luupdall.110034
    rpool/dump                 1.95G      -  1.95G  -
    rpool/swap                 1.95G      -  1.95G  -

    Die für die neue Boot-Umgebung angezeigten Einhängepunkte sind temporär und gelten nur bis zur Ausführung des Befehls luactivate. Die Volumes /dump und /swap werden nicht gemeinsam mit der ursprünglichen UFS-Boot-Umgebung, sondern innerhalb des ZFS-Root-Pools und mit Boot-Umgebungen innerhalb des Root-Pools genutzt.

    Sie können die neue Boot-Umgebung jetzt aktualisieren und aktivieren. Siehe Beispiel 13–1.


Beispiel 13–1 Migration eines UFS-Root-Dateisystems (/) auf ein ZFS-Root-Pool

In diesem Beispiel wird das neue ZFS-Root-Pool rpool auf dem separaten Slice C0t0d0s4 erstellt. Der Befehl lucreate migriert die aktuell laufende UFS-Boot-Umgebung c0t0d0 auf die neue ZFS-Boot-Umgebung neue-zfsBU und legt die neue Boot-Umgebung in rpool an.


# zpool create rpool C0t0d0s4

# zfs list
NAME                        USED  AVAIL  REFER  MOUNTPOINT
rpool                      9.29G  57.6G    20K  /rpool
# lucreate -c c0t0d0 -n new-zfsBE -p rpool
Analyzing system configuration.
Current boot environment is named <c0t0d0>.
Creating initial configuration for primary boot environment <c0t0d0>.
The device </dev/dsk/c0t0d0> is not a root device for any boot
environment; cannot get BE ID.
PBE configuration successful: PBE name <c0t0d0> PBE Boot Device
</dev/dsk/c0t0d0>.
Comparing source boot environment <c0t0d0> 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.
The device </dev/dsk/c1t0d0s0> is not a root device for any boot
environment; cannot get BE ID.
Creating configuration for boot environment <new-zfsBE>.
Source boot environment is <c0t0d0>.
Creating boot environment <new-zfsBE>.
Creating file systems on boot environment <new-zfsBE>.
Creating <zfs> file system for </> in zone <global> on
<rpool/ROOT/new-zfsBE>.
Populating file systems on boot environment <new-zfsBE>.
Checking selection integrity.
Integrity check OK.
Populating contents of mount point </>.
Copying.
Creating shared file system mount points.
Creating compare databases for boot environment <zfsBE>.
Creating compare database for file system </>.
Making boot environment <zfsBE> bootable.
Creating boot_archive for /.alt.tmp.b-cBc.mnt
updating /.alt.tmp.b-cBc.mnt/platform/sun4u/boot_archive
Population of boot environment <new-zfsBE> successful.
Creation of boot environment <new-zfsBE> successful.

# lustatus
boot environment   Is         Active   Active     Can	    Copy
Name               Complete   Now	  OnReboot   Delete	 Status
------------------------------------------------------------------------
c0t0d0             yes       yes      yes        no         -
new-zfsBE           yes       no       no        yes       -

# zfs list
NAME                        USED  AVAIL  REFER  MOUNTPOINT
rpool                      9.29G  57.6G    20K  /rpool
rpool/ROOT                 5.38G  57.6G    18K  /rpool/ROOT
rpool/ROOT/zfsBE           5.38G  57.6G   551M
rpool/ROOT/new-zfsBE       5.38G  57.6G   551M  /tmp/.alt.luupdall.110034
rpool/dump                 1.95G      -  1.95G  -
rpool/swap                 1.95G      -  1.95G  - 

Sie können die neue Boot-Umgebung jetzt aktualisieren bzw.·aktivieren.

In diesem Beispiel wird die neue Boot-Umgebung mithilfe des Befehls luupgrade von einem Abbild aktualisiert, das sich in dem in der Option -s angegebenen Verzeichnis befindet.


# luupgrade -n zfsBE -u -s /net/install/export/s10/combined.s10
 51135 blocks
miniroot filesystem is <lofs>
Mounting miniroot at
</net/install/export/solaris_10/combined.solaris_10_wos
/Solaris_10/Tools/Boot>
Validating the contents of the media
</net/install/export/s10/combined.s10>.
The media is a standard Solaris media.
The media contains an operating system upgrade image.
The media contains Solaris version <10_1008>.
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 <zfsBE>.
Determining packages to install or upgrade for BE <zfsBE>.
Performing the operating system upgrade of the BE <zfsBE>.
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.
Adding operating system patches to the BE <zfsBE>.
The operating system patch installation is complete.
INFORMATION: The file /var/sadm/system/logs/upgrade_log on boot
environment <zfsBE> contains a log of the upgrade operation.
INFORMATION: The file var/sadm/system/data/upgrade_cleanup on boot
environment <zfsBE> contains a log of cleanup operations required.
INFORMATION: Review the files listed above. Remember that all
of the files are located on boot environment <zfsBE>.
Before you activate boot environment <zfsBE>, 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 <zfsBE> is complete.

Die neue Boot-Umgebung kann zu einem beliebigen Zeitpunkt nach ihrer Erstellung aktiviert werden.


# luactivate new-zfsBE
**********************************************************************

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. Enter the PROM monitor (ok prompt).

2. Change the boot device back to the original boot environment by typing:

     setenv boot-device /pci@1f,0/pci@1/scsi@4,1/disk@2,0:a

3. Boot to the original boot environment by typing:

     boot

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

Modifying boot archive service
Activation of boot environment <new-zfsBE> successful.

Booten Sie das System mit der ZFS-Boot-Umgebung neu.


# init 6
# svc.startd: The system is coming down.  Please wait.
svc.startd: 79 system services are now being stopped.
.
.
.

Wenn Sie einen Fallback auf die UFS-Boot-Umgebung durchführen, müssen Sie alle in der ZFS-Boot-Umgebung erstellten ZFS-Speicherpools neu importieren, da diese·in der UFS-Boot-Umgebung nicht automatisch verfügbar sind. Beim Umschalten auf die UFS-Boot-Umgebung werden Meldungen wie im folgenden Beispiel angezeigt.


# luactivate c0t0d0
WARNING: The following files have changed on both the current boot
environment <new-zfsBE> zone <global> and the boot environment
to be activated <c0t0d0>:
 /etc/zfs/zpool.cache
INFORMATION: The files listed above are in conflict between the current
boot environment <zfsBE> zone <global> and the boot environment to be
activated <c0t0d0>. These files will not be automatically synchronized
from the current boot environment <new-zfsBE> when boot environment <c0t0d0>