DB2 Version 9.7 for Linux, UNIX, and Windows
Installing DB2 Servers > Additional Linux and UNIX requirements > Additional partitioned database environment pre-installation tasks (Linux and UNIX) >

Creating a DB2 home file system for a partitioned database environment

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.

Creating a DB2 home file system for a partitioned database system (AIX®)

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:

Creating the DB2 home file system

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.

  1. Enter the smit jfs command.

  2. Click on the Add a Journaled File System icon.

  3. Click on the Add a Standard Journaled File System icon.

  4. Select an existing volume group from the Volume Group Name list where you want this file system to be physically located.

  5. 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.

  6. Enter the mount point for this file system in the MOUNT POINT field. In this example, the mount point is /db2home.

  7. Set the Mount AUTOMATICALLY at system restart field to yes.

    The remaining fields can be left to the default settings.

  8. Click OK.

Exporting the DB2 home file system
  1. NFS export the /db2home file system so that it is available to all of the computers that will participate in your partitioned database system:

    1. Enter the smit nfs command.
    2. Click on the Network File System (NFS) icon.
    3. Click on the Add a Directory to Exports List icon.
    4. Enter the pathname and directory to export (for example, /db2home) in the PATHNAME of directory to export field.
    5. Enter the name of each workstation that will participate in your partitioned database system in the HOSTS allowed root access field. Use a comma (,) as the delimiter between each name. For example, ServerA, ServerB, ServerC. If you are using a high speed interconnect, it is recommended that you specify the high speed interconnect names for each workstation in this field as well. The remaining fields can be left to the default settings.
    6. Click OK.

  2. Log out.

Mounting the DB2 home file system from each participating computer

Log on to each participating computer (ServerB, ServerC, ServerD) and NFS mount the file system that you exported by performing the following steps:

  1. Enter the smit nfs command.

  2. Click on the Network File System (NFS) icon.

  3. Click on the Add a File System for Mounting icon.

  4. Enter the pathname of the mount point in the PATHNAME of the mount point (Path) field.

    The path name of the mount point is where you should create the DB2 home directory. For this example, use /db2home.

  5. Enter the pathname of the remote directory in the PATHNAME of the remote directory field.

    For our example, you should enter the same value that you entered in the PATHNAME of the mount point (Path) field.

  6. Enter the hostname of the machine where you exported the file system in the HOST where the remote directory resides 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.

  7. Set the MOUNT now, add entry to /etc/filesystems or both? field to both.

  8. Set the /etc/filesystems entry will mount the directory on system RESTART field to yes.

  9. Set the MODE for this NFS file system field to read-write.

  10. Set the Mount file system soft or hard field to soft.

    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.

  11. 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.

  12. Click OK.

  13. Log out.

Creating a DB2 home file system for a partitioned database system (HP-UX)

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:

Creating the DB2 home file system
Manually:
  1. Select a disk partition or logical volume and use a utility like newfs to create this file system. For more information, enter the man newfs command.
  2. 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.

Using SAM:
  1. Enter the sam command.
  2. Click on the Disks and File Systems icon.
  3. Click on the File Systems icon.
  4. Select Action --> Add Local File systems.
  5. You can choose either to use or not to use a Logical Volume Manager. It is recommended to use a Logical Volume Manager.

Exporting the DB2 home file system

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:

  1. Enter the sam command.
  2. Click on the Networking and Communications icon.
  3. Click on the Networked File Systems icon.
  4. Click on the Exported Local File Systems icon.
  5. Click the Action menu and select Add Exported File System
  6. Enter the pathname and directory to export (for example, /db2home) in the Local Directory Name field.
  7. Click the User Access button and add read-write access for the other computers in the instance in the window that appears.
  8. Click the Root User Access button and add access for the other computers in the instance in the window that appears.
  9. Click OK.
  10. Log out.

Mounting the DB2 home file system from each participating computer

After you have exported this file system, you must mount this file system on each of the participating computers.

On each participating computer:

  1. Enter the sam command.
  2. Click on the Networking and Communications icon.
  3. Click on the Networked File Systems icon.
  4. Click on the Mounted Remote File Systems icon.
  5. Click the Action menu and select Add Remote File System Using NFS
  6. Enter the mount point of the file system to mount (for example, /db2home) in the Local Directory Name field.
  7. Enter the name of the remote server (for example, ServerA) in the Remote Server Name field.
  8. Enter the pathname and directory of the remote directory (for example, /db2home) in the Remote Directory Name field.
  9. Set the Mount At System Boot option on.
  10. Click the NFS Mount Options button and set soft mount type and the Allow SetUID Execution option on.

    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.

  11. Click OK.
  12. Log out.
Creating a file system for a partitioned DB2 server (Linux)

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:

  1. On one machine, select a disk partition or create one using fdisk.
  2. Using a utility like mkfs, create a file system on this partition. The file system should be large enough to contain the necessary DB2 program files as well as enough space for your database needs.
  3. Locally mount the file system you have just created and add an entry to the /etc/fstab file so that this file system is mounted each time the system is rebooted. For example:
         /dev/hda1    /db2home    ext3   defaults   1 2
  4. To automatically export an NFS file system on Linux at boot time, add an entry to the /etc/exports file. Be sure to include all of the host names participating in the cluster as well as all of the names that a machine might be known as. Also, ensure that each machine in the cluster has root authority on the exported file system by using the "root" option.

    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
  5. On each of the remaining machines in the cluster, add an entry to the /etc/fstab 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 setuid programs can be run properly.
      fusion-en:/db2home /db2home nfs rw,timeo=7,
       hard,intr,bg,suid,lock
    where fusion-en represents the machine name.
  6. NFS mount the exported file system on each of the remaining machines in the cluster by entering the following command:
    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.

  7. Ensure that the following steps were successful:
    1. On a single machine in the cluster, you have created a file system to be used as the instance and home directory.
    2. If you have a configuration that uses more than one machine for a single database instance, you have exported this file system using NFS.
    3. You have mounted the exported file system on each of the remaining machines in the cluster.

Creating a file system for a partitioned DB2 server (Solaris Operating System)

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:

Creating the DB2 home file system
  1. 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.

  2. 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.

  3. 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   -
Exporting the DB2 home file system
  1. 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 appears as follows:

    rw=ServerB.torolab.ibm.com:ServerB-tokenring.torolab.ibm.com,\
    root=ServerB.torolab.ibm.com:ServerB-tokenring.torolab.ibm.com \
  2. 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
Mounting the DB2 home file system from each participating computer
  1. Create and NFS mount the exported file system on each of the participating computers in the partitioned database environment by entering 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 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:

  1. On a single computer in the partitioned database environment, you have created a file system to be used as the instance and home directory.
  2. You have exported this file system via NFS.
  3. You have mounted the exported file system on each participating computer.
[ Top of Page | Previous Page | Next Page | Contents ]