Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »


DRX is configured through the drbd.conf and drx.conf files.

  • The drbd.conf file describes replication connections, buffer sizes, and optional settings. By default, it is created in the same way as the DRBD configuration file format. In most cases, DRBD is installed locally and will be created by modifying the already created drbd.conf file.
  • If DRBD is installed locally, DRX automatically recognizes the path of the configuration file through the environment variable (DRBD), so you do not need to change the path of drbd.conf. /etc/drbd.conf is the default path and you can change the path through drx.conf.
  • If you are adjusting DRX's own options, create a drx.conf file. You do not need to create it unless it is a special case.


4.1. Configuration files

DRX is recommended to unify the configuration file of each node into the same "drbd.conf" file for the sake of management but it is not mandatory, and configuration contents of each node can be changed according to the configuration method, and the configuration file name, Can be specified separately. The major configuration items of DRX are as follows.

  • Connection configuration: Setting DRX inbound IP and outbound IP address to work with DRBD
  • Buffer Configuration: Set buffer size per resource (channel)
  • Compression/Encryption Configuration: Setting the compression/encryption function ON / OFF

DRX sets the buffer size in the "proxy" section within the DRBD configuration file and sets the DRX IP address in the "proxy on" section within the host section. Compression and encryption settings are described in the plugin subsection in the proxy section. The following is a basic DRX configuration form, with slightly different 1:1 and 1:N replication configurations.

1:1 replication

  • proxy on [ proxy on hostname ] section of on [hostname] section 
    • inside [ proxy inside ip address]:[ port ]
    • outside [ proxy inside ip address ]:[ port]
  • proxy section
    • memlimit
    • plugin section
      • compressor [zlib | lzma | iqa] level [1~9]
      • crypto openssl

1:N replication

  • host [ hostname] address [ host ip address ]:[port] via proxy on [proxy on hosname] section of connection section 
    • inside [ proxy inside ip address]: [ port ]
    • outside [ proxy inside ip address ]: [ port]
  • proxy section
    • memlimit
    • plugin section
      • compressor [zlib | lzma | iqa] level [1~9]
      • crypto openssl

4.1.1. Local configuration

On node1 and node2 local systems, the DRX is installed and operated, and the contents of node1 and node2 are identical for both nodes.

  • The following are examples of 1:1 replication configurations and 1:2 replication configurations.
  • Note that each port information must be subject to exception handling by the firewall and configured so that no redundant ports are used.

방식Windows configurationLinux configuration비고
1:1 replication
drbd.conf
resource r0 {
    device d minor 1;      
    disk d;                 
    meta-disk f;           

 	net {
        protocol A;
		sndbuf-size 20M;
		on-congestion pull-ahead;
		congestion-fill 480M;
    }

	proxy {
      	memlimit 500M; # DRX TX Buffer
		plugin {
			#compressor zlib level 1;
			#crypto openssl;
		}
  	}
 
	on node1 {
        address   10.10.0.250:7789;
        node-id 0;          
        proxy on node1 {
            inside 10.10.0.250:7790;
            outside 10.10.0.250:7791;
        }
    }
    
	on node2 {
        address   10.10.0.253:7789;
        node-id 1;
        proxy on node2 {
            inside 10.10.0.253:7790;
            outside 10.10.0.253:7791;
        }
    }
}
drbd.conf
resource r0 {
    device /dev/drbd1;
    disk /dev/sdb1;
    meta-disk internal;

 	net {
        protocol A;
		sndbuf-size 10M;
		on-congestion pull-ahead;
		congestion-fill 480M;
    }

	proxy {
      	memlimit 500M; # DRX TX Buffer
		plugin {
			#compressor zlib level 1;
			#crypto openssl;
		}
  	}

    on node1 {
        address 100.100.10.31:7789;
        proxy on node1 {
            inside 100.100.10.31:7790;
            outside 100.100.10.31:7791;
        }
    }
    on node2 {
        address 100.100.10.41:7789;
        proxy on node2 {
            inside 100.100.100.41:7790;
            outside 100.100.100.41:7791;
        }
    } 
}




1:2 replication

  • Windows: MDR
  • Linux: stacked 1:2
