Configuring a direct mount of VxFS file system in a non-global zone with VCS

Last published : Jun 10, 2026
Typical steps to configure a direct mount inside a non-global zone.
To configure a direct mount inside a non-global zone
  1. Create a VxVM disk group and volume:
    • Create a VxVM disk group from a device:
      global# vxdg init data_dg c0t0d1
      • Create a volume from a disk group:
      global# vxassist -g data_dg make data_vol 5G
For more information, see the Storage Foundation Administrator's Guide.
  1. Create a zone:
    • Create a root directory for a zone local-zone and change its permission to 700:
      global# mkdir -p /zones/local-zone
      global# chmod 700 /zones/local-zone
      • On Solaris 11, configure a zone local-zone:
      global# zonecfg -z local-zone

      local-zone: No such zone configured
      Use 'create' to begin configuring a new zone.

      zonecfg:local-zone> create
      zonecfg:local-zone> set zonepath=/zones/local-zone
      zonecfg:local-zone> set ip-type=shared
      zonecfg:local-zone> add net
      zonecfg:local-zone:net> set physical=eri0
      zonecfg:local-zone:net> set address=192.168.5.59
      zonecfg:local-zone:net> end
      zonecfg:local-zone > verify
      zonecfg:local-zone > commit
      zonecfg:local-zone > exit
The zone is in configured state.
  • Install the zone:
    global# zoneadm -z local-zone install
    -  Login to the zone console to setup the zone from terminal 1:
    global# zlogin -C local-zone
  • Boot the zone from another terminal: global# zoneadm -z local-zone boot

    -  Follow the steps on terminal 1 on the zone console to setup the zone.

    See the *Oracle* documentation for more information about creating a zone.

    1.  Add VxVM volumes to the zone configuration:

        -  Check the zone status and halt the zone, if it is running:

    ```txt
    global# zoneadm list -cv
    ID NAME       STATUS   PATH           BRAND    IP
    0 global      running  /              native    shared
    2 local-zone  running  /zones/myzone  native    shared

    global# zoneadm -z myzone halt
  • Add the VxVM devices to the zone's configuration: global# zonecfg -z local-zone zonecfg:local-zone:fs> add device zonecfg:local-zone:fs> set match=/dev/vxportal zonecfg:local-zone:fs> end zonecfg:local-zone:fs> add device zonecfg:local-zone:fs> set match=/dev/fdd zonecfg:local-zone:fs> end zonecfg:local-zone:fs> add device zonecfg:local-zone:fs> set match=/dev/vx/rdsk/data_dg/data_vol zonecfg:local-zone:fs> end zonecfg:local-zone:fs> add device zonecfg:local-zone:fs> set match=/dev/vx/dsk/data_dg/data_vol zonecfg:local-zone:fs> end zonecfg:local-zone:fs> add fs zonecfg:local-zone:fs> set dir=/etc/vx/licenses/lic zonecfg:local-zone:fs> set special=/etc/vx/licenses/lic zonecfg:local-zone:fs> set type=lofs zonecfg:local-zone:fs> end zonecfg:local-zone> verify zonecfg:local-zone> commit zonecfg:local-zone> exit
    • On Solaris 11, you must set fs-allowed to vxfs and odm in the zone's configuration: global# zonecfg -z myzone zonecfg:myzone> set fs-allowed=vxfs,odm zonecfg:myzone> commit zonecfg:myzone> exit
  • Boot the zone:
    global# zoneadm -z myzone boot
    1. Create a VxFS file system on the volume inside a non-global zone:
      • Login to the local-zone:
    global# zlogin myzone
  • Create a VxFS file system on the block device: bash-3.00# mkfs -F vxfs /dev/vx/dsk/data_dg/data_vol

    1.  Create a mount point inside the zone:

        -  Login to the local-zone:

    ```txt
    global# zlogin myzone
  • Create a mount point inside the non-global zone: bash-3.00# mkdir -p /mydata
    • Mount the VxFS file system on the mount point: bash-3.00# mount -F vxfs /dev/vx/dsk/data_dg/data_vol /mydata
  1. Configure the zone service group:
    • On the first node, create the service group with password-less communication with global zone:
      global# hazonesetup -g zone_grp -r zone_res -z myzone \
      -p password -s sysA,sysB
      • Switch the service group from the first node to the second node and run the hazonesetup command to setup password-less communication from the next node.
      • Repeat step 6 for all the nodes in the cluster where the zone can go online.
      1. Create a mount, disk group, and volume resources into the service group:
        • Add a disk group resource to the service group:
      global# hares -add dg_res DiskGroup zone_grp
      global# hares -modify dg_res DiskGroup data_dg
      global# hares -modify dg_res Enabled 1
  • Add a volume resource to the service group:
    global# hares -add vol_res Volume zone_grp
    global# hares -modify vol_res Volume data_vol
    global# hares -modify vol_res DiskGroup data_dg
    global# hares -modify vol_res Enabled 1
    -  Add a Mount resource to the service group:
    global# hares -add mnt_res Mount zone_grp
    global# hares -modify mnt_res BlockDevice \
    /dev/vx/dsk/data_dg/data_vol
    global# hares -modify mnt_res MountPoint /mydata
    global# hares -modify mnt_res FSType vxfs
    global# hares -modify mnt_res FsckOpt %-y
    global# hares -modify mnt_res Enabled 1
  • Create a resource dependency between the resources in the service group: global# hares -link zone_res vol_res global# hares -link vol_res dg_res global# hares -link mnt_res zone_res

    1.  Set the ContainerOpts attribute for the Mount resource for VxFS direct mount:

        -  Override the ContainerOpts attribute at the resource level for mnt_res:

    ```txt
    global# hares -override mnt_res ContainerOpts
  • Set the value of the RunInContainer key to 1: global# hares -modify mnt_res ContainerOpts RunInContainer 1 PassCInfo 0

    For information on overriding resource type static attributes: see the *Cluster Server Administrator's Guide*.

    1.  Here is a sample configuration for the VxFS direct mount service groups in the ``main.cf`` file:

    ```txt
    group zone_grp (
           SystemList = {sysA = 0, sysB = 1 }
           ContainerInfo = { Name = local-zone, Type = Zone, Enabled = 1 }
           Administrators = { z_zoneres_sysA, z_zoneres_sysB }
            )

           Mount mnt_res (
                    BlockDevice = "/dev/vx/dsk/data_dg/data_vol"
                    MountPoint = "/mydata"
                    FSType = vxfs
                    FsckOpt = "-y"
                    ContainerOpts = { RunInContainer = 1, PassCInfo = 0 }
                     )

           DiskGroup dg_res (
                    DiskGroup = data_dg
            )

           Volume vol_res (
                    Volume = data_vol
                    DiskGroup = data_dg
            )

           Zone zone_res (
            )

           zone_res requires vol_res
           vol_res requires dg_res
           mnt_res requires zone_res
Related information