[DRBD-user] disk size negotiazion and some other questions

Nicola Ranaldo ranaldo at unina.it
Tue Feb 7 09:23:21 CET 2006

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


Hello!
I'm an happy drbd+ heartbeat + vserver user, but now i'm trying to use drbd to 
solve a question different from the cluster approach.

I have the following scenario:

Server A with 300 Gb disk (80Gb used) and Server B with 100 GB of free space 
on a non empty partition.
I should replace the disk with a bigger one of 600 GB,
I do not have free disk slot so i need to migrate data to server B, replace 
the disk and return data to server A with the minor downtime.
I begin to test with a similar scenario with 2 PC

on server A:
* resize_reiserfs of /dev/sdb on Server A to 80Gb
* loop device on a file in /dev/sda for metadata
* umount /dev/sda
* drbdsetup /dev/drbd0 disk /dev/sdb /dev/loop0 0
* drbdsetup /dev/drbd0 primary --do-what-I-Say
* mount /dev/drbd0 and relaunching network services
* drbdsetup /dev/drbd0 net myip otherip A
* drbdsetup /dev/drbd0 syncer --rate 700000k

on server B:

* 2 loop device on a file in /dev/sda on server B for the migration
* drbdsetup /dev/drbd0 disk /dev/loop0 /dev/loop1 0
* drbdsetup /dev/drbd0 net myip otherip A

After a little (40Mb/sec) i have the two partitions synced.
The first problem i found is due disk size, in other threads and on the wiki i 
read disk size is autonegotiated but in my test is fixed on the size of the 
first disk (300GB) and replicates on a disk of 100Gb without warnings and or 
error (drbd 0.7.11)
Is this due do primary force?
On the man i read without a first peer connect i cannot mount /dev/drbd0, but 
in my test i did it.. is this related to primary force too?
And even so why drbd do not check again disk size on the first connect?

The other questions are a little phylosophyc.

In my scenario when i synced the disks i have to deconfigure drbd, launch 
network services on the migrated device on server B, configure new disk on 
server A remigrate data and switching again network services.
Suppose i cannot launch the services on server B for some reasons and i have 
server A with the new disk up and running. During sync of disk on server B to 
the disk on server A i should be able (on A) to munt drdb and to do a 
different type of sync (background sync from B to A, read request from B and 
some read/write optimization/replication). It seems a bitter strange, but 
consider the option to read from B where A gives ioerror is already 
implemented? In a nutshell i'd like to see drbd act as a real network  
optimized raid1 where only one server at a time is able to mount a disk, but 
with two possibile direction of the sync while disks are not consistents and 
autoswitch from active server and passive server. This  could be a simple 
option in a bigger scenario where there will be a bidirectional replication!
May this go on a todo list? :)

Now to last and simpler.
To solve the upper problem (service B cannot start services related to data 
replicated from server A) i think when the drbd disk are consistent i could 
restart server A, switch drbd role and exports the disk on server B with 
iSCSI on server A and restart network services while data are migrating on 
the new 600Gb disk.
It should run! do you know other nice solutions?

Thank you and sorry for my english....

	Nicola Ranaldo





More information about the drbd-user mailing list