Oracle Solaris ZFS-Administrationshandbuch

ProcedureSo erstellen Sie eine ZFS-BU mit einem ZFS-Root-Dateisystem und einem Zonen-Root (ab Solaris 10 5/09)

Verwenden Sie dieses Verfahren, nachdem Sie eine Erstinstallation von Solaris 10 5/09 oder einer höheren Version durchgeführt haben, um ein ZFS-Root-Dateisystem zu erstellen. Verwenden Sie dieses Verfahren ebenfalls, nachdem Sie die Funktion luupgrade verwendet haben, um ein ZFS-Root-Dateisystem auf Solaris 10 5/09 oder eine höhere Version zu aktualisieren. Eine mit dieser Vorgehensweise erstellte ZFS-BU kann aktualisiert oder gepatcht werden.

Das in den folgenden Schritten verwendete Oracle Solaris 10 9/10-Beispielsystem besitzt ein ZFS-Root-Dateisystem und ein Zonen-Root-Dataset in /rpool/zones. Eine ZFS-BU mit dem Namen zfs2BE wird erstellt, die aktualisiert oder gepatcht werden kann.

  1. Überprüfen Sie die vorhandenen ZFS-Dateisysteme.


    # zfs list
    NAME                   USED  AVAIL  REFER  MOUNTPOINT
    rpool                 7.26G  59.7G    98K  /rpool
    rpool/ROOT            4.64G  59.7G    21K  legacy
    rpool/ROOT/zfsBE      4.64G  59.7G  4.64G  /
    rpool/dump            1.00G  59.7G  1.00G  -
    rpool/export            44K  59.7G    23K  /export
    rpool/export/home       21K  59.7G    21K  /export/home
    rpool/swap               1G  60.7G    16K  -
    rpool/zones            633M  59.7G   633M  /rpool/zones
  2. Stellen Sie sicher, dass die Zonen installiert und gebootet sind.


    # zoneadm list -cv
      ID NAME             STATUS     PATH                           BRAND    IP    
       0 global           running    /                              native   shared
       2 zfszone          running    /rpool/zones                   native   shared
  3. Erstellen Sie die ZFS-BU.


    # lucreate -n zfs2BE
    Analyzing system configuration.
    No name for current boot environment.
    INFORMATION: The current boot environment is not named - assigning name <zfsBE>.
    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 <zfsBE> PBE Boot Device </dev/dsk/c1t0d0s0>.
    Comparing source boot environment <zfsBE> 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 <zfs2BE>.
    Source boot environment is <zfsBE>.
    Creating boot environment <zfs2BE>.
    Cloning file systems from boot environment <zfsBE> to create boot environment <zfs2BE>.
    Creating snapshot for <rpool/ROOT/zfsBE> on <rpool/ROOT/zfsBE@zfs2BE>.
    Creating clone for <rpool/ROOT/zfsBE@zfs2BE> on <rpool/ROOT/zfs2BE>.
    Setting canmount=noauto for </> in zone <global> on <rpool/ROOT/zfs2BE>.
    Population of boot environment <zfs2BE> successful.
    Creation of boot environment <zfs2BE> successful.
  4. Aktivieren Sie die ZFS-BU.


    # lustatus
    Boot Environment           Is       Active Active    Can    Copy      
    Name                       Complete Now    On Reboot Delete Status    
    -------------------------- -------- ------ --------- ------ ----------
    zfsBE                      yes      yes    yes       no     -         
    zfs2BE                     yes      no     no        yes    -         
    # luactivate zfs2BE
    A Live Upgrade Sync operation will be performed on startup of boot environment <zfs2BE>.
    .
    .
    .
    # init 6
    
  5. Überprüfen Sie, ob die ZFS-Dateisysteme und Zonen in der neuen BU erstellt wurden.


    # zfs list
    NAME                               USED  AVAIL  REFER  MOUNTPOINT
    rpool                             7.38G  59.6G    98K  /rpool
    rpool/ROOT                        4.72G  59.6G    21K  legacy
    rpool/ROOT/zfs2BE                 4.72G  59.6G  4.64G  /
    rpool/ROOT/zfs2BE@zfs2BE          74.0M      -  4.64G  -
    rpool/ROOT/zfsBE                  5.45M  59.6G  4.64G  /.alt.zfsBE
    rpool/dump                        1.00G  59.6G  1.00G  -
    rpool/export                        44K  59.6G    23K  /export
    rpool/export/home                   21K  59.6G    21K  /export/home
    rpool/swap                           1G  60.6G    16K  -
    rpool/zones                       17.2M  59.6G   633M  /rpool/zones
    rpool/zones-zfsBE                  653M  59.6G   633M  /rpool/zones-zfsBE
    rpool/zones-zfsBE@zfs2BE          19.9M      -   633M  -
    # zoneadm list -cv
      ID NAME             STATUS     PATH                           BRAND    IP    
       0 global           running    /                              native   shared
       - zfszone          installed  /rpool/zones                   native   shared