[DRBD-user] Upgrade 0.7 to 8.2 fails when using LVM

Lars Ellenberg lars.ellenberg at linbit.com
Mon Sep 1 17:20:06 CEST 2008

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


On Mon, Sep 01, 2008 at 03:30:34PM +0200, Matthias Weigel wrote:
> Hi,
>
> I use drbd 0.7 for some years and want to upgrade to drbd 8.2.
>
> My setup:
>
> ext3->lvm2->drbd->md->sd
>
> On a test machine i get this error when i try to convert the 0.7  
> metadata to 8.2 format:
>
> #drbdadm create-md fthdisk2
> v08 Magic number not found
> md_offset 1069150208
> al_offset 1069117440
> bm_offset 1069084672
>
> Found LVM2 physical volume signature
> Device size would be truncated, which
> would corrupt data and result in
> 'access beyond end of device' errors.
> 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.
>
> Command 'drbdmeta /dev/drbd0 v08 /dev/md7 internal create-md' terminated  
> with exit code 40
> drbdadm aborting
>

too much paranoia on my part makes drbdmeta refuse to create (which is
ok) or convert (which should be allowed, but is not, unfortunately)
meta data on a partition where an LVM physical volume signature is
detected.

as a work-around, you can 

(please double check for typos! it is your data!)

  dd if=/dev/md7 iflag=direct bs=1M count=1 of=md7.1M.backup
  sync
  dd if=/dev/zero of=/dev/md7 bs=1M count=1 oflag=direct
  
  drbdmeta /dev/drbd0 v08 /dev/md7 internal create-md
  
  drbdadm primary fthdisk2
  
  dd if=md7.1M.backup of=/dev/drbd0 bs=1M count=1

or, if you feel more comfortable,
hack the drbdmeta source code to not refuse...

sorry for that.

-- 
: Lars Ellenberg                
: LINBIT HA-Solutions GmbH
: DRBD®/HA support and consulting    http://www.linbit.com

DRBD® and LINBIT® are registered trademarks
of LINBIT Information Technologies GmbH
__
please don't Cc me, but send to list   --   I'm subscribed



More information about the drbd-user mailing list