Restoring sysdevices with disk reinit

If you have added any database devices since the last dump—that is, if you have issued a disk init command—you must add each new device to sysdevices with disk reinit. If you saved scripts from your original disk init commands, use them to determine the parameters for disk reinit (including the original value of vstart). If the size you provide is too small, or if you use a different vstart value, you may corrupt your database.

If you did not save your disk init scripts, look at your most recent hard copy of sysdevices to determine some of the correct parameters for disk reinit. You still need to know the value of vstart if you used a custom vstart in the original disk init command.

Table 13-1 describes the disk reinit parameters and their corresponding sysdevices data:

Table 13-1: Using sysdevices to determine disk reinit parameters

disk reinit parameter

sysdevices data

Notes

name

name

Use the same name, especially if you have any scripts that create or alter databases or add segments.

physname

phyname

Should be full path to device. Any relative paths are relative to the server's current working directory.

vdevno

vdevno

Select a value not already in use.

size

(high -low) +1

Extremely important to provide correct size information.

You can also obtain information on devices by reading the error log for name, physname, and vdevno, and using operating system commands to determine the size of the devices.

If you store your sybsystemprocs database on a separate physical device, include a disk reinit command for sybsystemprocs, if it is not listed in sysdevices.

After running disk reinit, compare your sysdevices table to the copy you made before running dataserver.

disk reinit can be run only from the master database and only by a system administrator. Permission cannot be transferred to other users. Its syntax is:

disk reinit
	name = "device_name",
	physname = "physical_name",
	[vdevno = virtual_device_number,]
	size = number_of_blocks
	[, vstart = virtual_address,
	cntrltype = controller_number]

For more information on disk reinit, see the discussion of disk init in Chapter 7, “Initializing Database Devices,” or the Reference Manual.