[DRBD-user] A simple test

Ryan Steele steele at agora-net.com
Tue Jun 12 21:08:36 CEST 2007

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


Ryan Steele wrote:
> Well, the only problem with that script is that it isn't mounting the 
> drbd device, /dev/drbd0.  I assume it's supposed to, and I'm just not 
> doing something correctly?  As a test, I manually mounted /dev/drbd0 
> on /home on machine A, created a test file, then unmounted /dev/drbd0 
> on machine A and executed a 'drbdadm secondary r0'.  I then went to 
> machine B and made it primary and mounted /dev/drbd0 on /home there, 
> but the test file I created wasn't there.
> Here's what gets me though:  when I unmounted /dev/drbd0 on machine A, 
> and I executed an 'ls' on /home, the test file was still there.  I 
> thought maybe the 'mount /dev/drbd0 /home' had silently failed, but I 
> tested the same scenario again, and verified by running the 'mount' 
> command that /dev/drbd0 was indeed mounted on /home.  I'm a bit 
> confused here... any reason why the test file wouldn't disappear when 
> I unmounted /dev/drbd0 on machine A?  I have a feeling when I get that 
> figured out, I'll see the file on machine B when I mount it there...
>
> Any suggestions are welcome, and here is some output that might help:
>
>
> db1:/# cat /etc/drbd.conf
> resource r0 {
>  protocol      C;
>  incon-degr-cmd "echo '!DRBD! pri on incon-degr' | wall ; sleep 60 ; 
> halt -f";
>  startup { wfc-timeout 0; degr-wfc-timeout     120; }
>  disk { on-io-error detach; }
>  syncer {
>    rate        60M;
>    group       1;   # sync when r2 is finished syncing.
>  }
>  on db1 {
>    device      /dev/drbd0;
>    disk        /dev/md7;
>    address     192.168.101.26:7791;
>    meta-disk   /dev/md1 [0];
>  }
>  on db2 {
>    device      /dev/drbd0;
>    disk        /dev/md7;
>    address     192.168.101.27:7791;
>    meta-disk   /dev/md1 [0];
>  }
> }
>

Sorry, I that output of 'cat /proc/drbd' was wrong.  Here is the correct 
information:

db1:/# cat /proc/drbd
version: 0.7.24 (api:79/proto:74)
SVN Revision: 2875 build by root at abbott, 2007-06-07 13:40:33
 0: cs:Connected st:Secondary/Primary ld:Consistent
    ns:208540112 nr:92 dw:748 dr:208556828 al:4 bm:38195 lo:0 pe:0 ua:0 ap:0
 1: cs:Unconfigured


db2:/# cat /proc/drbd
version: 0.7.24 (api:79/proto:74)
SVN Revision: 2875 build by root at abbott, 2007-06-07 13:40:33
 0: cs:Connected st:Primary/Secondary ld:Consistent
    ns:92 nr:208540048 dw:208540140 dr:6460 al:2 bm:38189 lo:0 pe:0 ua:0 
ap:0
 1: cs:Unconfigured



>
>
>
> Best Regards,
> Ryan
>
> Ben wrote:
>> Heartbeat comes with a nice script to make this easy:
>>
>> /etc/ha.d/resource.d/drbddisk < drbd resource >  < start | stop >
>>
>> You can use this even if Heartbeat isn't running, and it's the script 
>> Heartbeat will use, so if you're testing to make sure Heartbeat will 
>> work, I recommend using it to test. If you want to be gentle, stop 
>> the resource on the first node and then start it on the second. If 
>> you want to be more paranoid, pull the plug on the first node instead 
>> of stopping the resource, and verify everything is still correct.
>>
>> On Jun 12, 2007, at 11:33 AM, Ryan Steele wrote:
>>
>>> Hey folks,
>>>
>>> Before I get Heartbeat into the mix, I want to verify DRBD is 
>>> working properly in my setup.  I have DRBD running on both boxes, 
>>> and have done a --do-what-I-say primary all on the first machine.  I 
>>> then mounted /dev/drbd0 on /home on the first machine and put a 
>>> little test file there.
>>>
>>> Now, I want to verify that I can mount /dev/drbd0 on /home on the 
>>> second machine and see the little test file there.  What is the best 
>>> way to go about doing so?  Thanks for any advice.
>>>
>>> By the way, /proc/drbd says things are consistent, so I think as 
>>> long as I can verify what I said above, I should be ready to 
>>> introduce Heartbeat.  Thanks again!
>>>
>>> Best Regards,
>>> Ryan
>>>
>>> _______________________________________________
>>> drbd-user mailing list
>>> drbd-user at lists.linbit.com
>>> http://lists.linbit.com/mailman/listinfo/drbd-user
>>
>
> _______________________________________________
> drbd-user mailing list
> drbd-user at lists.linbit.com
> http://lists.linbit.com/mailman/listinfo/drbd-user


-- 
Ryan Steele
Systems Administrator               steele at agora-net.com
AgoraNet, Inc.			    	  (302) 224-2475
314 E. Main Street, Suite 1         (302) 224-2552 (fax)
Newark, DE 19711                    http://www.agora-net.com




More information about the drbd-user mailing list