[DRBD-user] Re: Temporary disable a node

DaLiV DaLiV at apollo.lv
Thu Jan 8 14:01:44 CET 2009

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


mydrbd.mlist wrote:
>
> I have mysql on drbd with heartbeat and dopd.
>
> When I do cold backup on DRBD mysql disk, the sequence is:
>
> 1) Stop mysql service
>
> 2) Do a backup of data on DRBD disk on another dir always on DRBD disk
>
> 3) Start mysql service
>
> mysql service is not running, so shouldn't be problems if I take 
> secondary node down for a while, what you think of this ?
>
why that way of backup is chhosen ?
better use internal backup capability of mysql server, that not need 
server stopping :
so read mysqldump manual for more information ... and decide about 
locking tables, extended insert format and other features ...
examples for each of database:

mysqldump -h 127.0.0.1 -C -u backup_user --password=backup_user_password 
--skip-extended-insert --skip-lock-tables  database1 > db1.sql
mysqldump -h 127.0.0.1 -C -u backup_user --password=backup_user_password 
--skip-extended-insert --skip-lock-tables  database2 > db2.sql

or all together in one dump:

mysqldump -h 127.0.0.1 -C -u backup_user --password=backup_user_password 
--skip-extended-insert --skip-lock-tables  --all-databases > all_dbs.sql

> Can someone tell me what is the best method to add command after poit 
> 1 in backup script so secondary node will be disconnected ?
>
> backup should be faster and at the end of backup I can reconnect 
> secondary and restart mysql service and DRBD resync.
>
temporarily disable synchronization (stop slow down by disable of trying 
network operations to dead node)
drbdadm disconnect all
---
do needed operations on secondary node
---
drbdadm connect all
>
> All this should be on the primary (owner of drbd resource), so I need 
> commands that instruct peer node to disconnect/reconnect.
>
> At reconnection resynchronization should be take place automatically 
> and straightforward.
>
> Thank you.
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> drbd-user mailing list
> drbd-user at lists.linbit.com
> http://lists.linbit.com/mailman/listinfo/drbd-user
>    

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linbit.com/pipermail/drbd-user/attachments/20090108/ec98d5f7/attachment.htm>


More information about the drbd-user mailing list