Creating a new replicated file system
You can create a new replicated file system that adheres to the best practice.
Before you begin
- To perform this task, you must be a Db2® cluster services administrator.
About this task
- A total of three redundancy groups.
- Equal size in redundancy group 1 and 2.


Procedure
Use one of the following
methods to create a new replicated
file system:
- Method 1
- Using figure 1 or 2 as illustration, run the following commands
to create the three replicated file systems:
db2cluster -cfs -create -filesystem db2sd_1 -disk /dev/hdisk1 -rdncy_grp_id 1 -disk /dev/hdisk4 -rdncy_grp_id 2 -fstiebreaker /dev/hdisk7 -host TB -mount /db2sd_1 db2cluster -cfs -create -filesystem db2datafs -disk /dev/hdisk2 -rdncy_grp_id 1 -disk /dev/hdisk5 -rdncy_grp_id 2 -fstiebreaker /dev/hdisk8 -host TB -mount /db2datafs db2cluster -cfs -create -filesystem db2logfs -disk /dev/hdisk3 -rdncy_grp_id 1 -disk /dev/hdisk6 -rdncy_grp_id 2 -fstiebreaker /dev/hdisk9 -host TB -mount /db2logfs
Note: Host TB is used as the name for tiebreaker host for illustration purpose. It can be a member (M5) in figure 1.
- Using figure 1 or 2 as illustration, run the following commands
to create the three replicated file systems:
- Method
2
- Using File system db2datafs from
figure 1,
run the following commands to create a replicated file system:
At the end of this step, the file system is fully functional and mounted.db2cluster -cfs -create -filesystem db2datafs -disk /dev/hdisk2 -rdncy_grp_id 1 -mount /db2datafs
- When the storage for redundancy group 2 and tiebreaker host
are
ready, they can be added to the file system in a single or separate
command. This is an online operation.
At the end of this step, new data that is written to this file system is replicated properly. But existing data that was written to the file system before this step remains non-replicated. The replication of those data must be triggered manually. Replication of data can be I/O intensive and the duration depends on the size of data. Therefore, it is recommended to run them at off-peak usage hours.db2cluster -cfs -add -filesystem db2datafs -disk /dev/hdisk5 -rdncy_grp_id 2 -fstiebreaker /dev/hdisk8 -host TB
- Initiate® the replication of existing
data.
Depending on the data placement on each disk for each file system after the previous step, IBM Spectrum Scale might mark the file system as unbalanced and if a rebalance action is recommended. Db2 captures this warning from IBM Spectrum Scale and raises an alert that can be queried through the db2instance -list command. For more information, see Rebalancing a replicated file system.db2cluster -cfs -replicate -filesystem db2datafs
- Using File system db2datafs from
figure 1,
run the following commands to create a replicated file system: