Nonstop Database, HiRDB Version 9 Command Reference

[Contents][Index][Back][Next]

2.34 pdfmkfs (Initialize a HiRDB file system area)

Organization of this section
(1) Function
(2) Executor
(3) Format
(4) Options
(5) Command arguments
(6) Rules
(7) Notes
(8) Size of management area for a HiRDB file system area
(9) Examples

(1) Function

The pdfmkfs command initializes a specified hard disk partition (character special files) or a regular files area as a HiRDB file system area.

(2) Executor

HiRDB administrator

(3) Format

(a) Character special files
 
 pdfmkfs -n HiRDB-file-system-area-size [-l max-files-count]
        [-k usage-purpose] [-e max-extensions-count]
        [-s sector-length] [-i] [-a]
         character-special-files-area-name
 
(b) Regular files
 
 pdfmkfs -n HiRDB-file-system-area-size [-l max-files-count]
        [-k usage-purpose] [-e max-extensions-count]
        [-i] [-r] [-a]
         regular-files-area-name
 

(4) Options

(a) -n HiRDB-file-system-area-size ~<unsigned integer>

Specifies, in megabytes, the space to be allocated as the HiRDB file system area. This option is mandatory. The permitted value ranges are as follows:

File type HP-UX Solaris AIX Linux
Regular file 1-2,047 1-2,047 1-2,047 1-2,047
Character special file 1-2,047 1-2,047 1-2,047 1-2,047
Large file Regular file 1-1,048,575 1-1,048,575 1-65,411# 1-1,048,575
Character special file 1-1,048,575 1-1,048,575 1-1,048,575 1-1,048,575

#: This value range is applicable to a Journaled File System (JFS). For an Enhanced Journaled File System (JFS2), the value range is 1 to 1,048,575.

If you specify this option together with -k DB -a, -k SDB -a, -k SYS -a, or -k WORK -a, the HiRDB file system area will be extended automatically when the area is used up.

The management area used for management of a HiRDB file system area is also included in the value of the -n option. Therefore, the actual size allocated to the HiRDB file is (value of the -n option) - (size of management area). For details about determining the size of the management area, see (7) Notes. You can use the pdfstatfs command to check the actual size that is allocated to the HiRDB file.

(b) -l max-files-count ~<unsigned integer> ((1-4096))

Specifies the maximum number of HiRDB files that can be created in the allocated HiRDB file system area.

The fewer HiRDB files there are in the area, the better the performance will be.

If you omit the -a option, you must specify this option.

Once you execute the pdfmkfs command, you can no longer change this value. Therefore, carefully determine this value taking into account the number of HiRDB files to be used and future expansion plans. For the formula for determining the maximum number of files, see Determining the maximum number of files (pdfmkfs -l command) in the HiRDB Version 9 Installation and Design Guide.

This option cannot be specified together with -k DB -a, -k SDB -a, or -k SYS -a.

(c) -k usage-purpose ~<<SVR>>

Specifies the purpose for which the HiRDB file system area will be used:

DB
HiRDB file system area for RDAREAs

SDB
HiRDB file system area for shared RDAREAs. SDB can be specified for a HiRDB parallel server configuration when a character special file is used as the HiRDB file system area. For regular RDAREAs, use a HiRDB file system area whose purpose is DB.
When the purpose of initialization is SDB, execute the command at the server machine where the updatable back-end server is located. Do not execute the command from a referencing-possible back-end server.

SYS
HiRDB file system area for system log files, synchronization point dump files, status files, or audit trail files.
If you specify SYS, do not specify the -e option.

WORK
HiRDB file system area for list RDAREA or work table files.

UTL
HiRDB file system area for utilities.
You can create the following files in a HiRDB file system area for utilities:
  • Unload data files
  • LOB data unload files
  • Index information files (applicable to delayed batch creation of plug-in index)
  • Backup files
  • Differential backup files
  • Differential backup management files
  • Unload log files