drbd.conf
resource r2 {
  startup {
      wfc-timeout 3;
  }
  
	proxy {
      memlimit 500M;
  }
  
  net {
      protocol A;
      verify-alg crc32c;
      on-congestion pull-ahead; 
      sndbuf-size 20M;
      congestion-fill 480M;
  }

  device e minor 2;
  disk	e;
  meta-disk	g "C:/r2_meta.vhd";

  on node1 {
    node-id	1;    
  }
  on node2 {
    node-id	2;
  }
  on node3 {
    node-id	3;
  }
  
  connection DR-node1-node3 { 

	 host node1 address 100.100.100.9:6677 via proxy on node1 {
	 	inside 100.100.100.9:6678;
	 	outside 100.100.100.9:6679;
	 }
	 host node3 address 100.100.100.11:6677 via proxy on node3 {
	 	inside 100.100.100.11:6678;
	 	outside 100.100.100.11:6679;
	 }
  }

  connection DR-node2-node3 { 

	 host node2 address 100.100.100.10:6680 via proxy on node2 {
	 	inside 100.100.100.10:6681;
	 	outside 100.100.100.10:6682;
	 }
	 host node3 address 100.100.100.11:6680 via proxy on node3 {
	 	inside 100.100.100.11:6681;
	 	outside 100.100.100.11:6682;
	 }
  }

  connection {
    host node1 address 10.20.25.9:6677;
    host node2 address 10.20.25.10:6677;
  }
}
drbd.conf
global {
       disable-ip-verification;
       usage-count     no;
}
common {
       startup {
               wfc-timeout     3;
       }
}
resource r0 {
       protocol B;
       disk {
               on-io-error detach;
       }
       net {
              protocol A;
              verify-alg crc32c;
              on-congestion pull-ahead; 
              sndbuf-size 10M;
              congestion-fill 80M;
       }
       on pr1 {
               device /dev/drbd0;
               disk /dev/sdb1;
               address 200.200.23.132:7799;
               meta-disk internal;
       }
       on pr2 {
               device /dev/drbd0;
               disk /dev/sdb1;
               address 200.200.23.137:7799;
               meta-disk internal;
       }
}
resource r0_1{
       protocol A;
       meta-disk internal;
       device /dev/drbd10;
       proxy {
               memlimit 500M;
       }
       net {
              protocol A;
              verify-alg crc32c;
              on-congestion pull-ahead;
              sndbuf-size 10M;
              congestion-fill 450M;
       }
       stacked-on-top-of r0 {
               address 10.30.0.135:7788;
               proxy on pr1 pr2{
                       inside 10.30.0.135:7789;
                       outside 10.30.0.135:7790;	# mirror VIP
               }
       }
       on dd1 {
               address 10.30.0.199:7788;
               proxy on dd1 {
                       inside 10.30.0.199:7789;
                       outside 10.30.0.199:7790;     #DR mirror IP
               }
       }
}

4.1.2. Dedicated server configuration

기본적으로 구성파일은 양 노드, DRX 노드 모두 동일하게 구성하나, 전용서버의 특성상 이 기종 노드 즉 WDRBD 노드와 Linux DRBD 노드들을 모두 DRX에서 수용하려면 전용서버에 설치된 drbd-utils 의 특성에 맞게 DRX config를 수정할 필요가 있습니다. 구성 절차는 하기 기술된 내용에 준하며 구성예제는 Linux 전용서버를 기준으로 합니다.




LAN
로컬 DRX
WAN

