Testing Data Replication/Synchronize on DRBD
After configuration DRBD in the previous article, we must test first for ensure whether DRBD has been working properly or not. This is some testing to ensure DRBD has been worked
# TESTING ON NODE1
– Create folder tmp in /mnt folder
– Mount DRBD devices into tmp folder who has been created
– Create file/folder into tmp folder
– Please check whether file created-on-node1.txt has been there
– For testing/check on node2, umount DRBD devices and demoting into secondary
– Make sure DRBD has been demoted into Secondary
# TESTING ON NODE2
– Create folder tmp in /mnt folder
– Promoting DRBD into Primary
– Mount DRBD devices into tmp folder who has been created
– Please check whether file created-on-node1.txt has been there too
If the file has been there, it’s meant DRBD has been replicated
– Umount DRBD devices, demoting again into secondary and promoting node1 into primary
# PROMOTING NODE1 INTO PRIMARY
run the following command on node1
Good luck and hopefully useful
# TESTING ON NODE1
– Create folder tmp in /mnt folder
1.
mkdir
/mnt/tmp
1.
mount
/dev/drbd0 /mnt/tmp
1.
touch
/mnt/tmp/created-on-node1.txt
1.
ls
/mnt/tmp/
1.
umount
/dev/drbd0
2.
drbdadm secondary r0
1.
service drbd status
– Create folder tmp in /mnt folder
1.
mkdir
/mnt/tmp
1.
drbdadm primary r0
1.
mount
/dev/drbd0 /mnt/tmp
1.
ls
/mnt/tmp/
– Umount DRBD devices, demoting again into secondary and promoting node1 into primary
1.
umount
/dev/drbd0
2.
drbdadm secondary r0
3.
service drbd status
run the following command on node1
1.
service drbd status
2.
drbdadm primary r0
Nhận xét
Đăng nhận xét