As part of setting up your partitioned database system
on Solaris Operating System, you need to create a DB2® home file system. Then you must NFS export
the home file system and mount it from each computer participating
in the partitioned database system.
Before you begin
It
is recommended that you create a home file system that is as large
as the content on the DB2 database
product DVD. You can use the following command to check the size,
shown in KB:
du -sk DVD mounting point
A DB2 instance will require at least
50 MB of space. If you do not have enough free space, you can mount
the DB2 database product DVD
from each participating computer as an alternative to copying the
contents to disk.
You must have root authority to create a file
system.
About this task
There
are a number of ways to create a local file system on a Solaris Operating
System. If you want to use a product such as Veritas to create the
file system, refer to the product's documentation.
Procedure
To create, NFS export, and NFS mount the DB2 home file system, perform the following steps:
- Create the DB2 home
file system.
- On the primary computer (ServerA), select a disk partition
or configure one using the format command.
When using the format command, ensure
that the disk partitions being used do not overlap. Overlapping partitions
can cause data corruption or file system failures. Ensure you have
correctly entered the command, as mistakes can cause serious problems.
- Using a utility like newfs or mkfs,
create a file system on this partition.
The file system
should be large enough to contain the necessary DB2 database files as well as other files not
related to the DB2 software. A minimum of 300 MB is recommended.
- Locally mount the file system you have just created
and add an entry to the /etc/vfstab file so that
this file system is mounted each time the system is rebooted.
For example:
/dev/dsk/c1t0d2s2 /dev/rdsk/c1t0d2s2 /db2home ufs 2 yes -
- Export the DB2 home
file system.
- To automatically export an NFS file system on Solaris
at boot time, add an entry to the /etc/dfs/dfstab file.
Be sure to include all of the host names of the participating
computers as well as all of the names that a given computer might
be known as. Also, ensure that each computer has root authority on
the exported file system by using the "
root
" option.
In the following example, an entry for a four computer partitioned
database system is added to the
/etc/dfs/dfstab file.
The participating computers,
ServerB, ServerC,
and
ServerD
,
are given permission to mount the file system
/db2home,
which will be used as the DB2 home
file system.
share -F nfs -o \
rw=ServerB.torolab.ibm.com,\
root=ServerB.torolab.ibm.com \
rw=ServerC.torolab.ibm.com, \
root=ServerC.torolab.ibm.com\
rw=ServerD.torolab.ibm.com,\
root=ServerD.torolab.ibm.com \
-d "homes" /db2home
If a computer is known by more
than one hostname, all aliases must be included in the
/etc/dfs/dfstab file.
For example, if ServerB was also known by the name ServerB-tokenring
, the entry in the
/etc/dfs/dfstab for ServerB
would appear as follows:
rw=ServerB.torolab.ibm.com:ServerB-tokenring.torolab.ibm.com,\
root=ServerB.torolab.ibm.com:ServerB-tokenring.torolab.ibm.com \
- On each of the participating computers, add an entry
to the /etc/vfstab file to NFS mount the file
system automatically at boot time.
As in the following
example, when you specify the mount point options, ensure that the
file system is mounted at boot time, is read-write, is mounted hard,
includes the
bg
(background) option, and that
suid programs
can be run properly:
ServerA:/db2home - /db2home nfs - yes rw,hard,intr,bg,suid
- Mount the DB2 home
file system from each participating computer.
On each
of the participating computers in the partitioned database environment,
enter the following commands:
mkdir /db2home
mount /db2home
If the
mount command
fails, use the
showmount command to check the status
of the NFS server. For example:
showmount -e ServerA
This
showmount command
should list the file systems that are exported from the computer named
ServerA
.
If this command fails, the NFS server may not have been started. To
start the server manually, run the following commands as root on the
NFS server:
/usr/lib/nfs/mountd
/usr/lib/nfs/nfsd -a 16
These commands are run automatically
at boot time if there are any entries in the
/etc/dfs/dfstab file.
After starting the NFS server, export the NFS file system again by
running the following command:
sh /etc/dfs/dfstab
Results
By
performing these steps, you have completed the following tasks:
- On a single computer in the partitioned database environment,
you have created a file system to be used as the instance and home
directory.
- You have exported this file system via NFS.
- You have mounted the exported file system on each participating
computer.