On 05/10/16 01:58, Romain Pelissier wrote:
Hi,
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 :)
Here is my situation:
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:
I have an lvm partition formatted as xfs.
This partition contain ma application database (several Gigs).
I want to use drbd to have a copy of the partition on the remote node.
Here is my conf:
cat /etc/drbd.d/backup.res
global { usage-count no; }
common { syncer { rate 1000M; } }
resource rc0 {
protocol C;
startup {
wfc-timeout 15;
degr-wfc-timeout 60;
}
net {
cram-hmac-alg sha1;
shared-secret "secret2secret";
}
on esm65 {
device /dev/drbd0;
disk /dev/vg0/lv_arc;
address 172.31.254.27:7788 <http://172.31.254.27:7788>;
#meta-disk internal;
#flexible-meta-disk /dev/vg0/lv_drdb_md;
meta-disk /dev/vg0/lv_drdb_md;
}
on phpesmbck01 {
device /dev/drbd0;
disk /dev/vg0/lv_arc;
address 172.31.254.19:7788 <http://172.31.254.19:7788>;
#meta-disk internal;
#flexible-meta-disk /dev/vg0/lv_drdb_md;
meta-disk /dev/vg0/lv_drdb_md;
}
}
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.
Perferct!
But..
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.
I check this
cat /proc/drbd
version: 8.4.7-1 (api:1/proto:86-101)
GIT-hash: 3a6a769340ef93b1ba2792c6461250790795db49 build by
mockbuild@Build64R6, 2016-01-12 13:27:11
0: cs:Connected ro:Primary/Secondary ds:UpToDate/UpToDate C r-----
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
So, everything seems to be up to date.
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.
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?
Never, EVER, modify the underlying data.
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.
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
1) discard the "other" data
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.
You would have to ignore the status from DRBD, you have lied to DRBD, so
it will lie to you.
What you *should* do:
1) Switch primary
2) Mount the new primary
3) Make changes as needed
4) Switch primary
5) Mount and check
Regards,
Adam
--
Adam Goryachev Website Managers www.websitemanagers.com.au
_______________________________________________
drbd-user mailing list
[email protected]
http://lists.linbit.com/mailman/listinfo/drbd-user