Adding VxFS file systems to a non-global zone

Adding VxFS file systems to a non-global zone

VxFS file systems that were previously created in the global zone can be made available in the non-global zone using a loopback file system mount. This functionality is especially useful when the sole purpose of making the file system available in the non-global zone is to share access of this file system with one or more non-global zones. For example, if a configuration file is available in a particular file system and this configuration file is required by the non-global zone, then the file system can be shared with the non-global zone using a loopback file system mount.
The following commands share access of file system /mnt1 as a loopback file system mount with the non-global zone myzone:

  global# zonecfg -z myzone
  zonecfg:myzone> add fs
  zonecfg:myzone:fs> set dir=/mnt1
  zonecfg:myzone:fs> set special=/mnt1
  zonecfg:myzone:fs> set type=lofs
  zonecfg:myzone:fs> end
  zonecfg:myzone> commit
The value of dir is a directory in the non-global zone. The value of special is a directory in the global zone to be mounted in the non-global zone.
Caution:
Sharing file systems with non-global zones through a loopback file system mount makes the file system available for simultaneous access from all the non-global zones. This method should be used only when you want shared access to the file system.
The loopback file system mount mode of sharing file systems in the non-global zones is supported in Veritas File System 4.1 and later.

Delegating VxFS file systems to a non-global zone

Exclusive access of a VxFS file system can be delegated to a non-global zone by direct mounting the file system in the non-global zone. Using direct mounts limits the visibility of and access to the file system to only the non-global zone that has direct mounted this file system.
Delegating file systems to non-global zone using direct mounts is supported in Veritas File System 4.1 Maintenance Pack 1 and later.
To direct mount a VxFS file system in a non-global zone, the directory to mount must be in the non-global zone and the mount must take place from the global zone. The following procedure mounts the directory dirmnt in the non-global zone myzone with a mount path of /zonedir/myzone/root/dirmnt.
Note:
VxFS entries in the global zone /etc/vfstab file for non-global zone direct mounts are not supported, as the non-global zone may not yet be booted at the time of /etc/vfstab execution.
Once a file system has been delegated to a non-global zone through a direct mount, the mount point will be visible in the global zone through the mount command, but not through the df command.
To direct mount a VxFS file system in a non-global zone
  1. Log in to the zone and make the mount point:
      global# zlogin myzone
      myzone# mkdir dirmnt
      myzone# exit
  2. Mount the VxFS file system:
      global# mount -F vxfs /dev/vx/dsk/dg/vol1 /zonedir/zone1/root/dirmnt
  3. Log in to the non-global zone and ensure that the file system is mounted:
      global# zlogin myzone
      myzone# df | grep dirmnt
      /dirmnt (/dirmnt):142911566 blocks 17863944 files

Comments

Popular posts from this blog

BMCs and the IPMI Protocol

Logical Domains Reference Manual

Understanding How ZFS Calculates Used Space