Normally jBASE hash files can grow up to 2GB, which is the usual file limit, found on most Unix systems. However for cases where user files are greater than 2GB then jBASE large files should be used. The jBASE HASH4 file type support large files, by either using one or more system files or using raw unmounted disk partitions.
Space allocation can be done in two ways, either a use a number of regular system files or use an unmounted disk partition. Partitions are only applicable to Unix systems and should be created by the system administrator. The space allocated is used by all HASH4 files, which are flagged as "large".
Before selecting large files it may be beneficial to compare them with the functionality of Distributed Files.
CREATE LARGE FILE CONFIGURATION FILE.
The configuration file for large file support should be placed in the "config" subdirectory of the jBASE release directory and named "jediLargeFileConfig". All lines must be begin with either a comment indicator, "#", or the keywords "filemin" or "disk".
The "filemin" value is used by the CREATE-FILE command to determine when a HASH4 should be created as a "large" file or regular file. The "filemin" value specifies the modulo break point above which large files will be created. The "size" value specifies the maximum size in megabytes of the file for this volume. The range of the "size" value can be from 1 to 2048, or 2 gigabytes. A "size" larger that 2048 will produce unpredictable results when the disk partitions are created with the JLFILE command.
INITIALIZE LARGE FILE AREA.
Before large files can be created the large file area must be made accessible to all users who are expected to access these files. The large file area should then be initialized with the "jlfile" command. This command should be executed as the root user.
Basically, you would use the -i option to initialize the large file partitions, -d option to display some status information about the large file partitions, and the -p option to display one or more pages of large file partitions for debugging purposes.
When you initialize the large file partitions, if you used regular files instead of disk partitions, as will always be the case for Windows/NT systems, then the -H option is advisable. This will cause the disk space specified with the "size=nn" operand to be written to disk as null values and will ensure this disk space actually exists, is permanently allocated, and can provide performance gains.
If a number of files become "black-holed", this means the file "stub" has been deleted from the file system but the space remains on the disk. This can occur, for example, if the "rm" command is used to remove a file instead of "delete-file", or on Windows/NT if deleted through, for example, the Windows explorer. These errors can be detected using the "-b" option to jlfile. The lost space can be corrected with the "-c" option. When using the -b and -c options, the -o option can also be specified to override the "are you sure to delete this file" message, and should only be used with extreme caution.
As root user
CONFIGURE CREATE-FILE TO USE LARGE FILES.
By default jBASE will continue to create HASH4 files as regular files, in order to invoke large file support you need to configure the CREATE-FILE command to use the allocated large file area instead of regular files.
In the configuration file the "filemin" value should be set to the break point modulo above which files will be created as large files and use the allocated large file area. This value can be overridden in two ways, either by specify LARGEFILE=NO on the create file command line or by setting the JEDI_LARGEFILE environment variable to a different break point modulo.
DELETE-FILE -r $HOME
DELETE-FILE MYFILE* (R
LARGE FILE BACKUP AND DELETION
When a large file is created, a very small "stub" file is also created. This is the "stub" into the large file partitions. This allows for backwards compatibility with existing applications.
You will need to use jbackup or account-save to save the database. Do not use the operating system commands such as cpio or tar, as these will only backup the "stub" file and not backup the large file partitions.
To delete an entire account, you would use a combination of both "delete-file -r $HOME" to delete all the jBASE files (and thus all the space in the large disk partition) followed by "rm -rf $HOME/*" to delete all the Unix files. On NT you would clean up using Windows Explorer.
Movement or deletion errors can be detected using the -b option to the jlfile command, and can be corrected with the -bc options to the jlfile command. However errors should not happen if you use normal jBASE utilities instead of operating system commands.
CHOOSING LARGE FILES
In general, the regular file system should be used. However, there may be reasons for choosing large file partitions.
The general advantages of using large files are:
The general disadvantages of using large files are: