[DRBD-user] drbd 8.x and kernel-patch, any hope?

Ralph Spada ralph.spada at gmail.com
Sat Jan 6 12:01:00 CET 2007

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


Thank you very much. I'll try the patch and the kernel and I'll let you know!

Best regards,

Ralph

On 1/6/07, Drew Moseley <dmoseley at mvista.com> wrote:
> Ralph Spada wrote:
> > Hi,
> >
> > I'd like to do a DRBD installation on two servers of a customer where
> > it's not allowed to run a modular server for their security policy.
> > I've tried to patch many versions of the 2.6 kernel series (taken from
> > the kernel.org site with no other patch applied), but the make
> > kernel-patch simply fails. I've tried to remove some check from the
> > patch-kernel script (the mempool and hlist checks), the patch is
> > generated but the kernel doesn't compile for missing .h files
> > references & similar problems. I've readed this thread on the mailing
> > list
> > http://thread.gmane.org/gmane.linux.network.drbd/9279/focus=9286
> > and I'd like to know if there is any hope to see a working kernel
> > patch again or if I better start to mess with it myself.
> >
> > Thank you in advance!
> > _______________________________________________
> > drbd-user mailing list
> > drbd-user at lists.linbit.com
> > http://lists.linbit.com/mailman/listinfo/drbd-user
>
> Attached is a patch that I have used to build against 2.6.18.  I have
> not yet done any runtime testing of this setup but the kernels to appear
> to build properly.
>
> Regards,
> Drew
>
>
>
>
> Index: scripts/patch-kernel
> ===================================================================
> --- scripts/patch-kernel        (revision 2654)
> +++ scripts/patch-kernel        (working copy)
> @@ -94,15 +94,16 @@
>  # clean it first
>  make -s -C $DRBD/drbd clean
>  # XXX drbd_config.h probably needs different treatment.
> -cp -a $DRBD/drbd/linux/drbd{,_config}.h       $DRBD_BASE/include/linux/
> +cp -a $DRBD/drbd/linux/drbd*.h                $DRBD_BASE/include/linux/
>  cp -a $DRBD/drbd/{*.[ch],Kconfig}             $DRBD_SUB
>  # and the right in-kernel-tree Makefile
>  cp -a $DRBD/drbd/Makefile-2.$KDIR_PATCHLEVEL  $DRBD_SUB/Makefile
>
>  # remove some backports
> -test "$KDIR_PATCHLEVEL" = 6 && rm $DRBD_SUB/mempool*
> +test "$KDIR_PATCHLEVEL" = 6 && rm -f $DRBD_SUB/mempool*
> +test "$KDIR_PATCHLEVEL" = 6 && rm -f $DRBD_SUB/connector*
>  grep "HLIST_HEAD_INIT" $KERNEL/include/linux/list.h >/dev/null &&
> -       rm $DRBD_SUB/hlist.h
> +       rm -f $DRBD_SUB/hlist.h
>
>  # disable __arch_um__ to_virt() hack
>  sed -e 's/^#ifdef __arch_um__/#if 0/' \
> @@ -111,7 +112,7 @@
>  # and, in case this kernel was already patched:
>  if test -e $KERNEL/include/linux/drbd.h ; then
>         $INCREMENT || fatal "drbd already in $KERNEL"
> -       cp -a $KERNEL/include/linux/drbd{,_config}.h \
> +       cp -a $KERNEL/include/linux/drbd*.h \
>          $KERNEL_BASE/include/linux/
>         cp -a $KERNEL/drivers/block/drbd/{*.[ch],Makefile,Kconfig} \
>          $KERNEL_BASE/drivers/block/drbd/
> Index: drbd/Kconfig
> ===================================================================
> --- drbd/Kconfig        (revision 2654)
> +++ drbd/Kconfig        (working copy)
> @@ -5,6 +5,7 @@
>         tristate "DRBD Distributed replicated block device support"
>         select INET
>         select PROC_FS
> +       select CONNECTOR
>         ---help---
>           Drbd is a block device which is designed to build high availability
>           clusters.  This is done by mirroring a whole block device via (a
> Index: drbd/drbd_nl.c
> ===================================================================
> --- drbd/drbd_nl.c      (revision 2654)
> +++ drbd/drbd_nl.c      (working copy)
> @@ -35,7 +35,7 @@
>  #include <linux/drbd.h>
>  #include <linux/blkpg.h>
>
> -#include <drbd_int.h>
> +#include "drbd_int.h"
>  #include <linux/drbd_tag_magic.h>
>  #include <linux/drbd_limits.h>
>
>
>
>



More information about the drbd-user mailing list