NotesIt is not trivial to resize this configuration, it is recommended to use Role STORE - DRBD File System (Redundant with LVM). Create DRBD Partitions on disk (Both Nodes)The commands below assume that /dev/sdb will be used for the DRBD partition. | Translations Ignore |
|---|
| Code Block |
|---|
device=/dev/sdb
dd if=/dev/zero of=${device} obs=512 count=100
dd if=/dev/zero of=${device} obs=512 count=100 seek=$(( $(blockdev --getsz ${device}) -100 ))
parted ${device} "mklabel gpt"
parted ${device} "mkpart primary 0% 100%" |
|
Verify that the partition is created: | Translations Ignore |
|---|
| Code Block |
|---|
fdisk -l /dev/sdb
-->
WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.
Disk /dev/sdb: 274.9 GB, 274877906944 bytes, 536870912 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: gpt
Disk identifier: E7FF3D92-84BB-44E1-B0B0-26150DB80639
# Start End Size Type Name
1 2048 536868863 256G Microsoft basic primary |
|
Install DRBD Repos (Both Nodes)| Translations Ignore |
|---|
| Code Block |
|---|
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm |
|
Install DRBD Modules (Both Nodes)drbd90drbd90
| Translations Ignore |
|---|
| Code Block |
|---|
firewall-cmd --zone=public --add-port=7788-7799/tcp --permanent
firewall-cmd --reload |
|
Configure DRBD (Both Nodes) NOTE: The following commands requires the hostname of both machines and the IP Address. These are obtained as follows: | Translations Ignore |
|---|
| Code Block |
|---|
ip addr
hostname |
|
Create a DRBD config file for jtelshared on /dev/sdb | Translations Ignore |
|---|
| Code Block |
|---|
| title | /etc/drbd.d/jtelshared.res |
|---|
| cat <<EOFF > /etc/drbd.d/jtelshared.res
resource jtelshared {
protocol C;
meta-disk internal;
device /dev/drbd1;
syncer {
verify-alg sha1;
}
net {
allow-two-primaries;
}
on acd-store1 {
disk /dev/sdb1;
address 10.4.8.71:7789;
}
on acd-store2 {
disk /dev/sdb1;
address 10.4.8.171:7789;
}
startup {
become-primary-on both;
}
}
EOFF |
|
Note: it has been observed, that the fully qualified host name is required in the configuration file. If the first step below fails, then try with the fully qualified host name. | Translations Ignore |
|---|
| Code Block |
|---|
drbdadm create-md jtelshared
drbdadm up jtelshared |
|
Make one node primary (First Node)| Translations Ignore |
|---|
| Code Block |
|---|
drbdadm primary jtelshared --force |
|
Tune the transfer (Second Node)| Translations Ignore |
|---|
| Code Block |
|---|
drbdadm disk-options --c-plan-ahead=0 --resync-rate=110M jtelshared |
|
Create filesystem ( |