SVR
HiRDB file system area that can be used for any purpose other than utilities
SVR can be specified if there is no problem with mixing HiRDB files for different usage purposes in a single HiRDB file system area, such as in a test system. Normally, however, each HiRDB file system area is dedicated to a particular type of usage.
(d) -e max-extensions-count ~<unsigned integer> ((0-60000)) <<0>>

Specifies a maximum number of extensions (maximum number of times file extension can be performed). When this option is specified and a shortage of space occurs in a HiRDB file, that file's capacity will be extended automatically.

The specified number of extensions applies cumulatively to all HiRDB files in the HiRDB file system area. For example, if a HiRDB file system area contains two HiRDB files that have been extended 5 times and 3 times, respectively, then the total number of extensions so far is 8.

If SYS is specified as the purpose, any value specified here is ignored and 0 is assumed. Ensure that the value specified here does not exceed the value obtained by the method described in Determining the specification value, because the memory size required by processes that use the HiRDB file system area will increase depending on the number of extensions. A memory shortage might occur if the specified value is greater than the value obtained by the method described in Determining the specification value. For example, the required memory size differs by about 1.8 megabytes between maximum value 6000 and minimum value 0. For the formula used to determine the memory requirement, see Calculation of required memory in the HiRDB Version 9 Installation and Design Guide.

The maximum number of permissible extensions for one HiRDB file is 23. If the specified value equals or exceeds maximum number of files (value of the -l option) [Figure] 23, the command ignores the specified value and assumes maximum number of files [Figure] 23 as the maximum number of extensions. If a file area can contain only one file (1 is specified in the -l option), the limitation to 23 extensions is not applied. When 1 is specified as the maximum number of extensions, file data will not be fragmented by extensions, and the file can be extended up to the size of the HiRDB file system area (value of the -n option). Note that a file cannot exceed the maximum size of a HiRDB file area.

This option cannot be specified together with -k DB -a, -k SDB -a, or -k SYS -a.

Criteria
  1. In the case of a HiRDB file system area for work table files, if the estimated size of a work table file exceeds the value listed below, make sure that the number of extensions is specified. For details about estimating the size of work table files, see the HiRDB Version 9 Installation and Design Guide.
    [Figure] For a HiRDB single server configuration
    128 kilobytes
    [Figure] For a HiRDB parallel server configuration
    512 kilobytes
  2. Even when the estimated size does not exceed the above value, or for a HiRDB file system area for other than work table files, we recommend that you specify the number of extensions.
  3. If you specify the -e option in order to use RDAREA automatic extension, make sure that a value is specified for the number of extensions.
  4. Operations such as deletion, re-initialization (for reduction of allocation size or with with reconstruction specified), and integration of RDAREAs result in deletion of allocated HiRDB files and reduction in size. As a result, the HiRDB file system area becomes fragmented. If you use these operations, you should specify the number of extensions. If the system cannot allocate contiguous free space when an RDAREA is added, extended, or re-initialized, multiple fragmented spaces are used to create the new HiRDB file. In this case, the number of extensions that is required is number of fragmented free spaces - 1.

Determining the specification value
Use one of the following formulas to determine the number of extensions:
-k option Number of extensions to be specified
DB#1 MIN(60,000, 23 [Figure] cumulative total number of final files for the RDAREA to be extended#2)
If you frequently perform deletion, re-initialization (for reduction of allocation size or with with reconstruction specified), or integration of RDAREAs, use the following value:
MIN(60,000, 23 [Figure] cumulative total number of RDAREA structure files)
SDB#1
SYS#1 0
WORK MIN(60,000, 23 [Figure] value of the -l option)
UTL
SVR MIN(60,000, 23 [Figure] cumulative number of files subject to extension)
Extension is applied to work table files and final files in the RDAREA subject to extension.#2

Note 1
Make sure that you specify an appropriate value taking into account future extensions, because once you have executed pdfmkfs, you can no longer increase the number of extensions. You can use the pdfchfs command to reduce the number of extensions.

Note 2
If the specified value is less than the value obtained from the above formula, the limit of the HiRDB file system area is reached before the maximum number of extensions is reached for the HiRDB files.

