<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 05/10/16 01:58, Romain Pelissier
wrote:<br>
</div>
<blockquote
cite="mid:CAOMp3fahKR6MqGLfmhZitLQA+tGMwnEo6WKB3tZ4RMq5eFK8Ew@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_default"
style="font-family:verdana,sans-serif">Hi,<br>
</div>
<div class="gmail_default"
style="font-family:verdana,sans-serif">So first, sorry if you
foud this question basic but I am very new to drbd. Second,
maybe it's perfectly normal but in this case, I will need some
advices from you gyus :)<br>
<br>
</div>
<div class="gmail_default"
style="font-family:verdana,sans-serif">Here is my situation:<br>
<br>
</div>
<div class="gmail_default"
style="font-family:verdana,sans-serif">I use 8.4.7-1 on RHEL
6.5 (2.6.32-642.4.2.el6.x86_64) on my 2 nodes. I use drbd with
this scenario:<br>
<br>
</div>
<div class="gmail_default"
style="font-family:verdana,sans-serif">I have an lvm partition
formatted as xfs.<br>
</div>
<div class="gmail_default"
style="font-family:verdana,sans-serif"> This partition contain
ma application database (several Gigs).<br>
</div>
<div class="gmail_default"
style="font-family:verdana,sans-serif">I want to use drbd to
have a copy of the partition on the remote node.<br>
<br>
</div>
<div class="gmail_default"
style="font-family:verdana,sans-serif">Here is my conf:<br>
<br>
cat /etc/drbd.d/backup.res<br>
global { usage-count no; }<br>
common { syncer { rate 1000M; } }<br>
resource rc0 {<br>
protocol C;<br>
startup {<br>
wfc-timeout 15;<br>
degr-wfc-timeout 60;<br>
}<br>
net {<br>
cram-hmac-alg sha1;<br>
shared-secret "secret2secret";<br>
}<br>
on esm65 {<br>
device /dev/drbd0;<br>
disk /dev/vg0/lv_arc;<br>
address <a moz-do-not-send="true"
href="http://172.31.254.27:7788">172.31.254.27:7788</a>;<br>
#meta-disk internal;<br>
#flexible-meta-disk /dev/vg0/lv_drdb_md;<br>
meta-disk /dev/vg0/lv_drdb_md;<br>
}<br>
on phpesmbck01 {<br>
device /dev/drbd0;<br>
disk /dev/vg0/lv_arc;<br>
address <a moz-do-not-send="true"
href="http://172.31.254.19:7788">172.31.254.19:7788</a>;<br>
#meta-disk internal;<br>
#flexible-meta-disk /dev/vg0/lv_drdb_md;<br>
meta-disk /dev/vg0/lv_drdb_md;<br>
}<br>
}<br>
<br>
</div>
<div class="gmail_default"
style="font-family:verdana,sans-serif">The first sync works
fine. To test it once completed, I stop drbd on thr second
node, mount /dec/vg0/lv_arc on a folder and I can see the
folders.<br>
</div>
<div class="gmail_default"
style="font-family:verdana,sans-serif">Perferct!<br>
</div>
<div class="gmail_default"
style="font-family:verdana,sans-serif">But..<br>
</div>
<div class="gmail_default"
style="font-family:verdana,sans-serif">For the fun of it, I
have renoved a folder on the secondary node drbd partition
(drbd was stop at that time). then umount it and start drbd
process.<br>
</div>
<div class="gmail_default"
style="font-family:verdana,sans-serif"><br>
</div>
<div class="gmail_default"
style="font-family:verdana,sans-serif">I check this<br>
<br>
cat /proc/drbd<br>
version: 8.4.7-1 (api:1/proto:86-101)<br>
GIT-hash: 3a6a769340ef93b1ba2792c6461250790795db49 build by
mockbuild@Build64R6, 2016-01-12 13:27:11<br>
0: cs:Connected ro:Primary/Secondary ds:UpToDate/UpToDate C
r-----<br>
ns:72054328 nr:0 dw:19012784 dr:59035232 al:1170 bm:0 lo:0
pe:0 ua:0 ap:0 ep:1 wo:f oos:0<br>
<br>
</div>
<div class="gmail_default"
style="font-family:verdana,sans-serif">So, everything seems to
be up to date.<br>
</div>
<div class="gmail_default"
style="font-family:verdana,sans-serif">But If I stop the
seocndary node, mount the lvm in a folder, the folder that I
have deleted earlier is not there but it exists on the primary
node.<br>
<br>
</div>
<div class="gmail_default"
style="font-family:verdana,sans-serif">Is it normal in this
case that the status is UpToDate/UpToDate? How can I be sure
that the 2 partition are really in sync?</div>
<br>
</div>
</blockquote>
Never, EVER, modify the underlying data. <br>
<br>
If you are going to insist on doing that, then you must know what
you are doing, and shouldn't be asking about it here.<br>
If you really want to do this, then you might end up with a totally
broken system (as you have discovered). You *might* be lucky and get
a working system by<br>
1) discard the "other" data<br>
2) make sure the modified copy is started as primary, and then do a
verify and resync to properly bring the secondary up to date, and
remember that it contains invalid data until the resync is
completed.<br>
You would have to ignore the status from DRBD, you have lied to
DRBD, so it will lie to you.<br>
<br>
What you *should* do:<br>
1) Switch primary<br>
2) Mount the new primary<br>
3) Make changes as needed<br>
4) Switch primary<br>
5) Mount and check<br>
<br>
Regards,<br>
Adam<br>
<br>
<div class="moz-signature">-- <br>
Adam Goryachev
Website Managers
<a class="moz-txt-link-abbreviated" href="http://www.websitemanagers.com.au">www.websitemanagers.com.au</a></div>
</body>
</html>