DRBD resource data move
Hi all,
I have a two node DRBD + Heartbeat setup. I'm running an email server on them and have sync between the email server storage resource. I need to move this to new disks (15k instead of 7200).
Currently the config is:
/etc/drbd.conf:
global { usage-count no; }
resource MailDataDir {
protocol C;
startup { wfc-timeout 120; degr-wfc-timeout 120; }
disk { on-io-error pass_on; no-disk-barrier; no-disk-flushes; no-disk-drain; }
syncer { rate 2000; al-extents 257; }
net { max-buffers 2048; cram-hmac-alg "sha1"; shared-secret "something-here"; unplug-watermark 2048; }
on server1.x.net { device /dev/drbd0; disk /dev/sdb1; address 10.0.0.11:7788; meta-disk internal; }
on server2.x.net { device /dev/drbd0; disk /dev/sdb1; address 10.0.0.12:7788; meta-disk internal; }
}
/etc/ha.d/ha.cf
keepalive 2
deadtime 30
warntime 10
initdead 30
bcast eth0
node server1.x.net
node server2.x.net
crm no
auto_failback on
respawn hacluster /usr/lib/heartbeat/ipfail
ping 10.0.0.1
stonith_host server2.x.net external/ipmi server1.x.net 10.0.0.10 root something-interesting lan
stonith_host server1.x.net null server2.x.net
/etc/ha.d/haresources
server1.x.net \
drbddisk::MailDataDir \
Filesystem::/dev/drbd0::/var/opt/MailDataDir \
IPaddr2::10.0.0.7/24/eth2 \
mail
Now i made the new disks available for each node as sdc partition sdc1. No filesystem is present on them.
My question is what would be the most elegant method to move the data from the current sdb1 partition to sdc1 and replace the sdb with sdc in the drbd conf?
Right now i'm thinking of defining a separate resource for drbd that uses the new disks, sync the /dev/drbd1 (/dev/sdc1) disks between the two nodes and then format sdc1 with ext3 on both nodes. After this stop heartbeat & drbd & mail services, copy the data from the sdb1 to sdc1. After this replace in the config files everything with drbd0 to drbd1 and sdb1 to sdc1, remove the new resource, while keeping only the old one with the new params, then start the resources back up.
Any thoughts?
|