Specifying the device size

To indicate the size of the device, use ‘k’ or ‘K’ for kilobytes, ‘m’ or ‘M’ for megabytes, ‘g’ or ‘G’ for gigabytes, and ‘t’ or ‘T’ for terabytes. Sybase recommends that, to avoid confusion in the actual number of pages allocated, you always include the unit specifier in both the disk init and create database commands. Enclose the unit specifier in single or double quotes or in brackets.

Theoretically, you can create as many as 2,147,483,647 disk devices, each of which can be as large as 2,147,483,648 2K-blocks. The maximum installation size becomes a function of database size, hardware, and operating system limits.

The following guidelines apply to the syntax for disk init:

You cannot have a database smaller than the model database. A model database larger than the minimums listed above, determines the minimum database size.

Adaptive Server allocates and manages database space in allocation units, which are groups of 256 logical pages. The smallest database you can create (using create database) is 1MB; therefore, the size of the smallest usable database device is the larger of 1MB or 256 logical pages (for a 2K or 4K logical page size, this is 1MB for a 8K logical page size, this is 2MB, for a 16K logical page size, this is 4MB.

Keep this grouping of 256 pages in mind when you decide how large to make a device to avoid wasting space. For example, if your installation uses a 16k logical page size, specifying a device as size = '31M' leaves 3MB wasted at the end of the device, since an allocation unit is 4MB.

If you are initializing a raw device, determine the size of the device from your operating system, as described in the installation guide for your platform. Use the total size available, up to the maximum for your platform. After you have initialized the disk for use by Adaptive Server, you cannot use any space on that raw device for any other purpose.

disk init uses size to compute the value for the high virtual page number in sysdevices.high. The values for sysdevices.high and sysdevices.low are virtual page numbers in 2K-byte blocks, which is the Adaptive Server unit of physical disk management. This may not be the same as your installation's logical page size

NoteIf the physical device does not contain the number of blocks specified by the size parameter, disk init fails. If you use the optional vstart parameter, the physical device must contain the sum of the blocks specified by both the vstart and size parameters, or the command fails.