Oracle Solaris ZFS-Administrationshandbuch

ProcedureSo migrieren Sie ein UFS-Root-Dateisystem mit Zonen-Roots in ein ZFS-Root-Dateisystem (ab Solaris 10 5/09)

Verwenden Sie dieses Verfahren, um ein System mit einem UFS-Root-Dateisystem und einer Zonen-Root auf Solaris 10 5/09 oder eine höhere Version zu migrieren. Erstellen Sie dann mit Oracle Solaris Live Upgrade eine ZFS-BU.

In den folgenden Schritten lautet der Name der UFS-Beispiel-BU c0t1d0s0, der UFS-Zonen-Root heißt zonepool/zfszone und die ZFS-Root-BU heißt zfsBE.

  1. Aktualisieren Sie das System auf Solaris 10 5/09 oder eine höhere Version, falls darauf eine frühere Solaris 10-Version installiert ist.

    Weitere Informationen zum Aktualisieren eines Systems, auf dem Solaris 10 installiert ist, finden Sie in Oracle Solaris 10 9/10 Installationshandbuch: Solaris Live Upgrade und Planung von Upgrades .

  2. Erstellen Sie den Root-Pool.

    Informationen zu Voraussetzungen für den Root-Pool finden Sie unter Oracle Solaris-Installation und Oracle Solaris Live Upgrade: Voraussetzungen für die ZFS-Unterstützung.

  3. Überprüfen Sie, ob die Zonen aus der UFS-Umgebung gebootet wurden.


    # zoneadm list -cv
      ID NAME             STATUS     PATH                           BRAND    IP    
       0 global           running    /                              native   shared
       2 zfszone          running    /zonepool/zones                native   shared
  4. Erstellen Sie die neue ZFS-Boot-Umgebung.


    # lucreate -c c1t1d0s0 -n zfsBE -p rpool
    

    Dieser Befehl erstellt im Root-Pool Datasets für die neue Boot-Umgebung und kopiert die aktuelle Boot-Umgebung einschließlich der Zonen in diese Datasets.

  5. Aktivieren Sie die neue ZFS-Boot-Umgebung.


    # lustatus
    Boot Environment           Is       Active Active    Can    Copy      
    Name                       Complete Now    On Reboot Delete Status    
    -------------------------- -------- ------ --------- ------ ----------
    c1t1d0s0                   yes      no     no        yes    -         
    zfsBE                      yes      yes    yes       no     -         #
    luactivate zfsBE       
    A Live Upgrade Sync operation will be performed on startup of boot environment <zfsBE>.
    .
    .
    .
  6. Starten Sie das System neu.


    # init 6
    
  7. Überprüfen Sie, ob die ZFS-Dateisysteme und Zonen in der neuen BU erstellt wurden.


    # zfs list
    NAME                                USED  AVAIL  REFER  MOUNTPOINT
    rpool                              6.17G  60.8G    98K  /rpool
    rpool/ROOT                         4.67G  60.8G    21K  /rpool/ROOT
    rpool/ROOT/zfsBE                   4.67G  60.8G  4.67G  /
    rpool/dump                         1.00G  60.8G  1.00G  -
    rpool/swap                          517M  61.3G    16K  -
    zonepool                            634M  7.62G    24K  /zonepool
    zonepool/zones                      270K  7.62G   633M  /zonepool/zones
    zonepool/zones-c1t1d0s0             634M  7.62G   633M  /zonepool/zones-c1t1d0s0
    zonepool/zones-c1t1d0s0@zfsBE       262K      -   633M  -
    # zoneadm list -cv
      ID NAME             STATUS     PATH                           BRAND    IP    
       0 global           running    /                              native   shared
       - zfszone          installed  /zonepool/zones                native   shared

Beispiel 5–7 Migrieren eines UFS-Root-Dateisystems mit Zonen-Root in ein ZFS-Root-Dateisystem

