[DRBD-user] Incorect size of replicated volume (more than >4TB) under 32bit kernel and DRBD 8.3.0
Lars Ellenberg
lars.ellenberg at linbit.com
Fri Jan 23 17:21:32 CET 2009
On Fri, Jan 23, 2009 at 05:41:08AM -0800, adikx wrote:
>
> Hi all,
>
> I have a problem with DRBD status under 32bit kernel, it shows incorrect
> size of replicated volume (555304 M
> ) where the real size of the volume is 4,6 TB.
>
> I noticed that when size remaining to replicate comes to zero it starts to
> count from 4,1 TB and replication isn't interupted. After all volume is
> replicated correctly.
> Under 64bit version of kernel problem doesn't exist.
>
> Is there any solution to fix this problem ?
>
> Thanks.
>
> Tested on:
> Drbd 8.3.0 + Kernel 2.6.27.10 32bit & 2.6.27.10 64bit
>
> Before size remaining to replicate comes to zero:
> # cat /proc/drbd
> 0: cs:SyncSource ro:Primary/Secondary ds:UpToDate/Inconsistent C r---
> ns:202228488 nr:0 dw:2109 dr:214523901 al:2 bm:13092 lo:58 pe:533
> ua:2015 ap:0 ep:1 wo:b oos:366405528
> [>....................] sync'ed: 4.2% (357817/555304)M
> finish: 6:43:03 speed: 192,744 (166,988) K/sec
>
> After size remaining to replicate comes to zero:
> #cat /proc/drbd
> 0: cs:SyncSource ro:Primary/Secondary ds:UpToDate/Inconsistent C r---
> ns:568725512 nr:0 dw:2109 dr:581020545 al:2 bm:35461 lo:147 pe:52
> ua:2009 ap:0 ep:1 wo:b oos:4294873876
> [=>..................] sync'ed: 11.7% (4194212/555304)M
> finish: 5:24:11 speed: 220,468 (167,616) K/sec
try this:
diff --git a/drbd/drbd_proc.c b/drbd/drbd_proc.c
index c8593a7..3415480 100644
--- a/drbd/drbd_proc.c
+++ b/drbd/drbd_proc.c
@@ -79,8 +79,8 @@ STATIC void drbd_syncer_progress(struct drbd_conf *mdev, struct seq_file *seq)
/* if more than 1 GB display in MB */
if (mdev->rs_total > 0x100000L)
seq_printf(seq, "(%lu/%lu)M\n\t",
- (unsigned long) Bit2KB(rs_left) >> 10,
- (unsigned long) Bit2KB(mdev->rs_total) >> 10);
+ (unsigned long) Bit2KB(rs_left >> 10),
+ (unsigned long) Bit2KB(mdev->rs_total >> 10));
else
seq_printf(seq, "(%lu/%lu)K\n\t",
(unsigned long) Bit2KB(rs_left),
--
: 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