We moved some Oracle data files from OS file system to Veritas file system, to get the better performance, we need to convert them to Veritas Quick-IO file, then Oracle will treat them as raw devices.
$> ls -la *.dbf
-rw-rw-r-- 1 oracle dba 0 Sep 25 18:02 a.dbf
-rw-rw-r-- 1 oracle dba 0 Sep 25 18:02 b.dbf
Quick-IO files are just a special symbol link for us. So we can write a shell script to do this.
#!/bin/ksh
for fname in `ls *.dbf`
do
if [ -e $fname ]; then
if [ -L $fname ]; then
:
else
mv $fname .$fname
ln -s .$fname::cdev:vxfs: $fname
echo "convert $fname to qio finished!"
fi
fi
done
Then run the script to do the conversion.
$> ksh conv_qio.sh
convert a.dbf to qio finished!
convert b.dbf to qio finished!
Now check the result of the conversion.
$> ls -la *.dbf
lrwxrwxrwx 18 Sep 25 18:03 a.dbf -> .a.dbf::cdev:vxfs:
lrwxrwxrwx 18 Sep 25 18:03 b.dbf -> .b.dbf::cdev:vxfs:
$> ls -la .*.dbf
-rw-rw-r-- 0 Sep 25 18:02 .a.dbf
-rw-rw-r-- 0 Sep 25 18:02 .b.dbf
The script is useful when you want to rename some Veritas Quick-IO files.
