[DRBD-user] DRBD & network failures - lost files

Artis Caune ac at latnet.lv
Thu Dec 23 19:02:59 CET 2004

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


Hello DRBD users!

Strange problem here:

We set up DRBD as shown in
http://linuxha.trick.ca/DRBD_2fQuickStart07

And all works as expected when doing failure test with:
# touch /mnt/ha0/been_there
# umount /mnt/ha0 && drbdadm secondary all

% drbdadm primary all
% mount /mnt/ha0 && ls /mnt/ha0/been_there
% touch /mnt/ha0/me_too
% umount /mnt/ha0
% drbdadmin secondary all

# drbdadmin primary all && mount /mnt/ha0
# ls /mnt/ha0/me_too





BUT if we do real failure on master: files are not synced when master
cames back...



# touch /mnt/ha0/test_2
# ifconfig eth0 down; \
   umount /mnt/ha0; \
   drbdadm secondary all; \
   sleep 300; \
   ifconfig eth0 up; \
   drbdadmin primary all; \
   mount /mnt/ha0

         --- doing this while 'sleeping 300s' ---
% drbdadm primary all
% mount /mnt/ha0 && ls /mnt/ha0/test_2
% touch /mnt/ha0/lost_file
% umount /mnt/ha0
% drbdadmin secondary all

and now after sleep there is no such file
/mnt/ha0/lost_file, but nodes are
cs:Connected st:Primary/Secondary ld:Consistent
cs:Connected st:Secondary/Primary ld:Consistent



what to do?

Please CC me.



# cat /etc/drbd.conf

global {
    minor-count 1;
}

resource drbd0 {
  protocol C;
  incon-degr-cmd "echo '!DRBD! pri on incon-degr' | wall ; sleep 60 ;
halt -f";

  net {
    on-disconnect reconnect;
  }
  syncer {
    rate 10M;
  }

  on node1 {
    device     /dev/drbd0;
    disk       /dev/sda9;
    address    x.x.x.97:7788;
    meta-disk  internal;
  }

  on node2 {
    device    /dev/drbd0;
    disk      /dev/sda9;
    address   x.x.x.99:7788;
    meta-disk internal;
  }
}




-- 
Artis





More information about the drbd-user mailing list