#1
Cannot be specified if the -a option is specified

#2
Note that the number of last files in an RDAREA subject to extension is not one per RDAREA. This is because when pdmod is used to expand an RDAREA, the RDAREA is extended at the end, so that the last HiRDB file specified in the expand rdarea statement becomes the last file. Both the last file before and the last file after the expansion are included in the number of last files in the RDAREA subject to extension.
(e) -s sector-length ~<unsigned integer> ((1024,2048,4096)) <<1024>>

If you are using a character special file as the HiRDB file system area with a device that handles a medium with a physical sector length of 2,048 and 4,096 bytes, such as DVD-RAM device, this option specifies the minimum I/O unit expressed as the sector length (the physical sector length of a medium corresponding to a character string special file). For details about the physical sector length of a medium, see the manual for the medium.

Rules
  1. If the physical sector length of a medium is greater than 4,096 bytes, that medium cannot use a HiRDB file system area for character special files.
  2. If the physical sector length of a medium is 1,024 bytes or less, make sure that a multiple of the sector length equals 1,024, and then specify 1024 as the physical sector length. If a multiple of the sector length is not equal to 1,024, you cannot use the character special files on that medium.
  3. If using regular files, do not specify the sector length of the HiRDB file system area.
  4. If you specify 2048 or 4096 as the sector length, you can specify either DB or UTL in the -k option. If the -k option is omitted, SVR is assumed. Therefore, when you specify a sector length, make sure that -k DB or -k UTL is specified.
  5. You can use a HiRDB file system area for which a sector length is specified for the following purposes:
    - HiRDB file system area for RDAREAs other than list RDAREAs
    - Output destination of the pdlogunld command (unload log file)
    - Backup files for pdcopy and pdrstr
    - Unload data files for pdrorg
    If you are using the HiRDB file system area for RDAREAs, specify a multiple of the sector length specified in the -s option as the page length in the pdinit or pdmod control statement for creating an RDAREA.
(f) -i

Specifies that the HiRDB file system area specified in the -n option is to be initialized from the beginning. If you specify the -a option to automatically extend the HiRDB file system area, whether the extended area is initialized depends on the file type and the specified -k option value. For details, see the description of the -a option.

When the -i option is omitted, the command creates only the management information for the HiRDB file system area (an area with a maximum size of about 3.5 megabytes is allocated). The HiRDB file system area will be extended up to the size specified with the -n option when it is actually used.

If the HDP facility is not used with a character special file, a shortage of disk capacity will not occur because an area of the size specified with the -n option is guaranteed.

