Sun Cluster 2.2 Software Installation Guide

B.2.19 How to Create Multihost UFS File Systems

This procedure explains how to create multihost UFS file systems, including the administrative file system that is a requirement for each diskset.

  1. For each diskset, identify or create the metadevices to contain the file systems.

    It is recommended that you create a trans metadevice for the administrative file system consisting of these components:

    • Master device: mirror using two 2-Mbyte slices on Slice 4 on Drive 1 on the first two controllers

    • Logging device: mirror using two 2-Mbyte slices on Slice 6 on Drive 1 on the first two controllers

  2. Make sure you have ownership of the diskset.

    If you are creating multihost file systems as part of your initial setup, you should already have diskset ownership. If necessary, refer to the metaset(1M) man page for information on taking diskset ownership.

  3. Create the HA administrative file system.

    1. Run the newfs(1M) command.

      This example creates the file system on the trans metadevice d11.

      phys-hahost1# newfs /dev/md/hahost1/rdsk/d11
      

      Caution - Caution -

      The process of creating the file system destroys any data on the disks.


    2. Create the directory mount point for the HA administrative file system.

      This example uses the logical host name as the mount point.

      phys-hahost1# mkdir /hahost1
      
    3. Mount the HA administrative file system.

      phys-hahost1# mount /dev/md/hahost1/dsk/d11 /hahost1
      
  4. Create the multihost UFS file systems.

    1. Run the newfs(1M) command.

      This example creates file systems on trans metadevices d1, d2, d3, and d4.

      phys-hahost1# newfs /dev/md/hahost1/rdsk/d1
      phys-hahost1# newfs /dev/md/hahost1/rdsk/d2
      phys-hahost1# newfs /dev/md/hahost1/rdsk/d3
      phys-hahost1# newfs /dev/md/hahost1/rdsk/d4
      

      Caution - Caution -

      The process of creating the file system destroys any data on the disks.


    2. Create the directory mount points for the multihost UFS file systems.

      phys-hahost1# mkdir /hahost1/1
      phys-hahost1# mkdir /hahost1/2
      phys-hahost1# mkdir /hahost1/3
      phys-hahost1# mkdir /hahost1/4
      
  5. Create the /etc/opt/SUNWcluster/conf/hanfs directory.

  6. Edit the /etc/opt/SUNWcluster/conf/hanfs/vfstab.logicalhost file to update the administrative and multihost UFS file system information.

    Make sure that all cluster nodes' vfstab.logicalhost files contain the same information. Use the cconsole(1) facility to make simultaneous edits to vfstab.logicalhost files on all nodes in the cluster.

    Here's a sample vfstab.logicalhost file showing the administrative file system and four other UFS file systems:

    #device                 device                   mount       FS   fsck  mount mount
    #to mount               to fsck                  point       type pass  all   options#
    /dev/md/hahost1/dsk/d11 /dev/md/hahost1/rdsk/d11 /hahost1    ufs  1     no    -
    /dev/md/hahost1/dsk/d1  /dev/md/hahost1/rdsk/d1  /hahost1/1  ufs  1     no    -
    /dev/md/hahost1/dsk/d2  /dev/md/hahost1/rdsk/d2  /hahost1/2  ufs  1     no    -
    /dev/md/hahost1/dsk/d3  /dev/md/hahostt1/rdsk/d3 /hahost1/3  ufs  1     no    -
    /dev/md/hahost1/dsk/d4  /dev/md/hahost1/rdsk/d4  /hahost1/4  ufs  1     no    -
  7. Release ownership of the diskset.

    Unmount file systems first, if necessary.

    Because the node performing the work on the diskset takes implicit ownership of the diskset, it needs to release this ownership when done.

    phys-hahost1# metaset -s hahost1 -r
    
  8. (Optional) To make file systems NFS-sharable, refer to Chapter 11, Setting Up and Administering Sun Cluster HA for NFS."