Oracle Solaris ZFS Administration Guide

ProcedureHow to Configure a ZFS Root File System With Zone Roots on ZFS (Solaris 10 10/08)

This procedure explains how to set up a ZFS root file system and ZFS zone root configuration that can be upgraded or patched. In this configuration, the ZFS zone roots are created as ZFS datasets.

In the steps that follow the example pool name is rpool and the example name of the active boot environment is s10BE. The name for the zones dataset can be any legal dataset name. In the following example, the zones dataset name is zones.

  1. Install the system with a ZFS root, either by using the Solaris interactive text installer or the Solaris JumpStart installation method.

    For information about installing a ZFS root file system by using the initial installation method or the Solaris JumpStart method, see Installing a ZFS Root File System (Initial Installation) or Installing a ZFS Root File System (Oracle Solaris JumpStart Installation).

  2. Boot the system from the newly created root pool.

  3. Create a dataset for grouping the zone roots.

    For example:


    # zfs create -o canmount=noauto rpool/ROOT/s10BE/zones
    

    Setting the noauto value for the canmount property prevents the dataset from being mounted other than by the explicit action of Oracle Solaris Live Upgrade and system startup code.

  4. Mount the newly created zones dataset.


    # zfs mount rpool/ROOT/s10BE/zones
    

    The dataset is mounted at /zones.

  5. Create and mount a dataset for each zone root.


    # zfs create -o canmount=noauto rpool/ROOT/s10BE/zones/zonerootA
    # zfs mount rpool/ROOT/s10BE/zones/zonerootA
    
  6. Set the appropriate permissions on the zone root directory.


    # chmod 700 /zones/zonerootA
    
  7. Configure the zone, setting the zone path as follows:


    # zonecfg -z zoneA
        zoneA: No such zone configured
        Use 'create' to begin configuring a new zone.
        zonecfg:zoneA> create
        zonecfg:zoneA> set zonepath=/zones/zonerootA
    

    You can enable the zones to boot automatically when the system is booted by using the following syntax:


    zonecfg:zoneA> set autoboot=true
    
  8. Install the zone.


    # zoneadm -z zoneA install
    
  9. Boot the zone.


    # zoneadm -z zoneA boot