To install DB2® Enterprise Server Edition and create a partitioned database environment, you must have a file system that is available to all of the machines. This file system will be used as the instance home directory. It can also be used as a temporary location for the contents of the DB2 database product CD.
This task is part of setting up your partitioned database system. This task describes how to:
It is recommended that you create a home file system that is as large as the content on the DB2 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 product DVD from each participating computer as an alternative to copying the contents to disk.
You must have:
To create, NFS export, and NFS mount the DB2 home file system, perform the following steps:
Log on to the primary computer (ServerA) in your partitioned database system as a user with root authority and create a home file system for your partitioned database system called /db2home.
Enter the smit jfs command.
Click on the Add a Journaled File System icon.
Click on the Add a Standard Journaled File System icon.
Select an existing volume group from the Volume Group Name list where you want this file system to be physically located.
Set the SIZE of file system (SIZE of file system (in 512-byte blocks) (Num.) field). This sizing is enumerated in 512-byte blocks, so if you only need to create a file system for the instance home directory, you can use 180 000, which is about 90 MB. If you need to copy the product DVD image over to run the installation, you can create it with a value of 2 000 000, which is about 1 GB.
Enter the mount point for this file system in the MOUNT POINT field. In this example, the mount point is /db2home.
The remaining fields can be left to the default settings.
Click OK.
NFS export the /db2home file system so that it is available to all of the computers that will participate in your partitioned database system:
Click OK.
Log out.
Log on to each participating computer (ServerB, ServerC, ServerD) and NFS mount the file system that you exported by performing the following steps:
Enter the smit nfs command.
Click on the Network File System (NFS) icon.
Click on the Add a File System for Mounting icon.
The path name of the mount point is where you should create the DB2 home directory. For this example, use /db2home.
For our example, you should enter the same value that you entered in the PATHNAME of the mount point (Path) field.
This value is the hostname of the machine where the file system that you are mounting was created.
To improve performance, you may want to NFS mount the file system that you created over a high speed interconnect. If you want to mount this file system using a high speed interconnect, you must enter its name in the HOST where remote directory resides field.
You should be aware that if the high speed interconnect ever becomes unavailable for some reason, every workstation that participates in your partitioned database system will lose access to the DB2 home directory.
Set the MOUNT now, add entry to /etc/filesystems or both? field to both.
Set the /etc/filesystems entry will mount the directory on system RESTART field to yes.
Set the MODE for this NFS file system field to read-write.
A soft mount means that the computer will not try for an infinite period of time to remotely mount the directory. A hard mount means that your machine will infinitely try to mount the directory. This can cause problems in the event of a system crash. It is recommended that you set this field to soft.
The remaining fields can be left to the default settings.
Ensure that this file system is mounted with the Allow execution of SUID and sgid programs in this file system? field set to Yes. This is the default setting.
Click OK.
Log out.
This task is part of setting up your partitioned database system. This task describes how to:
It is recommended that you create a home file system that is as large as the content on the DB2 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 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.
To create, NFS export, and NFS mount the DB2 home file system, perform the following steps:
Mount this file system locally and add an entry to the /etc/fstab file so that this file system is mounted each time the system is restarted.
You can choose either to use or not to use a Logical Volume Manager. It is recommended to use a Logical Volume Manager.
If you are installing DB2 ESE on a cluster of HP-UX systems, you can add an entry to the /etc/exports file to export this file system via NFS, or use SAM.
To export the file system using SAM:
Log out.
After you have exported this file system, you must mount this file system on each of the participating computers.
On each participating computer:
A soft mount means that the computer will not try for an infinite period of time to remotely mount the directory. A hard mount means that your machine will infinitely try to mount the directory. This can cause problems in the event of a system crash. It is recommended that you set this field to soft.
The remaining fields can be left to the default settings.
This task is part of setting up your partitioned database system. This task describes how to:
You must have a file system that is available to all machines that will participate in your partitioned database system. This file system will be used as the instance home directory.
For configurations that use more than one machine for a single database instance, NFS (Network File System) is used to share this file system. Typically, one machine in a cluster is used to export the file system using NFS, and the remaining machines in the cluster mount the NFS file system from this machine. The machine that exports the file system has the file system mounted locally.
For more command information, see your Linux® distribution documentation.
To create this file system:
/dev/hda1 /db2home ext3 defaults 1 2
The /etc/exports file is an ASCII file which contains the following type of information:
/db2home machine1_name(rw) machine2_name(rw)
To export the NFS directory, run
/usr/sbin/exports -r
fusion-en:/db2home /db2home nfs rw,timeo=7, hard,intr,bg,suid,lockwhere fusion-en represents the machine name.
mount /db2home
If the mount command fails, use the showmount command to check the status of the NFS server. For example:
showmount -e fusion-en
where fusion-en represents the machine name.
This showmount command should list the file systems which are exported from the machine named fusion-en. If this command fails, the NFS server may not have been started. Run the following command as root on the NFS server to start the server manually:
/etc/rc.d/init.d/nfs restart
Assuming the present run level is 3, you can have this command run automatically at boot time by renaming K20nfs to S20nfs under the following directory: /etc/rc.d/rc3.d.
This task is part of setting up your partitioned database system. This task describes how to:
It is recommended that you create a home file system that is as large as the content on the DB2 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 product DVD from each participating computer as an alternative to copying the contents to disk.
There are a number of ways to create a local file system on Solaris Operating Systems. If you want to use a product, such as Veritas, to create the file system, refer to the product's documentation.
You must have root authority to create a file system.
To create, NFS export, and NFS mount the DB2 home file system, perform the following steps:
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 files as well as other non-DB2 files. A minimum of 300 MB is recommended.
/dev/dsk/c1t0d2s2 /dev/rdsk/c1t0d2s2 /db2home ufs 2 yes -
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 appears as follows:
rw=ServerB.torolab.ibm.com:ServerB-tokenring.torolab.ibm.com,\ root=ServerB.torolab.ibm.com:ServerB-tokenring.torolab.ibm.com \
ServerA:/db2home - /db2home nfs - yes rw,hard,intr,bg,suid
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 which 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
Ensure that you have completed the following steps: