[DRBD-user] What is the correct way to configure partitions for DRBD?

Daniele Visaggio visaggio.daniele at gmail.com
Thu Aug 13 23:14:20 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.


Il giorno ven, 14/08/2009 alle 09.03 +1200, Adam Taylor ha scritto:
> Hi Daniele,
> 
> I would remove them from the fstab file for starters (The secondary should
> not be mounting the drbd drive  until drbd/heartbeat switches to primary.)
> The drive should be unmounted prior to the initial install.  This is the
> method that I have used for creating/mounting the drives:
> 
> 1. Create a partition using fdisk (remember partitions on both servers
> *MUST* be of identical block size, I learnt the hard way :) )
> 2. Install drbd rpms or source
> 3. Edit the drbd.conf file to suite your environment
> 4. Run the following commands on both PRIMARY AND SECONDARY to create the
> drbd disk:
> 
> drbdadm create-md r0    (r0 is the name of the drbd resource)
> drbdadm attach r0
> Drbdadm connect r0
> mkdir /data   (/data is the name of the filesystem that I will be mounting
> to the drbd partition, obviously call this whatever you like :) )
> 
> 
> 5. ONLY ON THE PRIMARY run the following commands:
> 
> drbdadm -- --overwrite-data-of-peer primary r0
> Mkfs -t ext3 /dev/drbd1
> Mount /dev/drbd1 /data
> 
> 
> That should be it. If you have any problems let me know.
> 
> Cheers
> 
> Adam
> 
> 
Thank you very much, now it's clear to me. 

Kind Regards - Daniele




More information about the drbd-user mailing list