Home IT Linux Windows Database Network Programming Server Mobile  
  Home \ Server \ DRBD daily management     - How to defragment the hard disk in Linux (Linux)

- An example of troubleshooting of embedded Linux OpenWRT (Linux)

- Open MySQL slow query log (Database)

- MySQL partition summary (Database)

- SQLite database commonly used sentences and visualization tools on MAC MeasSQLlite use (Database)

- Android Studio Installation and Configuration Guide tutorial (Linux)

- Linux System Getting Started Learning: rename multiple files in Linux (Linux)

- Handle large data problems Bit-map method (Programming)

- Install Gnome Flashback Classic Desktop on Ubuntu 14.10 / Mint 7 (Linux)

- Asynchronous JavaScript loading (Programming)

- Linux file system structure Introduction (Linux)

- FileZilla install on Ubuntu 14.10 (Linux)

- The correct method to modify the maximum number of concurrent connections Tomcat 7 (Server)

- CentOS 7 version how to achieve the power to start the graphical interface (Linux)

- ActiveMQ5.11.1 and JDK version matching relation (Linux)

- Common Linux system performance monitoring command (Linux)

- Oracle multi-table query optimization (Database)

- Python programmers most often committed ten errors (Programming)

- Linux in order to make NMAP hide and seek with the firewall (Linux)

- Oracle Database Restore (Database)

  DRBD daily management
  Add Date : 2017-01-08      
  DRBD is implemented in software, shared-nothing storage replication between servers mirrored block device content solutions. DRBD is a kernel module and associated scripts constituted for building high availability clusters. For high-availability cluster environment, despite the DRBD disk as a cluster resource is taken over by the cluster service management components, but for commonly used commands to master DRBD is still very necessary

First, DRBD userspace management tools
    DRBD program suite of high-level management tools. Get it from the configuration file with all the /etc/drbd.conf
    Set parameters. drbdadm to drbdsetup and drbdeta two commands act as front-end application program executed drbdadm
    Actually drbdsetup and drbdeta two commands that are executed.
    drbdsetup allows users to run configuration has been loaded in the DRBD kernel module, which is the underlying
    The DRBD program management tool kit. When you use this command, all the configuration parameters are defined at the command line directly,
    Although the commands and flexible, but greatly reduces the ease of use commands, so many users rarely use debdsetup.
    drbdmeta allows users to create, dump, restore, and modify drbd original data structure. This command is also a user rarely used. 1
### Get help drbdadm
# Drbdadm


 {--stacked | -S}
 {--dry-Run | -d}
 {--verbose | -v}
 {--config-File | -c} val
 {--config-To-test | -t} val
 {--drbdsetup | -s} Val
 {--drbdmeta | -m} Val
 {--drbd-Proxy-ctl | -p} val
 {--sh-Varname | -n} val
 {--force | -f}
 {--peer | -P} Val
 {--version | -V}

 attach detach
 connect disconnect
 up down
 primary secondary
 invalidate invalidate-remote
 outdate resize
 syncer verify
 pause-sync resume-sync
 adjust wait-connect
 wait-con-int role
 cstate dstate
 dump dump-xml
 create-md show-gi
 get-gi dump-md
 wipe-md hidden-commands

### View the connection status
# Drbdadm cstate all

### View Resource Role
# Drbdadm role all
Primary / Secondary

### Viewing disk status
# Drbdadm dstate all
UpToDate / UpToDate

For more detailed description about the status value, value, etc. Role:

### Enable resource
# Drbdadm up

### Disabling Resources
# Drbdadm down

### Resource upgrade
# Drbdadm primary

### Resources Downgrade
# Drbdadm secondary

Second, the use of other tools DRBD
1, views drbd service
# Service drbd status
drbd driver loaded OK; device status:
version: 8.3.15 (api: 88 / proto: 86-97)
GIT-hash: 0ce4d235fc02b5c53c1c52c53433d11a694eab8c build by root@orasrv1.xlk.com, 2015-10-31 10:58:13
m: res cs ro ds p mounted fstype
0: redisk Connected Primary / Secondary UpToDate / UpToDate C / data ext31
2, the command drbd-overview
# / Usr / local / drbd / sbin / drbd-overview
  0: redisk Connected Primary / Secondary UpToDate / UpToDate C r ----- / data ext3 1004M 18M 936M 2% 1
