Package: drbd0.7-utils
Version: 0.7.21-4
I have DRBD configuration to set /dev/drbd0 for lower device /dev/hda2 of
size 20GB with metadata stored on special partition /dev/hdb1.
resource drbd0 {
protocol C;
syncer {
rate 5M;
group 1;
}
disk {
on-io-error detach;
}
on host1 {
device /dev/drbd0;
disk /dev/hda2;
address host1-IP:7788;
meta-disk /dev/hdb1[0];
}
on host2 {
device /dev/drbd0;
disk /dev/hda2;
address host2-IP:7788;
meta-disk /dev/hdb1[0];
}
}
When I resize partition hda2 to 10GB and want to use it now, drbdsetup writes
ioctl(,SET_DISK_CONFIG,) failed: Invalid argument
Low.dev. smaller than requested DRBD-dev. size.
The only solution for me is to manually write zeros (using dd) to section of
hdb1 which contains metadata for this drbd.
When I have hdb1 for metadata of more DRBD devices it is very dangerous to
write zeros by the hand IMO.
Is there any other solution how to clean metadata for specific DRBD device or
how to force start drbd device ignoring metadata information and create new
metadata? When there is no other solution than "dd", it would be fine add
another argument to drbdsetup DEV disk to ignore old metadata, overwrite old
metadata, clean old metadata or force device size. For example:
drbdsetup /dev/hdb1 metadata { --clean | --forget | --reset } 0
drbdsetup /dev/drbd0 disk /dev/hda2 /dev/hdb1 0 --force-size NEWSIZE
drbdsetup /dev/drbd0 disk /dev/hda2 /dev/hdb1 0 --update-size
drbdsetup /dev/drbd0 disk /dev/hda2 /dev/hdb1 0 --clean-old-metadata
drbdsetup /dev/drbd0 disk /dev/hda2 /dev/hdb1 0 --overwrite-metadata
drbdsetup /dev/drbd0 disk /dev/hda2 /dev/hdb1 0 --ignore-old-metadata
Running on Debian GNU/Linux 4.0 (Etch), kernel-2.6.18-3-xen-686,
libc6-2.3.6.ds1-8.
Thank you.
Regards.
Robert Wolf.
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]