Symantec logo

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.

See the setext(1) manual page.

The following example shows how to use setext to create a 100 MB database file for an Oracle database.

 To preallocate files using setext

  1. Go to the /database file system:

# cd /database

  1. Create the .dbfile file:

# touch .dbfile

  1. Reserve 100 MB for the .dbfile file using setext:

# setext -r 102400 -f noreserve -f chgsize .dbfile

  1. Create a symbolic link to .dbfile:

# ln -s .dbfile::cdev:vxfs: dbfile

  1. Change the owner of dbfile to oracle:

# chown oracle dbfile

  1. Change the group of dbfile to dba:

# chgrp dba dbfile