Zero DRBD metadata before creation
Zero DRBD metadata before creation

The docstring of the DRBD8 class says:

  … The meta device is checked for valid size and is zeroed on create.

which is not done today, hence we have
http://code.google.com/p/ganeti/issues/detail?id=182:

  node1# mkreiserfs -f /dev/xenvg/t8
  …
  ReiserFS is successfully created on /dev/xenvg/t8.
  node1# drbdmeta --force /dev/drbd256 v08 /dev/xenvg/t8 0 create-md
  md_offset 0
  al_offset 4096
  bm_offset 36864

  Found reiser filesystem

  This would corrupt existing data.
  If you want me to do this, you need to zero out the first part
  of the device (destroy the content).
  You should be very sure that you mean it.
  Operation refused.

I've tested and even just 1MB is enough to wipe the meta, but let's be
safer and pass a 'clean' meta to drbd.

Note: I didn't copy _WipeDevice from backend.py since it seemed more
complex than needed here.

Signed-off-by: Iustin Pop <acf83a5274f31a43af6b914614365999469c1a31@google.com>
Reviewed-by: Michael Hanselmann <68b67885ff74281219b4a4be33cc20fd45078d7c@google.com>

dimara/ganeti,apyrgio/ganeti,dimara/ganeti,yiannist/ganeti,ganeti/ganeti,onponomarev/ganeti,ganeti-github-testing/ganeti-test-1,mbakke/ganeti,leshchevds/ganeti,apyrgio/snf-ganeti,ganeti/ganeti,mbakke/ganeti,bitemyapp/ganeti,onponomarev/ganeti,yiannist/ganeti,andir/ganeti,grnet/snf-ganeti,mbakke/ganeti,grnet/snf-ganeti,andir/ganeti,yiannist/ganeti,leshchevds/ganeti,leshchevds/ganeti,apyrgio/snf-ganeti,bitemyapp/ganeti,ganeti-github-testing/ganeti-test-1,apyrgio/ganeti,andir/ganeti,ganeti/ganeti