!! IMPORTANT !! If you are using a kernel old than 2.2.18 please read the relevent section below. The makefile in this directory will attempt to create an LVM patch for your kernel. This patch will be suitable for applying to a clean kernel from Linus. The kernels supplied with popular distributions (eg, RedHat) are not Linus kernels. If you are not familiar with patching or building the kernel then consider looking for pre-built binaries of LVM. Creating the patch ------------------ o Check the following variables at the top of 'Makefile' in the PATCHES subdirectory of your lvm build directory. If these are not correct then you probably didn't pass the correct values to configure. KERNEL_DIR should point to the kernel source that you wish to patch eg, KERNEL_DIR=/usr/src/linux LVM_VERSION the LVM version eg, LVM_VERSION=1.0.1 KERNEL_VERSION the version of your kernel that is to be patched eg, KERNEL_VERSION=2.2.18 o Apply raw_io patch if you're using a 2.2 kernel (see below). o type 'make', a file of the form lvm--.patch should be built Applying the patch to a 2.4 kernel ---------------------------------- linux-2.4 contains LVM already so the patch for these kernels does little more than update the lvm source files. You only need to apply the one patch. eg, cd /usr/src/linux patch -p1 < /home/joe/develop/LVM/PATCHES/lvm-1.0-2.4.9.patch Applying the patch to a 2.2 kernel ---------------------------------- LVM requires Stephen Tweedie's raw_io patch to work under linux-2.2, we have included versions of this patch for various kernel releases (linux-2.2.*-rawio.patch). However we do not guarantee that this is the most up to date version. See ftp://ftp.kernel.org/pub/linux/kernel/people/sct/raw-io/ This patch must be applied before you make the LVM patch. eg, cd /usr/src/linux patch -p1 < /home/joe/develop/LVM/PATCHES/linux-2.2.18-rawio.patch cd /home/joe/develop/LVM/PATCHES make cd /usr/src/linux patch -p1 < /home/joe/develop/LVM/PATCHES/lvm-1.0-2.2.18.patch Kernels older than 2.2.18 ------------------------- The patches have only been tested with kernels 2.2.18 and 2.4.0 at the moment. If you are using a kernel earlier than 2.2.18 you will not be able to build the patch successfully. Copying the 2.2.18 fragments file to a file named after your kernel and trying again will produce a patch that may work (almost certain for 2.2.17 less likely for 2.2.14). eg, cp fragments-2.2.18 fragments-2.2.16 make If you try this and manage to produce an acceptable patch please tell us (linux-lvm@sistina.com or thornber@sistina.com) so we can update this document. Software RAID issues -------------------- ** The Makefile in the PATCHES directory no longer automatically spots new raid ** There appear to be two commonly used implementations of software raid for 2.2 kernels, the one in the kernel and the one found here (referred to as 'new raid' from now on): ftp://ftp.kernel.org/pub/linux/kernel/people/mingo/raid-patches/ Which is used in many distributions. If you wish to use the new raid you should apply the new raid patch before you configure lvm and build the lvm patch. Also you will have to edit the fragments file for you kernel (eg, fragments-2.2.18) to point to fragments/generic-map-raid-2.2.19-A1.patch rather than the usual fragments/generic-map-2.2.patch *** WARNING: Practically no testing has been done with this new raid patch. If you do use this patch could you please provide feedback to linux-lvm@sistina.com or mail me directly at thornber@sistina.com eg, cd /usr/src/linux patch -p1 < /home/joe/develop/LVM/PATCHES/linux-2.2.18-rawio.patch patch -p1 < ~/raid-2.2.18-B0.patch cd /home/joe/develop/LVM/ configure cd PATCHES make cd /usr/src/linux patch -p1 < /home/joe/develop/LVM/PATCHES/lvm-1.0-2.2.18RAID.patch Support ------- If you have any problems please report them to the linux-lvm@sistina.com mailing list.