[DRBD-user] possible incorrect size of resource

Lars Ellenberg lars.ellenberg at linbit.com
Sun Jan 13 13:49:29 CET 2013

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


On Sat, Jan 12, 2013 at 10:15:18PM +0000, Robin Kearney wrote:
> Hi,
> 
> I've installed drbd version 8.3.13 on a couple of machines running centos
> 5.8. I already have data on a logical volume on the primary and I had no
> space for a meta disk, so I've done the following:
> 
> * umount my data LV
> * full fsck of the LV
> * resize it down by 1GB
> * mount it successfully and write to it for a few days without error
> 
> And then I created a second 1GB LV out of the same VG for later use as the
> drbd meta disk.
> 
> And then tonight I did the following:
> 
> * unmounted my LV
> * configured drbd to use meta data on a second LV (created out of the 1GB
> now free in the VG)


And exactly *how* did you configured drbd to do so?
I guess you used the "indexed fixed size meta data"?
	meta-disk /dev/whatever[0];
That tells DRBD to use the first (index [0]) 128 MiB of that device
as its meta data.
128 MiB (minus a few sectors) of bitmap
is just enough for about 4 TiB of backend storage.
Which is what you are describing below.

You want
	flexible-meta-disk /dev/whatever;
No index there, it uses as much of that device as is available
respectively necessary to cover the backend device.

One GiB of bitmap is enough to cover 32 TiB of backend storage.

> * setup both primary and secondary
> * started the syncing in the correct direction.
> 
> At this point everything looked good (watching /proc/drbd). I'm using
> protocol A and the sync is going to take a few days.
> 
> Then I tried to mount /dev/drbd1 and use it, the mount worked ok but
> writing to it changed it to be RO.
> 
> A bit of poking around shows that a fdisk -l of /dev/drbd1 shows a very
> different size to that of the underlying LV:
> 
> [root at nhr-b02 /]# fdisk -l /dev/DataVG01/DataLV01
> 
> Disk /dev/DataVG01/DataLV01: 5988.1 GB, 5988119740416 bytes
> 255 heads, 63 sectors/track, 728014 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
> 
> Disk /dev/DataVG01/DataLV01 doesn't contain a valid partition table
> [root at nhr-b02 /]# fdisk -l /dev/drbd1
> 
> Disk /dev/drbd1: 4396.8 GB, 4396838551552 bytes
> 255 heads, 63 sectors/track, 534551 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
> 
> Disk /dev/drbd1 doesn't contain a valid partition table
> 
> As you can see the drbd device is 1.5TB less than the underlying LV!
> 
> [root at nhr-b02 /]# lvdisplay  /dev/DataVG01/DataLV01
>   --- Logical volume ---
>   LV Name                /dev/DataVG01/DataLV01
>   VG Name                DataVG01
>   LV UUID                YoBNvQ-IP2p-tCh8-6rwp-emaq-QVYo-nrw4sI
>   LV Write Access        read/write
>   LV Status              available
>   # open                 1
>   LV Size                5.45 TB
>   Current LE             1427679
>   Segments               1
>   Allocation             inherit
>   Read ahead sectors     auto
>   - currently set to     256
>   Block device           253:2
> 
> This is the meta disk device, 1GB
> 
> [root at nhr-b02 /]# lvdisplay  /dev/DataVG01/DataLV01-meta
>   --- Logical volume ---
>   LV Name                /dev/DataVG01/DataLV01-meta
>   VG Name                DataVG01
>   LV UUID                hGkn51-vxpj-fz9N-t2Lh-GDOL-9nwe-PELT95
>   LV Write Access        read/write
>   LV Status              available
>   # open                 1
>   LV Size                1.00 GB
>   Current LE             256
>   Segments               1
>   Allocation             inherit
>   Read ahead sectors     auto
>   - currently set to     256
>   Block device           253:3
> 
> Does anybody know what is likely to cause this? I've halted the sync until
> I can figure this out!
> 
> r.

> _______________________________________________
> drbd-user mailing list
> drbd-user at lists.linbit.com
> http://lists.linbit.com/mailman/listinfo/drbd-user


-- 
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com

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



More information about the drbd-user mailing list