원격 DRX
LAN
원격 노드
Windows node r0
resource r0 {
	device    d  minor 1;
	disk      d;
	meta-disk e;

	proxy {
		memlimit 1G;
	}	
		
	net {
		protocol A;
		on-congestion pull-ahead;
		congestion-fill 950M;
		ping-timeout 30;
	}

	on w12std-0 {
		node-id 0;
	}
	on w12std-1 {
		node-id 1;
	}

	connection win-r0 {
		host w12std-0  address 10.10.0.77:7789 via proxy on 74proxy1 {
			inside 10.10.0.115:7790;
			outside 10.10.0.115:7791;
		}
		host w12std-1  address 10.10.0.203:7789 via proxy on 74proxy2 {
			inside 10.10.0.102:7790;
			outside 10.10.0.102:7791;
		}
	}

}
r0
resource r0 {
        device /dev/drbd001; # dummy
        disk /dev/sdb1; # dummy
        meta-disk /dev/sdc1; # dummy

		proxy {
                memlimit 1G;
        }
        net{
                protocol A;
				on-congestion pull-ahead;
				congestion-fill 950M;
                ping-timeout 30;
        }

        on w12std-0 {
                node-id 0;
        }
        on w12std-1 {
                node-id 1;
        }
        connection win-r0 {
                host w12std-0 address 10.10.0.77:7789 via proxy on 74proxy1 {
                        inside 10.10.0.115:7790;
                        outside 10.10.0.115:7791;
                }
                host w12std-1 address 10.10.0.203:7789 via proxy on 74proxy2 {
                        inside 10.10.0.102:7790;
                        outside 10.10.0.102:7791;
                }
        }
}
r1
resource r1 {
	device /dev/drbd001;
	disk /dev/sdb1;
	meta-disk /dev/sdc1;

	proxy {
		memlimit 1G;
	}
	net{
		protocol A;
		on-congestion pull-ahead;
		congestion-fill 950M;
		ping-timeout 30;
	}
	
	on cen74-1 {
		node-id 0;
	}
	on cen74-2 {
		node-id 1;
	}

	connection linux-r1 {
		host cen74-1 address 10.10.0.11:7792 via proxy on 74proxy1 {
			inside 10.10.0.115:7793;
			outside 10.10.0.115:7794;
		}
		host cen74-2 address 10.10.0.105:7792 via proxy on 74proxy2 {
			inside 10.10.0.102:7793;
			outside 10.10.0.102:7794;
		}
	}
}
r0
resource r0 {
        device /dev/drbd001; # dummy 
        disk /dev/sdb1; # dummy
        meta-disk /dev/sdc1; # dummy

        proxy {
                memlimit 1G;
        }
        net{
                protocol A;
				on-congestion pull-ahead;
				congestion-fill 950M;
                ping-timeout 30;
        }

        on w12std-0 {
                node-id 0;
        }
        on w12std-1 {
                node-id 1;
        }
        connection win-r0 {
                host w12std-0 address 10.10.0.77:7789 via proxy on 74proxy1 {
                        inside 10.10.0.115:7790;
                        outside 10.10.0.115:7791;
                }
                host w12std-1 address 10.10.0.203:7789 via proxy on 74proxy2 {
                        inside 10.10.0.102:7790;
                        outside 10.10.0.102:7791;
                }
        }
}
r1
resource r1 {
	device /dev/drbd001;
	disk /dev/sdb1;
	meta-disk /dev/sdc1;

	proxy {
		memlimit 1G;
	}
	net{
		protocol A;
		on-congestion pull-ahead;
		congestion-fill 950M;
		ping-timeout 30;
	}

	on cen74-1 {
		node-id 0;
	}
	on cen74-2 {
		node-id 1;
	}

	connection linux-r1 {
		host cen74-1 address 10.10.0.11:7792 via proxy on 74proxy1 {
			inside 10.10.0.115:7793;
			outside 10.10.0.115:7794;
		}
		host cen74-2 address 10.10.0.105:7792 via proxy on 74proxy2 {
			inside 10.10.0.102:7793;
			outside 10.10.0.102:7794;
		}
	}
}
Windows node r0
resource r0 {
	device    d  minor 1;
	disk      d;
	meta-disk e;

	proxy {
		memlimit 1G;
	}	
	
	net {
		protocol A;
		on-congestion pull-ahead;
		congestion-fill 950M;
		ping-timeout 30;
	}

	on w12std-0 {
		node-id 0;
	}
	on w12std-1 {
		node-id 1;
	}

	connection win-r0 {
		host w12std-0  address 10.10.0.77:7789 via proxy on 74proxy1 {
			inside 10.10.0.115:7790;
			outside 10.10.0.115:7791;
		}
		host w12std-1  address 10.10.0.203:7789 via proxy on 74proxy2 {
			inside 10.10.0.102:7790;
			outside 10.10.0.102:7791;
		}
	}

}
Linux node r1
resource r1 {
        device /dev/drbd0;
        disk /dev/sdb1;
        meta-disk /dev/sdc1;

        proxy {
                memlimit 1G;
        }
        net{
                protocol A;
				on-congestion pull-ahead;
				congestion-fill 950M;
                ping-timeout 30;
        }
        on cen74-1 {
                node-id 0;
        }
        on cen74-2 {
                node-id 1;
        }

        connection linux-r1 {
                host cen74-1 address 10.10.0.11:7792 via proxy on 74proxy1 {
                        inside 10.10.0.115:7793;
                        outside 10.10.0.115:7794;
                }
                host cen74-2 address 10.10.0.105:7792 via proxy on 74proxy2 {
                        inside 10.10.0.102:7793;
                        outside 10.10.0.102:7794;
                }
        }

Linux node r1
resource r1 {
	device /dev/drbd0;
	disk /dev/sdb1;
	meta-disk /dev/sdc1;
	
	proxy {
		memlimit 1G;
	}
	net{
		protocol A;
		on-congestion pull-ahead;
		congestion-fill 950M;
		ping-timeout 30;
	}

	on cen74-1 {
		node-id 0;
	}
	on cen74-2 {
		node-id 1;
	}

	connection linux-r1 {
		host cen74-1 address 10.10.0.11:7792 via proxy on 74proxy1 {
			inside 10.10.0.115:7793;
			outside 10.10.0.115:7794;
		}
		host cen74-2 address 10.10.0.105:7792 via proxy on 74proxy2 {
			inside 10.10.0.102:7793;
			outside 10.10.0.102:7794;
		}
	}
}


4.3. drx.conf

DRBD 구성과는 별개로 DRX 내부 속성을 설정할 수 있습니다. 보통의 경우는 DRX 기본 설정으로 동작하기 때문에 속성파일을 제공할 필요가 없습니다. 이 속성은 DRX가 시작될 때 적용되고, DRX 속성 파일은 다음 속성표의 내용을 참고하여 작성합니다.

  • 파일 이름: "drx.conf"
  • 기본 위치: drx 설치 경로
  • 주의: 파일의 시작 부분에 "[global]  section"을 기술해야 함
구분속성기본 값설명
기본langkorean DRX 언어 설정 파일
  • 환경설정의 "base-dir/lang"에 위치(미지정 시 실행파일 하부에 위치)
  • "korean.ini"나 "english.ini" 등과 같은 방법으로 파일 생성(utf8 파일)
    예)"korean.ini" 설정
