[DRBD-user] Splitting DRBD

Stefan Lesicnik stefan at lsd.co.za
Tue Dec 11 05:39:28 CET 2007

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


Hi All,

I have a drbd node running primary / secondary and I wanted to do a 
migration from vmware to virtualbox.

I didnt have a backup of the data (approx 60gig), so i wanted to 'split' 
the drbd device so it was out of sync, perform the work, and if it 
failed, i would sync from the secondary over the primary.

Is this a normal thing to do? Are there any problems with this way of 
doing this? And lastly, is there a documented procedure for this?

I did the following

on the primary

1. stop vmware
2. umount partions on the device
3. drbdadm secondary r0
check both sides are secondary (cat /proc/drbd)

on the secondary

1. drbdadm disconnect r0
this should force the secondary into standalone mode.

on the primary

1. drbdadm -- --overwrite-data-of-peer primary all
This brought the primary into primary mode so i could mount it and 
perform the work.
the migration was succesful and after some testing

on the secondary

1. drbdadm connect r0
and it proceeded to resync the device
If it would of failed, i presume i would of

on the primary

1. drbdadm secondary r0
2. drbdadm invalidate r0

on the secondary

1. drbdadm -- --overwrite-data-of-peer primary all
2. drbdadm connect r0  
(unsure about this order, i may need to connect first. The crucial step 
should be the invalidate so it doesnt resync)


Have a summarised this correctly?  Is there a better way of doing this. 
The drbdadm -- --overwrite-data-of-peer primary all is a little bit 
misleading as a command line option in this case, because I def. dont 
want it to overwrite the peer, but just want to force it online without 
its peer.

thanks in advance for input

stefan

-- 
Stefan Lesicnik

Linux System Dynamics

mail: stefan at lsd.co.za
tel : +27 11 704 0085
cell: +27 84 951 9321
gpg : http://www.lsd.co.za/files/keys/stefan.gpg.pub




More information about the drbd-user mailing list