7. Register Location

Normally, the index files that form dictionaries, inverted files, record info, etc., are stored in the directory where you run zebraidx. If you wish to store these, possibly large, files somewhere else, you must add the register entry to the zebra.cfg file. Furthermore, the Zebra system allows its file structures to span multiple file systems, which is useful for managing very large databases.

The value of the register setting is a sequence of tokens. Each token takes the form: dir:size The dir specifies a directory in which index files will be stored and the size specifies the maximum size of all files in that directory. The Zebra indexer system fills each directory in the order specified and use the next specified directories as needed. The size is an integer followed by a qualifier code, b for bytes, k for kilobytes. M for megabytes, G for gigabytes. Specifying a negative value disables the checking (it still needs the unit, use -1b).

For instance, if you have allocated three disks for your register, and the first disk is mounted on /d1 and has 2GB of free space, the second, mounted on /d2 has 3.6 GB, and the third, on which you have more space than you bother to worry about, mounted on /d3 you could put this entry in your configuration file:

     register: /d1:2G /d2:3600M /d3:-1b
    

Note that Zebra does not verify that the amount of space specified is actually available on the directory (file system) specified - it is your responsibility to ensure that enough space is available, and that other applications do not attempt to use the free space. In a large production system, it is recommended that you allocate one or more file system exclusively to the Zebra register files.