...
Info |
---|
Node is a term that is distinguished from host, but it is not strictly distinguished here, and is described as a host only when a distinction is needed. |
Volume
Data volume
Storage units You must prepare storage devices of the same size must be prepared on all cluster nodes. If configuring a volume of a different size, the minimum target node's volume size you configure volumes with different sizes, at a minimum, the size of the volume on the target node must be larger than the size of the volume on the source node's volume size., but configuring volumes with different sizes is not recommended.
In BSR, the size of a replication volume refers to the size of the partition in bytes. If the volumes on the source and target differ in size by even 1 byte, the replication connection on both sides will fail.
Note |
---|
Getting Partition Size gwmi -Query "SELECT * from Win32_DiskPartition" fdisk -l |
The volume must be formatted with an appropriate file system according to the operating system, and uses file systems such as NTFS/ReFS and ext/xfs provided by Windows and Linux. Depending on the partitioning method, the volume can be a logical drive or device of MBR, GPT, or extended partition, and can be configured to include all dynamic disks in RAID format such as span, stripe, and mirror. If the volume is already formatted and contains important data, you can use the existing volume as it is without needing to format the volume, obviously.
...
Info |
---|
Specifying the node id (node-id) of each node is mandatory. |
Code Block |
---|
resource r0 {
disk d;
meta-disk f;
on alice {
address 10.1.1.31:7789;
node-id 0;
}
on bob {
address 10.1.1.32:7789;
node-id 1;
}
} |
|
Configuration examples
Simple configuration
...
/etc/bsr.d/global_common.conf
Code Block |
---|
global {
}
common {
net {
protocol C;
}
} |
|
/etc/bsr.d/r0.res
Code Block |
---|
resource r0 {
on alice {
disk d;
address 10.1.1.31:7789;
meta-disk f;
node-id 0;
}
on bob {
disk d;
address 10.1.1.32:7789;
meta-disk f;
node-id 1;
}
} |
|
1:2 Mesh
Here is an example of a 1: 2 mirror configuration. Specifies to establish all connections between 3 nodes through the connection-mesh section.
Code Block |
---|
resource r0 {
device e minor 2;
disk e;
meta-disk f;
on store1 {
address 10.1.10.1:7100;
node-id 0;
}
on store2 {
address 10.1.10.2:7100;
node-id 1;
}
on store3 {
address 10.1.10.3:7100;
node-id 2;
}
connection-mesh {
hosts store1 store2 store3;
}
} |
|
1: 2 individual connection configuration
This is an example of a 1: 2 mirror configuration, and you can set properties according to the connection individually.
Code Block |
---|
resource r0 {
volume 0 {
device e minor 2;
disk e;
meta-disk f;
}
on store1 {
node-id 0;
}
on store2 {
node-id 1;
}
on store3 {
node-id 2;
}
connection {
host store1 address 10.10.0.245:7789;
host store2 address 10.10.0.252:7789;
}
connection {
host store2 address 10.10.0.252:7789;
host store3 address 10.10.0.247:7789;
}
connection {
host store1 address 10.10.0.251:7789;
host store3 address 10.10.0.247:7789;
}
} |
|
floating peer
You can configure based on IP address without specifying a host name.
Code Block |
---|
resource r0 {
floating 200.200.200.6:7788 {
device d minor 1;
disk d;
meta-disk n;
node-id 0;
}
floating 200.200.200.7:7788 {
device d minor 1;
disk d;
meta-disk n;
node-id 1;
}
} |
|
Code Block |
---|
resource r0 {
floating 10.10.0.251:7788 {
device e minor 2;
disk e;
meta-disk f;
node-id 0;
}
floating 10.10.0.252:7788 {
device e minor 2;
disk e;
meta-disk f;
node-id 1;
}
floating 10.10.0.253:7788 {
device e minor 2;
disk e;
meta-disk f;
node-id 2;
}
connection {
address 10.10.0.251:7788;
address 10.10.0.252:7788;
}
connection {
address 10.10.0.251:7788;
address 10.10.0.253:7788;
}
connection {
address 10.10.0.252:7788;
address 10.10.0.253:7788;
}
} |
|
2:1 configuration
In the source node store1, specify the target node as store3.
Code Block |
---|
resource r0 {
device e minor 2;
disk e;
meta-disk f;
on store1 {
node-id 0;
}
on store3 {
node-id 2;
}
connection {
host store1 address 10.10.0.245:7789;
host store3 address 10.10.0.247:7789;
}
} |
|
In the source node store2, the target node is specified as store3, and the above configured store1 and store2 are N: 1 configurations that specify store3 as the target.
Code Block |
---|
resource r1 {
device e minor 2;
disk e;
meta-disk f;
on store2 {
node-id 1;
}
on store3 {
node-id 2;
}
connection {
host store2 address 10.10.0.246:7790;
host store3 address 10.10.0.247:7790;
}
} |
|
Target node store3 accepts both store1 and store2 configurations.
Code Block |
---|
resource r0 {
device e minor 2;
disk e;
meta-disk f;
on store1 {
node-id 0;
}
on store3 {
node-id 2;
}
connection {
host store1 address 10.10.0.245:7789;
host store3 address 10.10.0.247:7789;
}
}
resource r1 {
device g minor 4;
disk g;
meta-disk h;
on store2 {
node-id 1;
}
on store3 {
node-id 2;
}
connection {
host store2 address 10.10.0.246:7790;
host store3 address 10.10.0.247:7790;
}
} |
|
Precautions
The following describes precautions for each platform.
...