ܼ

Ϥ

DRBDδŪưԤ

Ķ

OSCentOS Linux release 7.3.1611
KernelLinux version 3.10.0-514.10.2.el7.x86_64
DRBDdrbd84-utils-8.9.8-1.el7.elrepo.x86_64
DRBD Kernel Modulekmod-drbd84-8.4.9-1.el7.elrepo.x86_64

ե

DRBDư/etc/drbd.confˤƹԤ
ºݤΥѥ᡼ /etc/drbd.d/ ۲ΥեѤglobal_common.confȥ꥽եʽ֤Ǥ/etc/drbd.d/*.resˤɤ߹ư򤷤Ƥ롣

ƥ˴ؤϰʲΥȤ򻲾ȤΤȡ
https://blog.3ware.co.jp/drbd-users-guide-8.3/re-drbdconf.html

եȤʣΥǶڤƤꡢưƤꤹ롣
global_common.confˤϲ򤻤˥꥽ե*.resˤˤΤԤȤư뤳ȤǽǤ롣

  • globalХѥ᡼
    commonƤΥ˰Ѥ륪ץ
    handlersΥ٥Ȥ˱
    startupDRBDưΥॢȤ˴ؤ
    diskʪȥ졼˴ؤ
    netͥåȥ˴ؤ
    syncerDRBDƱ˴ؤ
    redourceDRBD꥽Ʊѡƥˤ˴ؤ

ƥɽŪʥѥ᡼򵭺ܤ롣

global

usage-count yes;DRBDץȤDRBDѾ׾

handlers

pri-on-incon-degrȤץ饤ޥǡǤƤ꤫ĥǡ礬äޥ¹
pri-lost-after-sbȤץ饤ޥǡץåȥ֥쥤(2)νԤ˻ꤷޥ¹
local-io-errorǥI/Oǥ顼ȯ˻ꤷޥ¹

startup

wfc-timeoutưDRBDΡɤȤ³ॢȤäǻꡣ0ϥॢȤʤ(ǥե)
degr-wfc-timeoutꤷÿΥॢȸǥ졼ɥ⡼ɤˤʤΡɤξ㳲Ʊ֡
become-primary-onư˥ץ饤ޥˤΡɤꡣ̤ʥǥեȡˤξ硢ξȤ⥻ȤƵư롣

disk

on-io-errorIO顼ȯưꡣ
disk-flushesǥեåγǧ
disk-barrierͥƥ֡ޥ塼󥰡NCQˤλ̵ͭλꡣͥ2.6.36ʹߵڤRHEL62.6.32ǤϡץȤäƤϤʤʤȤλ
md-flushes᥿ǥХؤΥǥեå̵ͭ
  • on-io-error
    call-local-io-errorhandlerslocal-io-erroeƤӽФ
    pass_on(MWOS)I/O顼֤
    detachΥǥХڤΥ³
  • disk-flushes
    yesǥؤν񤭹ޤ줿ǽ񤭹ߴλȤߤʤ
    noå˽񤭹ޤ줿ǽ񤭹ߴλȤߤʤ

net

protocolƱ˻Ѥץȥ륿פprotocol򻲾ȡ
csums-algиΡɤǧڤԤ硢HMAC르ꥺꤹ롣
verify-algverifyޥǥǥƤ򥪥饤ȹ礹ݡDRBDϥӥåñ̤ӤǤϤʤ֥åȤΥϥåͤ׻иΡɤΥϥåͤӤ롣md5sha1crc32cѲǽ
after-sb-0priץåȥ֥쥤󤬸Ф줿ȤξΡɤȤ⥻ξŬѤݥꥷ
after-sb-1priץåȥ֥쥤󤬸Ф줿Ȥˤɤ餫1ĤΥΡɤץ饤ޥǤŬѤݥꥷ
after-sb-2priץåȥ֥쥤󤬸Ф줿ȤξΡɤȤץ饤ޥǤŬѤݥꥷ
  • protocol
    ѤƱΥ르ꥺ򤹤롣̾Protocol C侩(ʲޥ˥奢뤫ž)
    AƱץꥱץȥ롣ץ饤ޥΡɤǤΥǥؤν񤭹ߤϡΥǥ˽񤭹ǥץꥱѥåȤ򼫵TCPХåեäǡλȽǤޤƥ९åʤɤζŪʥե륪Фȡǡʶǽޤå夬Ȥʤäե륪Фä硢ԵϥΡɤΥǡȽǤޤåľΥåץǡƤȿǤʤǽޤ
    BƱ(ȾƱ)ץꥱץȥ롣ץ饤ޥΡɤǤΥǥؤν񤭹ߤϡΥǥ˽񤭹ǥץꥱѥåȤ¾ϤǡλȽǤޤ̾ƥ९åʤɤζŪʥե륪ФǤΥǡʶϵޤ󡣤ξΡɤƱŸ㳲ꡢץ饤ޥΡɤΥȥ졼Բǽʾ㳲ȡץ饤ޥ¦ˤΤ߽񤭹ޤ줿ǡ򼺤ǽޤ
    CƱץꥱץȥ롣ץ饤ޥΡɤǤΥǥؤν񤭹ߤϡξΡɤΥǥؤν񤭹ߤäǴλȽǤޤΤᡢɤ餫ΥΡɤǥǡ򼺤äƤ⡢ΤȤƤΥǡʶˤľ뤷ޤʤ顢ΥץȥѤǤäƤ⡢ξΡɤޤϤΥȥ졼֥ƥǤʤ㳲Ʊ˵ȡǡϼޤ
  • after-sb-0pri
    disconnectưϼ¹Ԥsplit-brain ϥɥ饹ץ(ꤵƤ)ƤӽФͥǤǥ⡼ɤ³ԡ
    discard-younger-primaryǸ˥ץ饤ޥäۥȤ˲ä줿ѹƤ˴ƥХå
    discard-least-changesѹʤäۤΥۥȤѹƤ˴ƥХå
    discard-zero-changesѹʤäۥȤϡ¾˲ä줿٤ƤѹƤŬѤ³ԡ
  • after-sb-1pri
    disconnectưϼ¹Ԥsplit-brain ϥɥ饹ץ(ꤵƤ)ƤӽФͥǤǥ⡼ɤ³ԡ
    consensusafter-sb-0priǻꤷΤƱݥꥷŬѡ
    call-pri-lost-after-sbafter-sb-0priǻꤷݥꥷŬѡ
    discard-secondary饹ΡɤŪ˺
  • after-sb-2pri
    disconnectưϼ¹Ԥsplit-brain ϥɥ饹ץ(ꤵƤ)ƤӽФͥǤǥ⡼ɤ³ԡ
    call-pri-lost-after-sbafter-sb-0priǻꤷݥꥷŬѡ

syncer

rateDRBDΥǡƱǻѤӰξͤꡣե󥹥ޥ˥奢Ǥñ̤Byte/secȵܤƤ뤬¬ȤƤbit/secǤͤ˸롣
afterͥ褷Ʊ꥽λ
verify-algǥƤ򥪥饤󸡾ڤ뤿Υϥå奢르ꥺꡣmd5sha1crc32cѲǽ

resource

resource [n]꥽̾
protocolnetprotocol򻲾
on [HSOTNAME]饹ΥСȤʤۥȤ
deviceDRBDǻȤǥХ̾(DRBD륹ڥե̾¸Υե̾ȤνʣԲ)
diskDRBDѤȤƻѤѡƥλ
addressƱ˻ѤIPɥ쥹ȥݡֹ档DRBDñΤǤʣηϩǤʤᡢĹԤˤ¾LinuxBondingDriverλѡ802.11adλѤʤɡˤȤʻѤɬס
meta-disk᥿ǡѥѡƥλꡣinternalꤹƱоݤΥѡƥ˥᥿ǡݴɤʰ侩

ꥵץ

  • global_common.conf
    global {
            usage-count yes;
    }
    
    common {
            handlers {
            }
    
            startup {
            }
    
            disk {
            }
    
            net {
                    protocol C;
                    csums-alg sha1;
                    verify-alg sha1;
                    after-sb-0pri discard-zero-changes;
                    after-sb-1pri discard-secondary;
                    after-sb-2pri disconnect;
            }
            syncer {
                    rate 300M;
            }
    }
  • r0.res
    resource r0 {
        meta-disk internal;
        device /dev/drbd0;
        disk /dev/sdb1;
        on dev-drbd01 {
            address 192.168.1.101:7788;
        }
        on dev-drbd02 {
            address 192.168.1.102:7788;
        }
    }

ȥå   Խ ʬ ʎގ̎ ź ʣ ̾ѹ   ǽ   إ   ǽRSS
Last-modified: 2017-04-09 () 12:22:07 (46d)