Adding ZFS Volumes to a Non-Global Zone

You can add or create a ZFS volume in a native zone or you can add access to a volume's data in a native zone in the following ways:

  • In a native zone, a privileged zone administrator can create a ZFS volume as descendant of a previously delegated file system. For example, you can type the following command for the file system system1/zone/zion that was delegated in the previous example:

    $ zfs create -V 2g system1/zone/zion/vol1
    

    After the volume is created, the zone administrator can manage the volume's properties and data in the native zone as well as create snapshots.

  • In a global or kernel zone, use the zonecfg add device command and specify a ZFS volume whose data can be accessed in a native zone. For example:

    global$ zonecfg -z zion
    zonecfg:zion> add device
    zonecfg:zion:device> set match=/dev/zvol/dsk/system1/volumes/vol2
    zonecfg:zion:device> end
    

    In this example, only the volume data can be accessed in the native zone.