base-dir

DRX 설치 경로

로그 저장이나 언어 설정과 관련한 파일이 있는 디렉터리의 상위 디렉터리로 지정

(미지정 시 DRX를 설치한 경로로 자동 지정됨)

drbd-conf

Windows:

  • ../etc/drbd.conf

Linux:

  • /etc/drbd.conf
"drbd config"를 이용할 경우, 해당 파일의 경로
connect-timeout3

소켓 connect 또는 listen 동작에서 사용하는 타임아웃 값(단위: 초)

(※ 네트워크 환경에 따라 연결 지연이 있을 수 있으므로 연결이 원활하지 않을 때 늘릴 것을 권장)

init-timeout10

원격 DRX와 연결 후, 초기화 패킷을 주고 받는 동안의 타임아웃 값(단위: 초)

(※ 네트워크 환경에 따라 연결 지연이 있을 수 있으므로 연결이 원활하지 않을 때 늘릴 것을 권장)

bwlimit0 (disabled)송신 시 대역폭 제한 값 (수신 대역폭은 원격 DRX 의 bwlimit 값에 의해 제어)
loglevel-fileinfo

파일로 저장되는 로그 레벨 지정

  • 위치: 설치 경로의 logs 폴더에 저장
ip-verificationon

off로 설정시 연결을 위해서 대기(Listen)하기위해 매칭(bind)하는 IP가 0.0.0.0(모든 IP 수신)으로 설정됩니다.

압축/암호화block-size63K압축/암호화시 사용할 block size

bab-read-spin-counter10bab에서 read시 block size 보다 작을 경우 재시도 횟수

bab-read-spin-delay10bab read 재시도시 delay 값 (ms)

min-raw-block-size1K압축/암호화 설정시에도 평문으로 보낼 minimum size

process-thread-count-1 (auto)

멀티쓰레드 패킷 처리시 사용할 쓰레드 개수. 

※ 튜닝과 디버깅의 용도이므로 변경하는 것을 권장하지 않습니다. 


drx.conf 예제

drx.conf

#
# DRX properties
#

[global]

lang=korean
drx_path=./

#drbd-conf=c:\program files\DRX\drbd.conf

#connect-timeout=10

# log levels: debug < info < warn < err 
loglevel-file=info


block-size=1M # 압축/암호화시 사용할 block size (기본 63K)
bab-read-spin-counter=10 # bab에서 read시 block size 보다 작을 경우 재시도 횟수
bab-read-spin-delay=10 # bab read 재시도시 delay 값 (ms)
min-raw-block-size=1K # 압축/암호화 설정시에도 평문으로 보낼 minimum size


  • 압축/암호화의 전송 버퍼 크기는 block-size값의 2배로 설정되며 최대 1MB로 설정됩니다. 


  • No labels