[DRBD-user] DRBD in Diskless/Inconsistent state, can't changestate to Primary

Peter Bagger peter at powerdot.dk
Fri Nov 3 15:40:48 CET 2006

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


Chris,
Thanks for you fast answers, it is working now.

I did the following:

drbd642:~# /etc/init.d/drbd stop
Stopping all DRBD resources.
drbd642:~# drbdadm create-md r0

Valid meta-data already in place, recreate new?
[need to type 'yes' to confirm] yes

Creating meta data...
initialising activity log
initialising bitmap (208844 KB)
100%
New drbd meta data block sucessfully created.
drbd642:~# /etc/init.d/drbd start
Starting DRBD resources:    [ d0 s0 n0 ].
drbd642:~# drbdsetup /dev/drbd0 primary -o
drbd642:~# cat /proc/drbd
version: 8.0pre5 (api:84/proto:83)
SVN Revision: 2481M build by root at drbd64, 2006-11-01 16:42:55
 0: cs:Connected st:Primary/Secondary ds:UpToDate/Diskless r---
    ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0
        resync: used:0/31 hits:0 misses:0 starving:0 dirty:0 changed:0
        act_log: used:0/127 hits:0 misses:0 starving:0 dirty:0 changed:0

-------------
testing
on "Primary"

drbd642:~# mkfs.ext3 /dev/drbd0
drbd642:~# mkdir -p /data; mount /dev/drbd0 /data && touch /data/been_there
drbd642:~# umount /data && drbdadm secondary all

On "secondary"
drbd64:~# drbdadm primary all
drbd64:~# mkdir -p /data; mount /dev/drbd0 /data && ls -l /data
-rw-r--r-- 1 root root     0 2006-11-03 15:10 been_there
drwx------ 2 root root 16384 2006-11-03 15:09 lost+found

-------------

thanks alot, and have a nice weekend

Peter

Christopher Hawkins wrote:

> > -----Original Message-----
>  
>
>>From: drbd-user-bounces at linbit.com 
>>[mailto:drbd-user-bounces at linbit.com] On Behalf Of Peter Bagger
>>Sent: Friday, November 03, 2006 8:39 AM
>>To: Drbd-Users
>>Subject: Re: [DRBD-user] DRBD in Diskless/Inconsistent state, 
>>can't changestate to Primary
>>
>>Thanks,
>>
>>I has tried it, but i still won't come into primary
>>
>>drbd64:~# drbdsetup /dev/drbd0 primary -o State change 
>>failed: (-2) Refusing to be Primary without at least one UpToDate disk
>>
>>Peter
>>
>>
>>Christopher Hawkins wrote:
>>
>>    
>>
>>>--do-what-I-say seems to be deprecated now. Try "drbdsetup 
>>>      
>>>
>>/dev/drbd0 
>>    
>>
>>>primary -o"
>>>and for more details look at the -o paramter in the 
>>>      
>>>
>>drbdsetup man page. 
>>    
>>
>>>Chris
>>>      
>>>
>I would also try:
>drbdadm create-md r0
>on the secondary machine (the one without any valid data). This will mark it
>as a sync target, no questions asked, and may help the other node with
>becoming primary. However, I just looked at your log files and it appears
>that drbd cannot see the underlying device. Your node is diskless, and I
>think you to be "inconsistent" before the primary -o will work. Perhaps you
>need to run drbd create-md r0 on the node you are working on? You have to do
>that to create the initial metadata before drbd can do anything with the
>device. 
>
>Chris
>
>_______________________________________________
>drbd-user mailing list
>drbd-user at lists.linbit.com
>http://lists.linbit.com/mailman/listinfo/drbd-user
>
>
>  
>




More information about the drbd-user mailing list