[DRBD-user] how to retain the data in the partition for initial setup for DRBD

Cindy KS TOH kstoh at dlsjubm.com.my
Sat May 2 11:16:36 CEST 2009

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


Dear Stefan,

Thanks for the speeding respond. Below is my drbd.conf, i am actually 
using the external metadata. Just not sure how should i proceed. my 
steps are,

1. #dd if=/dev/zero of=/dev/VolGroup00/LogVol02
2. #drbdadm create-md all
3. #modprobe drbd
4. #drbdadm attach all
5. #drbdadm connect all
6. #cat /proc/drbd
7. #drbdadm -- --overwrite-data-of-peer primary all

normally later will be #mkfs.ext3 /dev/drbd0 and #tune2s -c -1 -i 0 
/dev/drbd0
if i want to keep my data from being formated, then does it mean i 
should skip the #mkfs.ext3 /dev/drbd0 and #tune2fs -c -1 -i 0 
/dev/drbd0  ??  and straight away do the #mount -o rw /dev/drbd0 /data  ??

-----
global {
   usage-count yes;
}
common {
  protocol C;
  handlers {
    pri-on-incon-degr "echo o > /proc/sysrq-trigger ; halt -f";
    pri-lost-after-sb "echo o > /proc/sysrq-trigger ; halt -f";
    local-io-error "echo o > /proc/sysrq-trigger ; halt -f";
    outdate-peer "/usr/lib/heartbeat/drbd-peer-outdater -t 5";
  }
  startup {
    wfc-timeout       60;   ## 0 = Infinite! 30 = 30 seconds
    degr-wfc-timeout  120;  ## 2 minutes.
  }
  disk {
    on-io-error detach;
  }
  net {
     after-sb-0pri disconnect;
     after-sb-1pri disconnect;
     after-sb-2pri disconnect;
     rr-conflict disconnect;
  }
  syncer {
  rate 100M;
  al-extents 1009;
  }
}
resource r0 {
    device     /dev/drbd0;
    disk       /dev/VolGroup00/LogVol03;
    meta-disk  /dev/VolGroup00/LogVol02[0];
  on f10-1 {
    address   10.0.0.1:7788;
  }
  on f10-2 {
    address   10.0.0.2:7788;
  }
}
resource r1 {
    device    /dev/drbd1;
  disk    /dev/VolGroup00/LogVol04;
  meta-disk    /dev/VolGroup00/LogVol02[1];

  on f10-1 {
    address      10.0.0.1:7789;
  }
  on f10-2 {
    address   10.0.0.2:7789;
  }
}

Warm Regards,
Cindy KS TOH




Stefan Seifert wrote:
> On Saturday, 02. May 2009, Cindy KS TOH wrote:
>   
>> Hi,
>>
>> I have a question that has bugged me ever since i come across and start
>> using DRBD+HA.
>> And I do really need help getting some answers regarding to it. Maybe
>> it's already asked by someone else or all the time but i can seems to
>> find it.
>> Anyway.. my question is, can i retain my original data in partition from
>> before i setup DRBD?
>>     
>
> The DRBD user's guide gives very good answers to such questions:
> http://www.drbd.org/users-guide/ch-configure.html#s-prepare-storage
>
> For me the user's guide is a must read anyway. It's one of the best examples 
> of how documentation should be like and makes a complex thing like DRBD very 
> manageable.
>
> Regards,
> Stefan
>
>
>   




More information about the drbd-user mailing list