3, / proc / drbd File Viewer
# Cat / proc / drbd
version: 8.3.15 (api: 88 / proto: 86-97) ### version, the next line of information-bit compiler
GIT-hash: 0ce4d235fc02b5c53c1c52c53433d11a694eab8c build by root@orasrv1.xlk.com, 2015-10-31 10:58:13
 0: cs: Connected ro: Primary / Secondary ds: UpToDate / UpToDate C r -----
    ns: 56 nr: 0 dw: 56 dr: 1181 al: 3 bm: 0 lo: 0 pe: 0 ua: 0 ap: 0 ep: 1 wo: f oos: 0

Device Number role of the state (current / peer) protocol and disk status, I / O status
----- -------------- --------------------- ---------- -------------------
  0: cs: Connected ro: Primary / Secondary ds: UpToDate / UpToDate C r -----

    I / O status includes six species:
    1). I / O suspension, r represents running I / O, s represents suspended I / O, the normal case r
    2). Serial resynchronization serial sync: synchronize when the resource wait Shique postponed resynchronization, which then becomes a symbol A, normally is -
    3). Peer-initiated sync suspension peer node initiates synchronization pause: When the resource is waiting to resync time on
        For some reason the peer node initiates pause synchronization. This flag becomes p. Normally -
    4). Locally initiated sync suspension locally initiated synchronization Pause: When the resource wait resynchronization local festival
        Point the user to initiate a sync pause, this flag becomes u. Normally -
    5). Locally blocked I / O. Normally - It may be about flag:
        d: drbd internal disk such as a transient state caused by an I / O blocking
        b: alternate device I / O blocking
        n: a blockage network socket
        a: I / O and network congestion congestion combination of devices
    6). Activity Log update suspension activity log update pause: When the activity log updates pause, this flag became s. Normally -

The second line performance
ns: 56 nr: 0 dw: 56 dr: 1181 al: 3 bm: 0 lo: 0 pe: 0 ua: 0 ap: 0 ep: 1 wo: f oos: 0

    NS (network send net send): net kibyte data is sent to a peer node over a network connection
    NR (network receive network receives): Connect to kibyte received net data over the network
    DW (disk write disk writes): net data is written to the local disk kibyte
    DR (disk read disk read): net data kibyte read local disk data
    AL (activity log activity log): Metadata Activity Log area update
    BM (bit map Bitmap): Bitmap area metadata updates
    The number of requests DRBD open local I / O subsystem: LO (local count local count)
    The number is sent to the peer node, but have not yet answered the request of the other nodes: PE (pengding TBD)
    UA (unacknowledged unconfirmed): Connect via a network receives a request for a peer node, but has yet to receive a reply
    AP (alllication pending application pending): Data block I / O requests forwarded to DRBD, DRBD but not answered
    EP (epochs): epoch when a certain number of objects, usually 1, or hinder the use of written methods may not sorted
    Increased I / O load.
    WO (write order sequential write) method to write the order currently in use: b (barrier disorder), (f flush refresh), d (drain
    Drain) or n (none none)
    OOS (out of sync): in order to synchronize the current storage kububyte

Three, DRBD master switch from role
1, the main server operations
Uninstall the mount to the primary server disk drbd
Unable to umount the case, you can use lsof | grepdrbd way to see which processes are using file drbd partition, turn it off
    # Umount / data
Drbd service will switch roles from the primary server role
    # Drbdadm secondary redisk
2, the operation from the server
The drbd-based server role from the role to enhance the service
    # Drbdadm primary redisk
Mount drbd partition, -o noatime parameter access will be closed due to the operation to generate an updated file atime provides disk I / O performance
    # Mount -o noatime / dev / drbd0 / data
- Java 8 stream parsed into SQL (Programming)
- Django Signals from practice to source code analysis (Programming)
- RHEL5 multipath configuration (Linux)
- Hibernate4 The Hello World (basic environmental structures) (Programming)
- How nodeclub constructed Docker image (Server)
- OpenSSL: implementation creates a private CA, certificate signing request Explanation (Server)
- Easy to get hidden administrator account (Linux)
- Expand an existing RAID arrays and remove the failed disk in a RAID (Linux)
- Installation through the network Debian 7 (Wheezy) (Linux)
- LVM Disk Manager Application (Linux)
- Linux kernel log --dmesg (Linux)
- Set multiple IP addresses for a single network card on Ubuntu 15.10 (Linux)
- Open remote MySQL database connection managed under CentOS (Database)
- ld.so.conf.d profile (Linux)
- Using IntelliJ IDEA 13 integrated development environment to build Android (Linux)
- Ubuntu Linux use ufw or iptables firewall configuration (Linux)
- How do you prevent other users from accessing your home directory in Linux (Linux)
- Understanding the type in C ++ bitset (Programming)
- HttpClient4 usage upgrade from HttpClient3 (Programming)
- Shorewall firewall settings under Ubuntu (Linux)
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.