Enabling Concurrent I/O for DB2

Article:HOWTO59556  |  Created: 2011-10-12  |  Updated: 2011-10-12  |  Article URL http://www.symantec.com/docs/HOWTO59556
Article Type
How To

Product(s)

Environment

Subject


Enabling Concurrent I/O for DB2

Because you do not need to extend name spaces and present the files as devices, you can enable Concurrent I/O on regular files.

For DB2, you can enable an entire file system to use Concurrent I/O or you can enable specific SMS containers to use Concurrent I/O. If you enable a specific SMS container, the rest of the file system will use the regular buffer I/O.

Warning:

On AIX and Solaris:

For DB2, if you use the -o cio option with the mount command to mount your primary database file systems, the Concurrent I/O settings will not be preserved when using Database FlashSnap commands or the command.

Before enabling Concurrent I/O, review the following:

Prerequisites

  • To use the Concurrent I/O feature, the file system must be a VxFS file system.

  • Make sure the mount point on which you plan to mount the file system exists.

  • Make sure the DBA can access the mount point.

For DB2, /mount_point is the directory in which you can put data containers of the SMS tablespaces using the Concurrent I/O feature.

Note:

This applies to both creating a new tablespace to use Concurrent I/O or enabling an existing tablespace to use Concurrent I/O.

For example for DB2 to mount a file system named /datavol on a mount point named /db2data:

On AIX:

  # /usr/sbin/mount -V vxfs -o cio /dev/vx/dsk/db2dg/datavol \
/db2data

On Linux:

  # /usr/sbin/mount -t vxfs -o cio /dev/vx/dsk/db2dg/datavol \
/db2data

On Solaris:

  # /usr/sbin/mount -F vxfs -o cio /dev/vx/dsk/db2dg/datavol \
/db2data

To enable Concurrent I/O on a new SMS container using the namefs -o cio option

  • Using the mountcommand, mount the directory in which you want to put data containers of the SMS tablespaces using the Concurrent I/O feature.

    # /usr/sbin/mount -Vt namefs -o cio /path_name /new_mount_point

    where:

    • /path_name is the directory in which the files that will be using Concurrent I/O reside

    • /new_mount_point is the new target directory that will use the Concurrent I/O feature

The following is an example of mounting a directory (where the new SMS containers are located) to use Concurrent I/O.

To mount an SMS container named /container1 on a mount point named /mysms:

# /usr/sbin/mount -Vt namefs -o cio /datavol/mysms/container1 /mysms

To enable Concurrent I/O on an existing SMS container using the namefs -o cio option

  1. Stop the DB2 instance using the db2stop command.

  2. Make the directory that will have Concurrent I/O turned on available using the mv command.

      # mv /mydb/mysmsdir /mydb/mysmsdir2
  3. Remount /mydb/mysmsdir2 on /mydb/mysmsdir using the mount command with the -o cio option.

      # mount -Vt namefs -o cio /mydb/mysmsdir2 /mydb/mysmsdir
  4. Start the DB2 instance using the db2start command.

    		# db2stop
    	# mv /mydb/mysmsdir /mydb/mysmsdir2
    	# mount -Vt namefs -o cio /mydb/mysmsdir2 /mydb/mysmsdir
    	# db2start

This example shows how to mount a directory for an existing SMS container to use Concurrent I/O.

To enable Concurrent I/O on a DB2 tablespace when creating the tablespace

  1. Use the db2 -v "create regular tablespace..." command with the no file system caching option.

  2. Set all other parameters according to your system requirements.

To enable Concurrent I/O on an existing DB2 tablespace

  • Use the DB2 no file system caching option as follows:

      # db2 -v "alter tablespace tablespace_name no file system caching"

    where tablespace_name is the name of the tablespace for which you are enabling Concurrent I/O.

To verify that Concurrent I/O has been set for a particular DB2 tablespace

  1. Use the DB2 get snapshot option to check for Concurrent I/O.

      # db2 -v "get snapshot for tablespaces on dbname"

    where dbname is the database name.

  2. Find the tablespace you want to check and look for the File system caching attribute. If you see File system caching = No, then Concurrent I/O is enabled.

See Enabling and disabling Concurrent I/O


Legacy ID



uxrt-51sp1_v40601929_v63475671


Article URL http://www.symantec.com/docs/HOWTO59556


Terms of use for this information are found in Legal Notices