Prepare the directories required when creating instances.
Considerations when deploying resources
The disk configuration on the resource deployment destination is important, because it affects not only recovery following disk corruption, but normal operation as well. The points for determining the disk configuration are as follows:
If the backup data storage destination and the data storage destination are both lost, it will not be possible to recover the data, so deploy them to separate disks.
To shorten the recovery time following a single disk fault, deploy the system disk and data storage destination to separate disks.
The backup data storage destination requires at least double the capacity of the data storage destination, so deploy it to the disk with the most space available.
When large amounts of data are updated, the write-to load for the data storage destination, transaction log storage destination, and backup data storage destination (mirrored transaction log) will also be great. For this reason, deploy them to separate disks, out of consideration for performance.
Note
When using the volume manager provided by the operating system, be aware of which physical disk the file system has been created on, for example, by deploying the data storage destination and the backup data storage destination to separate disks.
Resource | Role |
---|---|
Database cluster | The area where the database is stored. It is a collection of databases managed by an instance. |
Tablespace | Stores table files and index files in a separate area from the database cluster. Specify a space other than that under the database cluster. |
Transaction log | Stores log information in preparation for a crash recovery or rollback. This is the same as the WAL (Write Ahead Log). |
Archive log | Stores log information for recovery |
Mirrored transaction log (mirrored WAL) | Enables a database cluster to be restored to the state immediately before an error even if both the database cluster and transaction log fail when performing backup/recovery operations using the pgx_dmpall command or WebAdmin. |
Corefile | FUJITSU Enterprise Postgres process corefile output when an error occurs with a FUJITSU Enterprise Postgres process. |
The following are examples of disk deployment:
Number of disks | Disk | Deployment |
---|---|---|
3 | System disk | FUJITSU Enterprise Postgres program |
Corefile | ||
Connected physical disk | Data storage destination, transaction log storage destination | |
Connected physical disk | Backup data storage destination | |
2 | System disk | FUJITSU Enterprise Postgres program |
Corefile | ||
Data storage destination, transaction log storage destination | ||
Connected physical disk | Backup data storage destination |
To generate an instance using WebAdmin, we recommend an optimum deployment that takes into account the status of all disks at the time of instance generation, and items 1 to 3 in the "Considerations when deploying resources" subheading above, based on the limitations below (note that a different deployment can also be specified).
The mount point does not include national characters
The instance administrator has the proper permissions to read and write on the mount point
Preparing directories
The directories to be prepared depend on the way that you create the instances.
The following shows the directories that need to be prepared:
Directory to be prepared | Using WebAdmin | Using the initdb command |
---|---|---|
Data storage destination | Y (*1) | Y |
Backup data storage destination | O (*1) (*4) | O |
Transaction log storage destination | O (*1) (*2) | O |
Corefile output destination | N (*3) | O |
Y: Required
O: Optional
N: Not required
*1: WebAdmin automatically creates a directory
*2: The default is to create in a directory in the data storage destination. When it is necessary to distribute the I/O load for the database data and the transaction log, consider putting the transaction log storage destination on a different disk from the data storage destination
*3: The corefile path is as follows:
/var/tmp/fsep_version/instanceAdminUser_instanceNamePortNumber/core
version: product version_WA_architecture
instanceAdminUser: operating system user name
PortNumber: port number specified when creating the instance
Example:
/var/tmp/fsep_140_WA_64/naomi_myinst27599/core
Note that resources placed in /var/tmp that have not been accessed for 30 days or more will be deleted by the default settings of the operating system. Consider excluding them from deletion targets or changing the output destination in the operating system settings.
To change the output destination, configure the core_directory and the core_contents parameters in postgresql.conf. Refer to "Parameters" in the Operation Guide for information on the settings for these parameters.
*4: This directory is required when instance backup is enabled.
Note
The directories must meet the following conditions:
The directory owner must be the OS user account that you want to be the instance administrator
The directory must have write permission
The directory must be empty
If you use WebAdmin, you cannot use directories mounted over the network.
Examples include NFS (Network File System) and CIFS (Common Internet File System).
Also, even if you are not using WebAdmin, do not use these directories unless you are creating tablespaces on a storage device on your network.
The following example shows the OS superuser creating /database/inst1 as the directory for storing the database data and changing the owner of the directory to the OS user account "fsepuser".
# mkdir -p /database/inst1 # chown -R fsepuser:fsepuser /database/inst1 # chmod 700 /database/inst1