Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
Hi, I am using DRBD version 8.4 on CentOS6 and having some issues in understanding the replication mechanism. Configuration Details: --------------------------------- [root at centos6 ~]# drbdadm --version DRBDADM_API_VERSION=1 DRBD_KERNEL_VERSION_CODE=0x080407 DRBDADM_VERSION_CODE=0x080905 DRBDADM_VERSION=8.9.5 [root at centos6 ~]# rpm -qa | grep drbd drbd84-utils-8.9.5-1.el6.elrepo.x86_64 kmod-drbd84-8.4.7-1_1.el6.elrepo.x86_64 DRBD Configuration on both Primary and Secondary nodes: ----------------------------------------------------------------------------------------- resource r0 { on centos6 { device /dev/drbd1; disk /dev/sdb; address 10.168.150.2:7789; meta-disk internal; } on vm-centos6-dev1 { device /dev/drbd1; disk /dev/vdb; address 10.168.3.28:7789; meta-disk internal; } } Setup on Primary: --------------------------- 1) Created a primary node (VM) [10.168.150.2 (centos6)] with secondary hard disk /dev/sdb. This disk was filtered in LVM conf. 2a) pvcreate /dev/drbd1 2b) vgcreate VolGroup_DRBD /dev/drbd1 2c) lvcreate --size 20G --name LV_DRBD VolGroup_DRBD 3a) drbdadm create-md r0 3b) drbdadm up r0 3c) drbdadm primary --force r0 4) mkfs.ext3 /dev/drbd1 5) mkdir /db/pgdata 6) mount -t ext3 /dev/drbd1 /db/pgdata 7) cp /root/conf1.xml /db/pgdata/conf1.xml Setup on Secondary: --------------------------------- 1) Created a secondary node (VM) [10.168.3.28 (vm-centos6-dev1)] with secondary hard disk /dev/vdb. This disk was filtered in LVM conf. 2a) pvcreate /dev/drbd1 2b) vgcreate VolGroup_DRBD /dev/drbd1 2c) lvcreate --size 20G --name LV_DRBD VolGroup_DRBD 3a) drbdadm create-md r0 3b) drbdadm up r0 4) mkfs.ext3 /dev/drbd1 5) mkdir /db/pgdata Tests and Result: ------------------------------------- 1) To see that file created in step #7 on primary was replicated in secondary I manually umount partition on primary and demoted the current primary to secondary: 1a) umount /db/pgdata 1a)drbdadm secondary r0 2) On secondary I manually mounted the partition (mount -t ext3 /dev/drbd1 /db/pgdata) and promoted it to primary (drbdadm primary --force r0) 3) Now I could see file created in step #7 is replicated on secondary as well. Problem: ---------------- 1) How to check that file created on primary was replicated in secondary without demoting primary and promoting secondary? 2a) How to replicate files on an already mounted filesystem? Example how to replicate /etc/mydir/myconf.xml or /usr/lib/mydir/mydata which are already mounted on / (root) partition. In my setup this cannot be made DRBD partition. 2b) I tried soft link route (ln -s /etc/mydir/myconf.xml /db/pgdata/myconf.xml) but changes made on primary /etc/mydir/myconf.xml were not replicated on secondary /etc/mydir/myconf.xml via the soft link? 2c) How this can be done? --Raman -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.linbit.com/pipermail/drbd-user/attachments/20160818/16f2cc14/attachment.htm>