This procedure explains how to create multihost UFS file systems, including the administrative file system that is a requirement for each diskset.
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
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.
Create the HA administrative file system.
Run the newfs(1M) command.
This example creates the file system on the trans metadevice d11.
phys-hahost1# newfs /dev/md/hahost1/rdsk/d11 |
The process of creating the file system destroys any data on the disks.
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 |
Mount the HA administrative file system.
phys-hahost1# mount /dev/md/hahost1/dsk/d11 /hahost1 |
Create the multihost UFS file systems.
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 |
The process of creating the file system destroys any data on the disks.
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 |
Create the /etc/opt/SUNWcluster/conf/hanfs directory.
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 - |
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 |
(Optional) To make file systems NFS-sharable, refer to Chapter 11, Setting Up and Administering Sun Cluster HA for NFS."