[DRBD-user] Stop master mount access during a slave network failure in C protocol?

Mayk Eskilla meskilla at outlook.com
Mon Aug 31 17:27:16 CEST 2015

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


Hi list

I'm testing drbd C protocol with two ext4 partitions on 2 banana pi's and I noticed that"C protocol does not stop a copying process into the master mount, while I disconnect the slave network cable: There is a short delay in copying, but the process then continues with /proc/drbd mentioning "Network failure" and "Waiting for connection" plus slave being in inconsistent state. re-plugging the slave network cable will trigger a successful sync form master to slave and both are up-to-date again.

My question is simply this: how come C protocol does not block master mount write access, when data can not safely be written to the slave? Is this considered a heartbeat's task, so drbd does not react itself? Or can I modify the drbd.conf, so at least disk writes into the master are stopped when the slave is disconnected?

Attached is my minimalistic drbd.conf

cat /etc/drbd.conf
global { usage-count no; }
common { syncer { rate 100M; } }
resource r0 {
        protocol C;
        startup {
                wfc-timeout  15;
                degr-wfc-timeout 60;
        }
        net {
                cram-hmac-alg sha256;
                shared-secret "secret";
        }
        on Pi1 {
                device /dev/drbd0;
                disk /dev/sda1;
                address 192.168.1.11:7789;
                meta-disk internal;
        }
        on Pi2 {
                device /dev/drbd0;
                disk /dev/sda1;
                address 192.168.1.12:7789;
                meta-disk internal;
        }
}


There is no heartbeat service involved as of now, so I'm assigning roles myself with drbdadm.

Regards

Mayk 		 	   		  


More information about the drbd-user mailing list