Prepare the directories required when creating instances.
Considerations when deploying resources
Consider the following when deploying the data storage destination and backup data storage destination:
Deploy the data storage destination to a disk other than the system disk.
Deploy the backup data storage destination to a disk other than the data storage destination, to take into account disk failures.
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.
If the transaction log storage destination and the data storage destination are deployed to different locations, then ensure that it is deployed to a disk other than that of the backup data storage destination.
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. |
Transaction log | Stores log information in preparation for a crash recovery or rollback. |
Archive log | Stores log information for recovery |
Corefile | Symfoware Server process corefile output when an error occurs with a Symfoware Server process. |
The following are examples of disk deployment:
Number of disks | Disk | Deployment |
---|---|---|
3 | System disk | Symfoware Server program |
Corefile | ||
Connected physical disk | Data storage destination, transaction log storage destination | |
Connected physical disk | Backup data storage destination | |
2 | System disk | Symfoware Server program |
Corefile | ||
Data storage destination, transaction log storage destination | ||
Connected physical disk | Backup data storage destination |
If instances are created with WebAdmin, it automatically determines the disks connected to the system and sets the locations for directories.
Disks that are candidates for the deployment of directories must meet the following conditions:
They must be physical disks
The mount point must not include national characters
The instance administrator must have read and write permissions on the mount point
The backup data storage destination is deployed to the disk with the greatest available capacity, and the data storage destination is deployed to the next greatest.
Note
When using a file system created with LVM (Logical Volume Manager), ensure that the logical volumes are created on a different physical disk. Even if you create the backup data storage destination, data storage destination, and transaction log storage destination on different logical volumes, if they are on the same physical disk, then recovery may not be possible if there is a disk failure.
WebAdmin allocates different physical disks as the locations for file systems created with LVM. If you are using LVM, change the locations so that the file systems are deployed to separate physical disks.
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 | Y (*1) | 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 default is to output to /var/tmp/symfo_Version/instanceAdmin_instanceName/core - to change it, configure the core_directory and the core_contents parameters in postgresql.conf (refer to "Parameters" in the Operation Guide for details)
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
It is not possible to use a directory mounted by NFS (Network File System) when using WebAdmin.
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 "symfo".
# mkdir /database/inst1 # chown symfo:symfo /database/inst1 # chmod 700 /database/inst1