[DRBD-user] Replacing larger hard drives while keeping services available?

Leroy van Logchem leroy.vanlogchem at wldelft.nl
Fri Apr 18 11:24:23 CEST 2008

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


>  faced with the issue of needing to replace the current hard-drives 
> with much larger ones and need to do this while keeping the MySQL 
> instance available.

To avoid:
- mixing up the partitions
- tricky filesystem growing
- running out of time during the migration

You could:

1) Make sure the secondary node does not reconnect by:
-- Changing /etc/drbd.conf ip and/or port numbers to none existing ones
-- Disable automatic starting of drbd and heartbeat etc
2) Replace the disks and configure the partitions for drbd usage
-- Perhaps setup seperate metadata
3) Manually get drbd running
-- Force to primary
-- Create the filesystem(s)
-- Mount it
4) Copy the currently running MySQL to your new setup
-- By means of rsync and mysqlhotcopy
-- Change the bind-address so you can test

When it's running fine again then re-enable the service startup and 
prepare the final fail-over:

1) Stop everything on the new setup and get back to the original 
configuration files
2) After a final hotcopy, pull the plug on the old primary
3) Let the new setup start as primary

(this should be scripted to have the smallest gap possible)

Now the server with the smaller disks can be upgraded. Only redo the 
partitioning steps, so skip the mkfs. During the long initial sync you 
might want to limit the bandwidth ( force changing speeds by 
disconnect/reconnect and drbdadm adjust all etc.. verify by watching 
/proc/drbd ).

Goodluck,
Leroy








More information about the drbd-user mailing list