Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Server \ DRBD switchover     - To_teach you three strategies to prevent the LAN IP address theft (Linux)

- Recent Consolidation Using Linux security module (Linux)

- Nginx caching using the official guide (Server)

- MNIST presentation and database conversion (Database)

- Linux System Getting Started Learning: In RedHat Linux driver compiled Ixgbe (Linux)

- Installation and configuration of phpMyAdmin under CentOS (Database)

- 10046 trace only open for a particular SQL statement (Database)

- Linux Getting Started Tutorial: How to set up a static MAC address on VMware ESXi virtual machine (Mobile)

- Adding SSH to Github (Linux)

- MySQL appears data too long for column 'name' at row 1 to solve (Database)

- CentOS install Java 1.8 (Linux)

- MySQL IO SSD attempt at optimization (Database)

- How do I upgrade to Ubuntu 15.04 (Beta) (Linux)

- Java Collections Framework interfaces map (Programming)

- Memcached distributed caching (Server)

- MySQL completely uninstall and install Configuring Character Sets under Linux (Database)

- Linux system security knowledge (Linux)

- CentOS 6.5 installation and deployment SVN 1.8.10 (Linux)

- CRF ++ Linux use (Linux)

- Five Linux user space debugging tool (Linux)

 
         
  DRBD switchover
     
  Add Date : 2018-11-21      
         
         
         
  DRBD switchover

In system maintenance, or when in a high availability cluster, when the active node fails, when you need to swap the roles of master and slave node, standby switch node has two forms, namely, to stop switching and normal switching service DRBD

(1) Stop DRBD service switch

Close the active node service, then mount the DRBD partition automatically uninstall the primary node, as follows,

/etc/init.d/drbd stop

cat / proc / drbd

You can see from the output, the current state of the master node becomes "Unknown" then performs handover command on the standby node

drbdadm primary all

Or the following error message appears

2: State change failed: (- 7) Refusing to be Primary while peer is not outdated Command 'drbdsetup 2 primary' terminated with exit code 11

Therefore, you must execute the following command at the standby node

drbdsetup / dev / drbd0 primary -o

or

drbdadm - --overwrite-data-of-peer primary all

Now you can switch the normal,

cat / proc / drbd

GIT-hash: a798fa7e274428a357657fb52f0ecf40192c1985 build by phil @ Build64R6, 2014-11-24 14:51:37

0: cs: Connected ro: Primary / Unknown ds: UpToDate / Outdated C r -----

ns: 10482024 nr: 0 dw: 0 dr: 10482696 al: 0 bm: 640 lo: 0 pe: 0 ua: 0 ap: 0 ep: 1 wo: f oos: 0

As can be seen, the original standby node is already in "Primary" the state, and the original master node due to the DRBD service is not started, is still in the "Unknown" status after the original primary node to start the service, it will automatically become "Secondary" state, without performing a switch to a backup node command again on the original primary node

Finally, on the new master node DRBD device mounted to complete the switchover: mount / dev / drbd0 / mnt (custom directories)

(2) normal switch

First uninstall the disk partition on the primary node

umount / mnt (your mount point)

Then execute:

drbdadm secondary all

At this view DRBD states are as follows:

GIT-hash: a798fa7e274428a357657fb52f0ecf40192c1985 build by phil @ Build64R6, 2014-11-24 14:51:37

0: cs: Connected ro: Primary / Unknown ds: UpToDate / UpToDate C r -----

ns: 10482024 nr: 0 dw: 0 dr: 10482696 al: 0 bm: 640 lo: 0 pe: 0 ua: 0 ap: 0 ep: 1 wo: f oos: 0

You can see, both nodes are in "Secondary" state, then the next step is to specify a primary node, you need to perform on the server becomes the master node following command

drbdadm primary all

Finally mount the DRBD disk in the new master node points to go

mount / dev / drbd0 / mnt
     
         
         
         
  More:      
 
- OpenSUSE 13.1 OpenSUSE 12.3 and how to install Cinnamon 2.2 Desktop (Linux)
- Bash How to read a file line by line (Programming)
- Linux command line to put on your coat GUI (Linux)
- Switching Virtual Machine + Ubuntu graphical interface and terminal interface (Linux)
- Graphical development environment to build Android under Ubuntu 11.04 (Linux)
- Using C ++ Container Templates in Shared Memory (Programming)
- Ubuntu font settings: Using Windows Font (Linux)
- Kernel compile under Debian (Linux)
- Using Python and OpenCV detecting image barcode (Programming)
- Mumble installation source VoIP application on Ubuntu (Linux)
- Port Telnet command to detect the remote host is turned on (Linux)
- Merge Sort (Programming)
- Python object-oriented programming (Programming)
- How to add and delete bookmarks in Ubuntu (Linux)
- Linux Network Security Tips Share (Linux)
- How to use the on-screen keyboard in Linux (Linux)
- Security Configuration SQL Server 2000 database tutorial (Linux)
- Configuring xdebug debugging environment in Ubuntu 14.04 under the PhpStorm (Linux)
- How to Check notebook CPU temperature in Ubuntu (Linux)
- To read the Linux ext3 / ext4 format partitions under Windows system software (Linux)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.