In diesem Beispiel wird ein Oracle Solaris 9 10/10-System mit einem UFS-Root-Dateisystem, einem Zonen-Root (/uzone/ufszone), einem ZFS-Pool außerhalb des Roots (pool ) und einem Zonen-Root (/pool/zfszone) in ein ZFS-Root-Dateisystem migriert. Stellen Sie vor dem Migrationsversuch sicher, dass der ZFS-Root-Pool erstellt sowie die Zonen installiert und gebootet wurden.


# zoneadm list -cv
  ID NAME             STATUS     PATH                           BRAND    IP    
   0 global           running    /                              native   shared
   2 ufszone          running    /uzone/ufszone                 native   shared
   3 zfszone          running    /pool/zones/zfszone            native   shared

# lucreate -c ufsBE -n zfsBE -p rpool
Analyzing system configuration.
No name for current boot environment.
Current boot environment is named <zfsBE>.
Creating initial configuration for primary boot environment <zfsBE>.
The device </dev/dsk/c1t0d0s0> is not a root device for any boot environment; cannot get BE ID.
PBE configuration successful: PBE name <ufsBE> PBE Boot Device </dev/dsk/c1t0d0s0>.
Comparing source boot environment <ufsBE> 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/c1t1d0s0> is not a root device for any boot environment; cannot get BE ID.
Creating configuration for boot environment <zfsBE>.
Source boot environment is <ufsBE>.
Creating boot environment <zfsBE>.
Creating file systems on boot environment <zfsBE>.
Creating <zfs> file system for </> in zone <global> on <rpool/ROOT/zfsBE>.
Populating file systems on boot environment <zfsBE>.
Checking selection integrity.
Integrity check OK.
Populating contents of mount point </>.
Copying.
Creating shared file system mount points.
Copying root of zone <ufszone> to </.alt.tmp.b-EYd.mnt/uzone/ufszone>.
Creating snapshot for <pool/zones/zfszone> on <pool/zones/zfszone@zfsBE>.
Creating clone for <pool/zones/zfszone@zfsBE> on <pool/zones/zfszone-zfsBE>.
Creating compare databases for boot environment <zfsBE>.
Creating compare database for file system </rpool/ROOT>.
Creating compare database for file system </>.
Updating compare databases on boot environment <zfsBE>.
Making boot environment <zfsBE> bootable.
Creating boot_archive for /.alt.tmp.b-DLd.mnt
updating /.alt.tmp.b-DLd.mnt/platform/sun4u/boot_archive
Population of boot environment <zfsBE> successful.
Creation of boot environment <zfsBE> successful.
# lustatus
Boot Environment           Is       Active Active    Can    Copy      
Name                       Complete Now    On Reboot Delete Status    
-------------------------- -------- ------ --------- ------ ----------
ufsBE                      yes      yes    yes       no     -         
zfsBE                      yes      no     no        yes    -         
# luactivate zfsBE    
.
.
.
# init 6
.
.
.
# zfs list
NAME                                    USED  AVAIL  REFER  MOUNTPOINT
pool                                    628M  66.3G    19K  /pool
pool/zones                              628M  66.3G    20K  /pool/zones
pool/zones/zfszone                     75.5K  66.3G   627M  /pool/zones/zfszone
pool/zones/zfszone-ufsBE                628M  66.3G   627M  /pool/zones/zfszone-ufsBE
pool/zones/zfszone-ufsBE@zfsBE           98K      -   627M  -
rpool                                  7.76G  59.2G    95K  /rpool
rpool/ROOT                             5.25G  59.2G    18K  /rpool/ROOT
rpool/ROOT/zfsBE                       5.25G  59.2G  5.25G  /
rpool/dump                             2.00G  59.2G  2.00G  -
rpool/swap                              517M  59.7G    16K  -
# zoneadm list -cv
  ID NAME             STATUS     PATH                           BRAND    IP    
   0 global           running    /                              native   shared
   - ufszone          installed  /uzone/ufszone                 native   shared
   - zfszone          installed  /pool/zones/zfszone            native   shared