To create a new database device, preallocate space on the file system by using the qiomkfile command, then use the Sybase buildmaster command for a master device, or the Transact SQL disk init command for a database device. qiomkfile creates two files: a regular file using preallocated, contiguous space, and a symbolic link pointing to the ::cdev:vxfs:
name extension.
The following example creates a 100 megabyte master device masterdev on the file system /sybmaster
.
To create a new Sybase database device
Go to the /sybmaster
file system:
# cd /sybmaster
Create the masterdev
file and preallocate 100 MB for the file:
# qiomkfile -s 100m masterdev
You can use this master device while running the sybsetup program or sybinit script.
Change the ownership of the masterdev
file to sybase
:
# chown sybase masterdev
To create the master device directly, enter:
# buildmaster -d masterdev -s 51200
Add a new 500 megabyte database device datadev
to the file system /sybdata
on your dataserver:
# cd /sybdata # qiomkfile -s 500m datadev ...
Change the ownership of the datadev
file to sybase
:
# chown sybase datadev
# isql -U sa -P sa_password -S dataserver_name
Set up the datadev database device:
1> disk init 2> name = "logical_name", 3> physname = "/sybdata/datadev", 4> vdevno = "device_number", 5> size = 256000 6> go