install and config drbd on centos 8
install and config drbd on centos 8
1. Install
# prepare
yum -y install policycoreutils-python-utils
# epel + elrepo
yum -y install epel-release elrepo-release.noarch
# install
yum -y install kmod-drbd90.x86_64 drbd90-utils.x86_64
# set selinux
semanage permissive -a drbd_t
# firewall
firewall-cmd –add-port=7789/tcp –permanent
firewall-cmd –reload
2. Prepare Storage
parted -s -a opt /dev/sdb mklabel gpt mkpart primary 0% 100% set 1 lvm on
pvcreate /dev/sdb1
vgcreate vg_drbd /dev/sdb1
lvcreate -n data -l 100%FREE vg_drbd
3. Config DRBD
mv /etc/drbd.d/global_common.conf /etc/drbd.d/global_common.conf.bak
4. Add Resource
5. initialize resource
drbdadm create-md youtube
drbdadm up youtube
lsblk #check
drbdadm status youtube # show status
6. set primary + intial synchronization
drbdadm primary –force youtube
drbdadm status youtube # synchronizing… to UpToDate.
sleep 1m # zZzzZ
drbdadm status youtube
7. use the dev
# on node1
mkfs -t ext4 /dev/drbd0
mount /dev/drbd0 /mnt
touch /mnt/asdf
sudo umount /mnt
drbdadm secondary youtube
# on node2
drbdadm primary youtube
mount /dev/drbd0 /mnt
Y. whats next
HA Cluster
Z. summary
drbd9 docs https://www.linbit.com/drbd-user-guide/drbd-guide-9_0-en/
—-
Land on the Golden Gate von Chris Zabriskie unterliegt der Lizenz Creative-Commons-Lizenz “Namensnennung 4.0”. https://creativecommons.org/licenses/by/4.0/
Quelle: http://chriszabriskie.com/stuntisland/
Künstler: http://chriszabriskie.com/
centos 8