[DRBD-user] DRBD over an existing filesystem

En Chiang Lee ena at india.hp.com
Fri Mar 26 10:28:39 CET 2004


Hi Lars,

Using DRBD over an existing fs seems to work with fs size <1G. Here are
the sizes I tried:

512M (fs block size = 1024) -- fsck works fine
1G (fs block size = 4096) -- fsck fails with mismatched sizes
1G (fs block size = 1024) -- fsck fails with mismatched sizes

In all these cases, meta-disk is another partition (i.e. not internal)

Regards,

En Chiang

On Fri, 2004-03-26 at 14:11, En Chiang Lee wrote:
> Hi Lars,
> 
> I changed the drbd.conf to:
> 
>   on dlssi3 {
>     device=/dev/nbd/0
>     disk=/dev/hde2
>     address=15.70.191.200
>     port=7788
>     meta-disk=/dev/hde5
>     meta-index=0
>   }
> 
> where /dev/hde2 is 10G and /dev/hde5 is 1G. I'm attaching a file with
> the output of starting the drbd device and the fsck failure. Also
> attached is the drbd.conf. Note that the second node has not been
> started at this point.
> 
> What am I doing wrong?
> 
> En Chiang
> 
> On Thu, 2004-03-25 at 22:02, Lars Ellenberg wrote:
> > / 2004-03-25 20:09:41 +0530
> > \ En Chiang Lee:
> > > Hi,
> > > 
> > > I was trying to mirror an existing ext3 filesystem using drbd to another
> > > node in an OpenSSI cluster, so I associated /dev/nbd/0 with /dev/hde2.
> > > 
> > >   on dlssi3 {
> > >     device=/dev/nbd/0
> > >     disk=/dev/hde2
> > >     address=15.70.191.200
> > >     port=7788
> > >     meta-disk=internal
> >                 ^^^^^^^^
> > 
> > >     meta-index=-1
> > >   }
> > > 
> > > With this, I am able to mount the filesystem. However, when I try fsck
> > > on /dev/nbd/0, I get the following error:
> > > 
> > > [root at dlssi3 root]# fsck /dev/nbd/0
> > > fsck 1.32 (09-Nov-2002)
> > > e2fsck 1.32 (09-Nov-2002)
> > > /: recovering journal
> > > The filesystem size (according to the superblock) is 2560351 blocks
> > > The physical size of the device is 2527583 blocks
> > > Either the superblock or the partition table is likely to be corrupt!
> > > Abort<y>? yes
> > 
> > > (2560351-2527583) * (4K blocks) == 128 M
> > 
> > you pretty likely already corrupted the underlying filesystem
> > (at least the last 128M of it).
> > 
> > If you want to have "meta-disk=internal",
> > the right way to go is to create the filesystem on the /dev/nbd/0,
> > then it will get the right size.
> > 
> > 
> > > In the archives, there is mention of using "size=<somesize>", but that
> > > is deprecated according the the sample drbd.conf. (If I was to use size=
> > > how would the value be specified? fs blocks? GB?)
> > 
> > the size parameter is in 1K, but also takes M and G as unit modifiers.
> > 
> > > I'm trying this with drbd-0.7_pre5.
> > > 
> > > How would I go about using drbd on an existing file system?
> > 
> > You can have the meta data in some other device (not internal), and
> > adjust the meta-disk and meta-index accordingly.
> > 
> > OR you can resize (shrink) the file system first.
> > *BEFORE* the last 128M of the device get overwritten with bitmap data.
> > 
> > 	Lars Ellenberg
> > _______________________________________________
> > drbd-user mailing list
> > drbd-user at lists.linbit.com
> > http://lists.linbit.com/mailman/listinfo/drbd-user
> > 




More information about the drbd-user mailing list