just create snapshot of lvm, zamd will pull it
[gnt-info] / doc / drbd-modify-resync-rate.txt
1
2
3 Primary:
4
5 drbdsetup disk-options --c-min-rate=300M <resource number>
6
7 Secondary:
8
9 drbdsetup disk-options --c-min-rate=300M <resource number>
10 drbdsetup disk-options --c-fill-target=20M <resource number>
11 drbdsetup show <resource number> - then take a look at address:port for _this_host and _remote_host and then do this:
12
13 drbdsetup net-options <_this_host address:port> <_remote_host address:port> --max-buffers=36k --sndbuf-size=1024k --rcvbuf-size=2048k
14
15 # primary
16
17 root@r1u28:~# grep -A 3 Sync /proc/drbd
18  2: cs:SyncSource ro:Primary/Secondary ds:UpToDate/Inconsistent B r-----
19     ns:659920972 nr:0 dw:4919308 dr:685106104 al:6946 bm:0 lo:4 pe:0 ua:4 ap:0 ep:1 wo:f oos:3625043016
20         [==>.................] sync'ed: 15.4% (3540080/4182016)M
21         finish: 49:21:38 speed: 20,380 (12,288) K/sec
22
23 root@r1u28:~# drbdsetup show 2
24 resource resource2 {
25     options {
26     }
27     net {
28         protocol                B;
29         max-buffers             36864;
30         sndbuf-size             1048576; # bytes
31         rcvbuf-size             2097152; # bytes
32         cram-hmac-alg           "md5";
33         shared-secret           "7db38910e6822aa309beac17be18adf3f07a1bf0";
34         after-sb-0pri           discard-zero-changes;
35         after-sb-1pri           consensus;
36     }
37     _remote_host {
38         address                 ipv4 10.80.2.51:11034;
39     }
40     _this_host {
41         address                 ipv4 10.80.2.53:11034;
42         volume 0 {
43             device                      minor 2;
44             disk                        "/dev/oscarvg/ebacd5f5-b172-4988-955c-a36dcd6c8377.disk1_data";
45             meta-disk                   "/dev/oscarvg/ebacd5f5-b172-4988-955c-a36dcd6c8377.disk1_meta";
46             disk {
47                 size                    8564768768s; # bytes
48                 c-plan-ahead            10; # 1/10 seconds
49                 c-delay-target          1; # 1/10 seconds
50                 c-max-rate              98304k; # bytes/second
51                 c-min-rate              32768k; # bytes/second
52             }
53         }
54     }
55 }
56
57
58
59 # secondary
60
61 root@r1u32:/srv/gnt-info/doc# grep -A 3 Sync /proc/drbd
62 25: cs:SyncTarget ro:Secondary/Primary ds:Inconsistent/UpToDate B r-----
63     ns:0 nr:654510900 dw:654510900 dr:0 al:8 bm:0 lo:0 pe:4 ua:0 ap:0 ep:1 wo:f oos:3630421688
64         [==>.................] sync'ed: 15.3% (3545332/4182016)M
65         finish: 48:05:37 speed: 20,964 (12,260) want: 12,320 K/sec
66
67 root@r1u32:~# drbdsetup show 25
68 resource resource25 {
69     options {
70     }
71     net {
72         protocol                B;
73         max-buffers             36864;
74         sndbuf-size             1048576; # bytes
75         rcvbuf-size             2097152; # bytes
76         cram-hmac-alg           "md5";
77         shared-secret           "7db38910e6822aa309beac17be18adf3f07a1bf0";
78         after-sb-0pri           discard-zero-changes;
79         after-sb-1pri           consensus;
80     }
81     _remote_host {
82         address                 ipv4 10.80.2.53:11034;
83     }
84     _this_host {
85         address                 ipv4 10.80.2.51:11034;
86         volume 0 {
87             device                      minor 25;
88             disk                        "/dev/oscarvg/ebacd5f5-b172-4988-955c-a36dcd6c8377.disk1_data";
89             meta-disk                   "/dev/oscarvg/ebacd5f5-b172-4988-955c-a36dcd6c8377.disk1_meta";
90             disk {
91                 size                    8564768768s; # bytes
92                 c-plan-ahead            10; # 1/10 seconds
93                 c-delay-target          1; # 1/10 seconds
94                 c-max-rate              98304k; # bytes/second
95                 c-min-rate              32768k; # bytes/second
96             }
97         }
98     }
99 }
100
101
102 ## modifications
103
104 root@r1u28:~# drbdsetup disk-options --c-min-rate=50M 2
105 root@r1u28:~# drbdsetup disk-options --c-plan-ahead=50 2
106 root@r1u28:~# drbdsetup disk-options --c-delay-target=20 2
107
108 root@r1u32:~# drbdsetup disk-options --c-min-rate=50M 25
109 root@r1u32:~# drbdsetup disk-options --c-plan-ahead=50 25
110 root@r1u32:~# drbdsetup disk-options --c-delay-target=20 25
111
112 https://www.linbit.com/blog/drbd-sync-rate-controller/
113 describes values which don't match well with my setup
114