Operating System - Linux
1752781 Members
6185 Online
108789 Solutions
New Discussion юеВ

Re: Question about patching kernel for LVM

 
cx2
Occasional Contributor

Question about patching kernel for LVM

Hi everyone,

I'm trying to install Sistina's LVM onto Redhat 6.2.
I've upgraded my kernel to 2.4.18, and built the LVM patch from the instructions on Sistina's website, but there's a bit that I need some help with.

From http://www.sistina.com/lvm_howtos/lvm_howto/Building_the_kernel_modul.html#SECTION00081000000000000000

I'm having some trouble understanding step 6:

# cd /usr/src/linux ; patch -pX < /directory/lvm-1.0.3-${KERNELVERSION}.patch


The question is, what value should I put in for 'X'? The patch path is:

/home/lvm/LVM/1.0.4/PATCHES/lvm-1.0.4-2.4.18.patch

The other thing that isn't clear, is how to activate LVM - is the vgscan and vgchange -ay all that is needed? Will this convert my current filesystems to LVM?

Thanks in advance for the help :)

cx2
4 REPLIES 4
Kodjo Agbenu
Honored Contributor

Re: Question about patching kernel for LVM

Hello,

Since 2.4.1, LVM is built in the Linux kernel. Therefore, you no more need to apply any patch coming from Sistina.

Recompile your kernel again : when choosing options (make menuconfig or make xconfig), go to "Multi-device support", then enable LVM.

One more thing : you need user-space utils (vgscan, lvchange, etc...). Therefore, you can find a RPM on http://rpmfind.net.

Last remark : don't forget to activate your LVM volumes early during the boot process. If your distro is a RedHat or Mandrake, edit /etc/rc.d/rc.sysinit. Before the swap device activation, insert someting like :

# Start Logical Volume Manager (LVM)
action $"Starting Logical Volume Manager: " vgscan && vgchange -a y


Good luck.

Kodjo
Learn and explain...
cx2
Occasional Contributor

Re: Question about patching kernel for LVM

Thanks Kodjo,

I'd already compiled my kernel with the LVM option, but this seems to be an older version (1.01), so I was thinking of upgrading it to 1.04. Is there any advantage to doing this?

Thanks for the help with the other bits too :)

cxtwo
Kodjo Agbenu
Honored Contributor

Re: Question about patching kernel for LVM

Hello,

In my opinion, no benefit should be expected from upgrading the LVM from 1.0.1 to 1.0.4, except some minor bug fixes.

Personnally, I recently re-installed my PC with RedHat 7.3, with lvm-1.0.3. Formerly, I was using SuSE 7.2 with lvm 1.0.1 without any problem. Of course, all on-disk structures are compatible accross 1.x versions. Even, I guess 0.x lvm data disks can be read with new lvm implementations, but I'm not sure.

For detailed list of changes, I would suggest the documentation generally located in /usr/share/doc/lvm...

Good luck.

Kodjo
Learn and explain...
I_M
Honored Contributor

Re: Question about patching kernel for LVM

Hi

>The question is, what value should I put in for 'X'? The patch path is:

Assuming your kernel source is on /usr/src/linux.
And you have the lvm-patch-file in the same directory.

In the top of the patch file, you find something like this.

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.19p4/Docume
ntation/Changes linux.19pre4-ac2/Documentation/Changes

This patch file expect to find linux.19pre4-ac2/Documentation/Changes.
But in your filesystem, no such directory name under /usr/src.
So you specify "-p1" to remove linux.19pre4-ac2 from the path.

In the online manual, you may find more detail.

Regards,