Guia de administração do ZFS Oracle Solaris

ProcedureComo criar um BE do ZFS com um sistema de arquivos raiz ZFS e uma raiz de região (pelo menos Solaris 10 5/09)

Utilize este procedimento depois de ter efetuado uma instalação inicial pelo menos da versão Solaris 10 5/09 para criar um sistema de arquivos raiz ZFS. Utilize também este procedimento depois de ter utilizado o recurso luupgrade para atualizar um sistema de arquivos raiz ZFS para pelo menos a versão Solaris 10 5/09. Um BE do ZFS criado através deste procedimento pode, portanto, ser atualizado e receber correções.

Nas etapas a seguir, o sistema Oracle Solaris 10 9/10 de exemplo apresenta um sistema de arquivos raiz ZFS e um conjunto de dados de região de raiz em /rpool/zones. É criado um BE do ZFS denominado zfs2BE que pode ser atualizado e ter patches instalados.

  1. Revise os sistemas de arquivos ZFS existentes.


    # 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. Certifique-se de que as regiões estejam instaladas e inicializadas.


    # zoneadm list -cv
      ID NAME             STATUS     PATH                           BRAND    IP    
       0 global           running    /                              native   shared
       2 zfszone          running    /rpool/zones                   native   shared
  3. Crie o BE do ZFS.


    # 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. Ative o BE do ZFS.


    # 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. Comprove se os sistemas de arquivos ZFS e as regiões foram criados no novo BE.


    # 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