Notes
  • If the size of the HiRDB file system area specified in the -n option is large, it takes time to initialize it.
  • If the -i option is omitted for a regular file, a shortage of capacity might occur on the disk (OS's file system) before as much data as specified by the -n option is written. If you do not use the HDP facility or you wish to ensure there will be no shortage of disk space, we recommend that you specify the -i option. If a shortage of disk space occurs, HiRDB is placed in one of the following statuses:
    [Figure] Area for which DB or SDB is specified in the -k option
    The RDAREA might result in error shutdown.
    [Figure] Area for which SYS is specified in the -k option
    If there is a swapping target, swapping occurs; if not, HiRDB (or the unit for a HiRDB parallel server configuration) terminates abnormally.
  • When you use the HDP facility to create a HiRDB file system area, do not specify the -i option. If the -i option is specified, the entire volume is placed in non-virtualized status because the size specified in the -n option is initialized to allocate the real disk.
(g) -r

Specifies that no confirmation message is to be displayed when a regular file is initialized. If this option is omitted and the specified regular file already exists, the command displays a confirmation message asking whether or not to initialize the file. If a letter other than g is entered in response to the confirmation message, the command will not initialize the file.

(h) -a

Specifies that the HiRDB file system area is to be extended automatically when a space shortage occurs due to execution of SQL statements that use automatic extension of RDAREAs and work tables. When this option is specified and the size of a HiRDB file system area reaches the value specified in the -n option, that file system area is extended automatically. You also specify this option in order to create a HiRDB file system area for the system log files to which the system log file automatic extension facility is applied. For details about the facilities for RDAREA automatic extension and system log file automatic extension, see the HiRDB Version 9 System Operation Guide.

The table below shows whether an automatically extended HiRDB file system area is initialized.

Table 2-3 Whether an automatically extended HiRDB file system area is initialized

No. File type -k option value pd_rdarea_expand_format operand value# Whether extended area is initialized
1 Regular file DB or SDB Y Y
2 N N
3 WORK -- N
4 SYS Y
5 Character special file DB or SDB -- N
6 WORK
7 SYS

Legend:
Y: Extended area is initialized
N: Extended area is not initialized
--: Not applicable

#
The pd_rdarea_expand_format operand in the system common definition specifies whether the extended area is to be initialized when RDAREA automatic extension occurs:
Y: Extended area is to be initialized
N: Extended area is not to be initialized
For details about the pd_rdarea_expand_format operand, see the manual HiRDB Version 9 System Definition.

Rules
  1. You can specify this option when you also specify -k DB, -k SDB, -k SYS, or -k WORK.
  2. If -k DB, -k SDB, or -k SYS is specified, only one HiRDB file can be created in a HiRDB file system area, which means that the -l and -e options cannot be specified.
  3. If -k DB, -k SDB, or -k WORK is specified, the extended area is not initialized, regardless of whether the -i option is specified. However, if -k SYS is specified and the type of file is a regular file, the extended area is initialized; if the type of file is a character special file, the extended area is not initialized.
  4. The table below shows the maximum sizes of HiRDB file system areas when the -a option is specified.

    Table 2-4 Maximum sizes of HiRDB file system areas

    -k option value Maximum size of HiRDB file system area (MB)
    DB 65,536
    SDB
    SYS 102,400
    WORK See the value for when large files are specified in -n HiRDB-file-system-area-size

(5) Command arguments

(a) character-special-files-area-name ~<path name> ((up to 165 characters))

Specifies a name for the character special files area to be initialized. This name is used as the name of the HiRDB file system area.

(b) regular-files-area-name ~<path name> ((up to 165 characters))

Specifies a name for the regular files area to be initialized. This name is used as the name of the HiRDB file system area.

You can specify a maximum of 30 characters for the name of a HiRDB file that is created in the HiRDB file system area. Note that because HiRDB-file-system-area-name/HiRDB-file-name cannot exceed 167 characters, the maximum length of a HiRDB file name is reduced accordingly if the HiRDB file system area name is greater than 136 characters.

For HiRDB files that are created automatically by HiRDB, make sure that the following maximum lengths for HiRDB file system area names are not exceeded:

HiRDB file created automatically by HiRDB Maximum length of HiRDB file system area name (in characters)
Work table file (specified with pdwork operand in system definition) 141
Audit trail file (specified with pd_aud_file_name operand in system definition) 150
Index information file for delayed batch creation of plug-in index (specified with pd_plugin_ixmk_dir operand in system definition) 136
Unload log file for system log for the automatic log unloading facility (specified with pd_log_auto_unload_path operand in system definition) 136

You can use symbolic links to specify path names.

(6) Rules

  1. The pdfmkfs command can be executed at any time, whether or not HiRDB is active.
  2. The pdfmkfs command must be executed separately for each server machine for which a HiRDB file system area is to be initialized.

(7) Notes

  1. Return code 0 for the pdfmkfs command indicates normal termination, and return code -1 indicates abnormal termination.
  2. If the value specified as the area size is greater than the size of the disk volume or partition during initialization, the partition physically following that partition may be damaged. Therefore, a size that is greater than the size of the disk volume or partition must not be specified.
  3. The following shows the relationships among a HiRDB file system area name, HiRDB file name, and physical file name:

    [Figure]

  4. It is recommended that the name specified for a character special files area or a regular files area be linked symbolically to the entity name by the ln OS command, not to the entity name itself. This simplifies operations in the following cases:
    • When the HiRDB file system area is restored onto another hard disk after a hard disk failure
    • When the RDAREA structure is modified
  5. The results of executing the pdfmkfs command can be checked by the pdfstatfs command.
  6. For details about the values specifiable in the -n, -l, and -e options, see the following manuals, depending on the usage purpose:
    • SYS usage purpose
      See Determining System File Size in the HiRDB Version 9 Installation and Design Guide.
    • DB usage purpose
      See Determining RDAREA Size in the HiRDB Version 9 Installation and Design Guide.
    • WORK usage purpose
      See Determining Work Table File Size in the HiRDB Version 9 Installation and Design Guide.
      See pdwork operand in the HiRDB Version 9 System Definition.
    • UTL usage purpose
      Chapter 8. Database Reorganization Utility (pdrorg)
      Chapter 18. Database Copy Utility (pdcopy)
    • SVR usage purpose
      See the appropriate manuals previously, depending on the usage purpose of the HiRDB file to be created in the HiRDB file system area.
  7. If the purpose of use is WORK, generates a utilization rate warning message on an initialized HiRDB file system area, based upon the specifications pd_watch_resource and pdwork_wrn_pnt that are provided in the system definitions.
  8. If you are using a regular file for the HiRDB file system area, specify an unlimited value or a value that is greater than the -n option value as the maximum value of system resources for the HiRDB administrator and root user. However, for the AIX version, note that the default for the maximum file size is 1 gigabyte. You can check the maximum value of system resources with each OS shell using the limit or ulimit command. If you change the maximum file size in AIX, you must also change the /etc/security/limits file. For details, see the documentation for the applicable OS and shell.
  9. When a HiRDB file system area created as a regular file is manipulated by methods such as OS commands, its allocation status on the disk may change. For example, if the cp command is used to copy the HiRDB file system area, the amount of disk space used might increase within the size specified in the -n option because the portion that has not been used by HiRDB is allocated on the disk. Additionally, if AIX's backup or restore command is used to back up or restore data on a HiRDB file system area created with the -i option specified, only initialization may be executed and the portion that has not been used by HiRDB might be released from the disk. For details, see the applicable OS documentation.
  10. For details about changing the owner and access privileges of a HiRDB file system area, see the HiRDB Version 9 Installation and Design Guide.

(8) Size of management area for a HiRDB file system area

A management area is allocated to the HiRDB file system area. The size of the management area to be allocated depends on the type of OS, the -n, -l, -e, and -s options, and the type of files to be used. The formulas for determining the size of a management area are presented below. Note that the sizes of the fixed and variable management sections may increase depending on the process because they are read into memory while the corresponding HiRDB file system area is used.

 
Management area (bytes)
= Fixed management section + variable management section + HiRDB file management section [Figure] a
  + 4,096 (applicable to AIX)
 

Description of variable symbols:
a: Value of the -l option
b: Value of the -e option (0 if the option is omitted)
c: Value of the -s option (1,024 for character special files, 512 for regular files if the option is omitted)
Note that if -k DB, -k SDB, or -k SYS is specified together with the -a option, the size of the management area to be allocated is fixed. The table below shows the management area size.

Table 2-5 Size of management area to be allocated (when -k DB, -k SDB, or -k SYS is specified)

File type OS Sector length (-s option value) Size of management area (KB)
Regular file AIX 512 9.5
Other than AIX 512 5.5
Character special file AIX 1024 11
2048 14
4096 20
Other than AIX 1024 7
2048 10
4096 16

(9) Examples

Initialize the following HiRDB file system areas:

Command execution
pdfmkfs -n 25 .......................1
        -l 10 .......................2
        -e 5 ........................3
        /svr01 ......................4
pdfmkfs -n 30 .......................5
        -l 15 .......................6
        /prdb/ios001 ................7

Explanation
  1. Size of HiRDB file system area: 25 MB
  2. Maximum number of files: 10
  3. Maximum number of secondary allocations: 5
  4. Name of character special files area: /svr01
  5. Size of HiRDB file system area: 30 MB
  6. Maximum number of files: 15
  7. Name of regular files area: /prdb/ios001