[DRBD-user] How can I use an existing filesystem in drbd?

梁德刚 liangdegang at vv8.com
Wed Sep 1 06:07:20 CEST 2010

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 2 host : one is centstandby , another is centmaster.

On centstandby  : /dev/sdc is empty and not parted yet.
On centmaster : /dev/sdc1 and /dev/sdc2 is formatted as ext3 , and there are some files on /dev/sdc1 and /dev/sdc2 .
[root at centmaster drbd]# fdisk -l /dev/sdc
Disk /dev/sdc: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1         300     2409718+  83  Linux
/dev/sdc2             301        1044     5976180   83  Linux


I configured centmaster as primary and centstandby as secondary ,  using internal meta data ( meta-disk  /dev/sdd1[0] ): 
resource r3 {
  startup {
    degr-wfc-timeout 120;
     }
  disk {
    on-io-error   detach;
      }
  net {
    cram-hmac-alg sha1;
    shared-secret "FooFunFactory";
  }
  syncer {
    rate 100M;
  }
  on centmaster {
    device     /dev/drbd3;
    disk       /dev/sdc;
    address    10.1.1.21:7791;
    meta-disk  /dev/sdd1[0];
  }
  on centstandby {
    device    /dev/drbd3;
    disk      /dev/sdc;
    address   10.1.1.22:7791;
    meta-disk  /dev/sdd1[0];
  }
}

when I start drbd both server and execute fdisk on /dev/drbd3 : 
[root at centmaster ~]# fdisk -l /dev/drbd3
Disk /dev/drbd3: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
      Device Boot      Start         End      Blocks   Id  System
/dev/drbd3p1               1         300     2409718+  83  Linux
/dev/drbd3p2             301        1044     5976180   83  Linux
[root at centmaster ~]#

I know that /dev/drbd3p1 = /dev/sdc1 and /dev/drbd3p2 = /dev/sdc2 , 
but there is no drbd3p1 or drbd3p2 in the /dev directory and I cannot mount /dev/drbd3p1 or /dev/drbd3p1 . 
Anyone can tell me how to use /dev/drbd3p1 and /dev/drbd3p2 ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linbit.com/pipermail/drbd-user/attachments/20100901/b9c129b3/attachment.htm>


More information about the drbd-user mailing list