You can use the following unit specifiers to indicate the size of the device: ‘k’ or ‘K’ indicates kilobytes, ‘m’ or ‘M’ indicates megabytes, ‘g’ or ‘G’ indicates gigabytes, and ‘t’ or ‘T’ indicates terabytes. Although it is optional, Sybase recommends that you always include the unit specifier in both the disk init and create database commands to avoid confusion in the actual number of pages allocated. You must 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. Because the number and size of possible devices are effectively unlimited, 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:
If you do not include a unit specifier
for the size argument of disk init or disk
reinit, size is measured, by default,
in number of virtual pages. Thus, if you enter size = 15000
,
Adaptive Server assumes 15,000 virtual pages. A virtual page is
2048 bytes.
You can increase, but not decrease, the size of an existing database device using the disk resize command.
If you are planning to use the new device for the creation of a new database, the minimum size depends on the logical page size used by the server, described in Table 7-1:
Logical page size |
Minimum database size |
---|---|
2K |
3 Megabytes |
4K |
6 Megabytes |
8K |
12 Megabytes |
16K |
24 Megabytes |
You cannot have a database smaller than the model database. If your model database is larger than the minimums listed above, then this is the minimum database size.
Adaptive Server allocates and manages database space in allocation units, which are groups of 256 logical pages. Because the smallest size create database permits you to specify is one megabye, the size of the smallest usable database device is the larger of one MB or 256 logical pages (for a 2k or 4k logical page size, this is one megabye, for a 8k logical page size, this is 2MB, for a 16k logical page size, this is 4MB.
It is helpful to 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
three megabytes wasted at the end of the device, since an allocation
unit would be 4 MB.
If you are initializing a raw device, determine the size of the device from your operating system, as described in the the installation documentation 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 numbers in sysdevices.high and sysdevices.low are virtual page numbers with blocks of 2k bytes, which is Adaptive Server's unit of physical disk management. This may not be the same as your installation's logical page size.
WARNING! If 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.
Copyright © 2005. Sybase Inc. All rights reserved. |