Accessing Regular VxFS Files Through Symbolic Links
Another way to use Quick I/O is to create a symbolic link for each file in your database and use the symbolic link to access the regular files as Quick I/O files.
The following commands create a 100 MB Quick I/O file named dbfile on the VxFS file system /database. The dd command preallocates the file space:
$ cd /database $ dd if=/dev/zero of=/database/.dbfile bs=128k count=800 $ ln -s .dbfile::cdev:vxfs: /database/dbfile
Any database or application can then access the file dbfile as a raw character device. See the VERITAS Editions product documentation for more information.
Using Absolute or Relative Path Names
It is usually better to use relative path names instead of absolute path names when creating symbolic links to access regular files as Quick I/O files. Using relative path names prevents copies of the symbolic link from referring to the original file. This is important if you are backing up or moving database files with a command that preserves the symbolic link. However, some applications, such as SAP, require absolute path names.
If you create a symbolic link using a relative path name, both the symbolic link and the file are under the same parent directory. If you want to relocate the file, both the file and the symbolic link must be moved.
It is also possible to use the absolute path name when creating a symbolic link. If the database file is relocated to another directory, you must change the symbolic link to use the new absolute path. You can put all the symbolic links in a directory separate from the data directories. For example, you can create a directory named /database and put in all the symbolic links, with the symbolic links pointing to absolute path names.
Preallocating Files Using the setext Command
You can use the VxFS setext command to preallocate file space, but the setext command requires superuser privileges. You may need to use the chown and chgrp commands to change the owner and group permissions on the file after it is created. The following example shows how to use setext to create a 100 MB database file for an Oracle database:
# cd /database # touch .dbfile # setext -r 102400 -f noreserve -f chgsize .dbfile # ln -s .dbfile::cdev:vxfs: dbfile # chown oracle dbfile # chgrp dba dbfile
See the setext(1M) manual page for more information.
|