[DRBD-user] [DRBD 8.3] How to Escape from full sync at UUID-Gen miss-match.

Takeshi Yahagi yahagi at tgi.co.jp
Fri Jul 8 10:54:34 CEST 2016

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


Hi,

I have many 10TB Volume to sync by DRBD.
And now, I have a few DRBD resource under UUID-Gen miss-match.

The bitmap on DRBD meta-data can be believed, I think.

So, I make steps to sync the DRBD Resource without full sync.

Is this right?

-------------------------
Unfortunately, the DRBD pair can not be sync. But, the bitmap on primary
side is factly pointed modified block.
Steps for repair DRBD Sync without Full sync!!

Step1: Down the DRBD pair
Step2: BackupDRBD Metadata [Bitmap must be saved]
Step3: Create New Metadata
Step4: Connect and Sync DRBD Resource Info and disconnect.
Step5: Porting BitMap from backup
Step6: re-connect

-------------------------
@@@@@@@@@@@@@@@@@@@@@@@@
Step1: Down the DRBD pair

[root at Primary tmp#] drbdadm down <resource>
[root at Secondary tmp#] drbdadm down <resource>

The Status of DRBD Resource on /proc/drbd must be "Unconfigured"
[root at Primary tmp#] cat /proc/drbd
version: xxx .
GIT-hash: xxx .
             :
 x: cs:Unconfigured
[root at Secondary tmp#] cat /proc/drbd
version: xxx .
GIT-hash: xxx .
             :
 x: cs:Unconfigured


  <<Note>>
   [Note] "[root at Primary tmp#]" is the prompt of account "root" on Primary
Site. 
   [Note] "[root at Secondary tmp#]" is the prompt of account "root" on
Secondary Site. 


@@@@@@@@@@@@@@@@@@@@@@@@
Step2: BackupDRBD Metadata [Bitmap must be saved]

[root at Primary tmp#] drbdadm dump-md drbd1 <resource>   > pri_meta.save
[root at Secondary tmp#] drbdadm dump-md drbd1 <resource>  > sec_meta.save


@@@@@@@@@@@@@@@@@@@@@@@@
Step3: Create New Metadata

[root at Primary tmp#] drbdadm create-md <resource>
[root at Secondary tmp#] drbdadm create-md <resource>


@@@@@@@@@@@@@@@@@@@@@@@@
Step4: Connect and Sync DRBD Resource Info and disconnect.


[root at Primary tmp#] drbdadm -- 6::::1 set-gi <resource>
[root at Secondary tmp#] drbdadm -- 6::::1 set-gi <resource>
[root at Primary tmp#] drbdadm up <resource>
[root at Secondary tmp#] drbdadm up <resource>
[root at Primary tmp#] cat /proc/drbd
     ** Make sure "Connected    Update:Update"**
[root at Primary tmp#] drbdadm down <resource>
[root at Secondary tmp#] drbdadm down <resource>


@@@@@@@@@@@@@@@@@@@@@@@@
Step5: Porting BitMap from backup

[root at Secondary tmp#] drbdadm dump-md <resource>   > snd_meta.now
[root at Secondary tmp#] cp  snd_meta.now snd_meta.new 
[root at Secondary tmp#] sed -i -r -e 's/0xF{16}/0x0000000000000000/g'
snd_meta.new
[root at Secondary tmp#] diff snd_meta.now snd_meta.new
   Check the difference only on bm{} section.
[root at Secondary tmp#] drbdadm -d dump-md <resource>
   drbdmeta <?> v08 <??????> internal dump-md
[root at Secondary tmp#] drbdadm <?> v08 <??????> internal restore-md
snd_meta.new

[root at Primary tmp#] drbdadm dump-md <resource>   > pri_meta.now
[root at Primary tmp#] cp pri_meta.now pri_meta.new
[root at Primary tmp#] vi pri_meta.new  (<= Porting BitMap on pri_meta.save
that saved at Step2)
[root at Primary tmp#] drbdadm -d dump-md <resource>
      drbdmeta <?> v08 <??????> internal dump-md
[root at Primary tmp#] drbdadm <?> v08 <??????> internal restore-md
pri_meta.new

@@@@@@@@@@@@@@@@@@@@@@@@
Step6: re-connect
[root at Secondary tmp#] drbdadm up <resource>
[root at Primary tmp#] drbdadm up <resource>
      The DRBD Connect State is "Connected UpToDate:UpToDate"
[root at Primary tmp#] drbdadm primary <resource>
[root at Primary tmp#] drbdadm disconnect <resource>
[root at Primary tmp#] drbdadm connect <resource>
      The DRBD Resource begin to sync only block with bit=1





More information about the drbd-user mailing list