0

Setup

I currently have two NFS servers. And the plan is that they mirror their data to each other in realtime using DRBD and monitor each other using heartbeat.

This is my current /etc/drbd.d/t0.res config.

resource t0 {

 protocol C;
 incon-degr-cmd "halt -f";

 startup {
    degr-wfc-timeout 120;    # 2 minutes.
  }

  disk {
    on-io-error   detach;
  }

  net {

  }

  syncer {

    rate 10M;

    group 1;

    al-extents 257;
  }

 on node1 {                
   device     /dev/drbd0;        
   disk       /dev/loop0;         
   address    172.16.2.101:7788; 
   meta-disk  internal;      
  }

 on node2 {               
   device    /dev/drbd0;         
   disk      /dev/loop0;         
   address   172.16.2.102:7788;  
   meta-disk internal;       
  }

}

Error When I try to use a drbdadm command I get the following error:

drbd.d/contentserver.res:4: Parse error: 'protocol | on | disk | net | syncer | startup | handlers | ignore-on | stacked-on-top-of' expected,
        but got 'incon-degr-cmd' (TK 282)
Thenen
  • 1
  • 1

1 Answers1

0

I believe your resource file should read like this:

 resource t0 {

 protocol C;
 pri-on-incon-degr "halt -f";

 startup {
    degr-wfc-timeout 120;    # 2 minutes.
  }

  disk {
    on-io-error   detach;
  }

  net {

  }

  syncer {

    rate 10M;

    group 1;

    al-extents 257;
  }

 on node1 {                
   device     /dev/drbd0;        
   disk       /dev/loop0;         
   address    172.16.2.101:7788; 
   meta-disk  internal;      
  }

 on node2 {               
   device    /dev/drbd0;         
   disk      /dev/loop0;         
   address   172.16.2.102:7788;  
   meta-disk internal;       
  }

}
Matt Kereczman
  • 477
  • 4
  • 9