Adding a direct mount to a zone's configuration

Last published : Jun 10, 2026
A non-global zone can also be configured to have a VxFS file system direct mount automatically when the zone boots using zonecfg. The fsck command is run, before the file system is mounted. If the fsck command fails, the zone fails to boot.
To add a direct mount to a zone's configuration
  1. Check the status and halt the zone:
    global# zoneadm list -cv
    ID NAME      STATUS     PATH                BRAND    IP
    0 global     running    /                   solaris  shared
    1 myzone     running    /zone/myzone        solaris  shared
    global# zoneadm -z myzone halt
    1. Add devices to the zone's configuration:
    global# zonecfg -z myzone
    zonecfg:myzone> add device
    zonecfg:myzone:device> set match=/dev/vxportal
    zonecfg:myzone:device> end
    zonecfg:myzone> add device
    zonecfg:myzone:device> set match=/dev/fdd
    zonecfg:myzone:device> end
    zonecfg:myzone> add fs
    zonecfg:myzone:fs> set dir=/dirmnt
    zonecfg:myzone:fs> set special=/dev/vx/dsk/dg_name/vol_name
    zonecfg:myzone:fs> set raw=/dev/vx/rdsk/dg_name/vol_name
    zonecfg:myzone:fs> set type=vxfs
    zonecfg:myzone:fs> end
    zonecfg:myzone> add fs
    zonecfg:myzone:fs> set dir=/etc/vx/licenses/lic
    zonecfg:myzone:fs> set special=/etc/vx/licenses/lic
    zonecfg:myzone:fs> set type=lofs
    zonecfg:myzone:fs> end
    zonecfg:myzone> verify
    zonecfg:myzone> commit
    zonecfg:myzone> exit
  2. On Solaris 11, you must set fs-allowed=vxfs,odm to the zone's configuration:
    global# zonecfg -z myzone
    zonecfg:myzone> set fs-allowed=vxfs,odm
    zonecfg:myzone> commit
    zonecfg:myzone> exit
    If you want to use ufs, nfs and zfs inside the zone, set fs-allowed=vxfs,odm,nfs,ufs,zfs.
    1. Boot the zone:
    global# zoneadm -z myzone boot
  3. Ensure that the file system is mounted:
myzone# df | grep dirmnt
/dirmnt (/dirmnt):142911566 blocks 17863944 files