Previous  |  Next  >  
Product: File System Guides   
Manual: File System 4.1 Administrator's Guide   

Creating a Quick I/O File Using qiomkfile

The best way to make regular files accessible to the Quick I/O interface and preallocate space for them is to use the qiomkfile command. Unlike the VxFS setext command, which requires superuser privileges, any user who has read/write permissions can run qiomkfile to create the files. The qiomkfile command has five options:

-a

Creates a symbolic link with an absolute path name for a specified file. The default is to create a symbolic link with a relative path name.

-e

(For Oracle database files to allow tablespace resizing.) Extends the file size by the specified amount.

-h

(For Oracle database files.) Creates a file with additional space allocated for the Oracle header.

-r

(For Oracle database files to allow tablespace resizing.) Increases the file to the specified size.

-s

Preallocates space for a file.

You can specify file size in terms of bytes (the default), or in kilobytes, megabytes, gigabytes, sectors (512 bytes), or terabytes by adding a k, K, m, M, g, G, s, S, t, or T suffix. If the size of the file including the header is not a multiple of the file system block size, it is rounded to a multiple of the file system block size before preallocation.

The qiomkfile command creates two files: a regular file with preallocated, contiguous space; and a symbolic link pointing to the Quick I/O name extension. For example, to create a 100 MB file named dbfile in /database, enter:


 $ qiomkfile -s 100m /database/dbfile 

In this example, the first file created is a regular file named /database/.dbfile (which has the real space allocated).

The second file is a symbolic link named /database/dbfile. This is a relative link to /database/.dbfile via the Quick I/O interface, that is, to .dbfile::cdev:vxfs:. This allows .dbfile to be accessed by any database or application as a raw character device. To check the results, enter:


 $ ls -al
-rw-r--r-- 1 oracle dba 104857600 Oct 22 15:03 .dbfile
lrwxrwxrwx 1 oracle dba 19 Oct 22 15:03 dbfile -> \
.dbfile::cdev:vxfs:

or:


 $ ls -lL
crw-r----- 1 oracle dba 43,0 Oct 22 15:04 dbfile
-rw-r--r-- 1 oracle dba 10485760 Oct 22 15:04 .dbfile

If you specify the -a option to qiomkfile, an absolute path name (see Using Absolute or Relative Path Names) is used so /database/dbfile points to /database/.dbfile::cdev:vxfs:. To check the results, enter:


 $ ls -al
-rw-r--r-- 1 oracle dba 104857600 Oct 22 15:05 .dbfile
lrwxrwxrwx 1 oracle dba 31 Oct 22 15:05 dbfile ->
/database/.dbfile::cdev:vxfs:

See the qiomkfile(1) manual page for more information.

 ^ Return to Top Previous  |  Next  >  
Product: File System Guides  
Manual: File System 4.1 Administrator's Guide  
VERITAS Software Corporation
www.veritas.com