Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Server \ DRBD daily management     - How to Install Focuswriter 1.4.5 (Linux)

- Linux Network Programming - non-blocking program (Programming)

- Introduction and use of the Raspberry Pi (Linux)

- Oracle 11G R2 DataGuard structures (Database)

- C # dynamic class notes --- (Dynamic) Applications (Programming)

- shell script: a key to install LAMP, LNMP script (Server)

- Linux configuration startup mount: fstab file (Linux)

- File easier to compare tools under Linux (Linux)

- linux raid levels and concepts introduced (Linux)

- CentOS7 + Redis Live Installation and Configuration (Linux)

- Sublime Text 3 shortcuts summary (Linux)

- systemd Power Management (Linux)

- Django 1.8 TEMPLATE_DIRS configuration and STATICFILES_DIRS (Server)

- BusyBox making the file system (Linux)

- Analysis of common mistakes when compiling MySQL installation (Database)

- CentOS / Debian configuration Gitlab 7.1x to build self Git repository (Linux)

- Ubuntu comes with gedit editor to add Markdown preview widget (Linux)

- Hadoop safe hftp (Server)

- Zookeeper cluster deployment (Server)

- ISO image to use offline upgrade Ubuntu (Linux)

 
         
  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
drbdadm:
    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:
    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:
    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

USAGE: drbdadm [OPTION ...] [- DRBDSETUP-OPTION ...] COMMAND {all | RESOURCE ...}

OPTIONS:
 {--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}

COMMANDS:
 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
Connected

### 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:
http://drbd.linbit.com/users-guide-8.4/

### 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
     
         
       
         
  More:      
 
- Developing a Web server yourself (Server)
- Linux System Getting Started Learning: Disable Ubuntu Apport internal error reporting procedures (Linux)
- AngularJS application unit testing started (Programming)
- In-depth summary of the PHP core of object-oriented (Programming)
- Linux vi command list (Linux)
- JDK installation notes under CentOS (Linux)
- Virt Related Command Summary (Linux)
- Ubuntu 12.04 kernel configuration automatically restart and crash dump (Linux)
- How to modify the Emacs Major Mode Shortcuts (Linux)
- Zabbix monitoring of the switch (Server)
- Apache Mina framework Practice (Programming)
- C language preprocessor command (Programming)
- Java reflection Introduction (Programming)
- Ubuntu 14.04 installation configuration GNOME Classic interface (Linux)
- How to ensure the Linux SSH login security with one-time password (Linux)
- Du and df show disk space usage inconsistent Causes and Treatment (Linux)
- Use Vagrant up a local development environment tutorials (Server)
- VirtualBox installation enhancements let the mouse move and share CentOS 6.4 (Linux)
- RHEL5 stalled due to power service error system can not start (Linux)
- Vim highlight lookup operation (Linux)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.