[DRBD-user] File sys size?
chris.procter at openminds.co.uk
Fri Jan 6 18:26:22 CET 2006
On Friday 06 January 2006 13:40, Chip Burke wrote:
> Between two drbd file systems, seeing that they are essentially mirrors of
> each other and this is a block device , am I to assume the two file systems
> need to be identical sizes?
The size of a filesystem is held on disk as part of its superblock. DRBD
replicates the entire partition including this superblock so when you do the
initial resync for the partition you end up with a filesystem on the target
that is exactly the same size as that on the source.
This means that if you have a 1GB partiton on system A, and a 2GB partiton on
system B, you create a filesystem on system A and mirror it to system B using
DRBD you result in a 1GB filesystem on a 1GB partition on system A, and a 1GB
filesystem on a 2GB partition on system B (with the other 1GB essentially
wasted). This is fine, as is the case where the two partitions are exactly
the same size, however if the system A filesystem is bigger then the system B
partition it will all appear to work, but when you switch the mirror round
and try to mount it on system B you get an error ("filesystem is bigger then
I've had this happen several times because fdisk creates different size
partitions depending on how its feeling, creating a 1GB partition on system A
sometimes results in a a few blocks smaller partition then a 1GB on system B.
Probably a rounding error somewhere in fdisk, but means you have to go back,
repartition and resync the data again.
More information about the drbd-user