NetAdminTools.com
 
SignalQ Sites:
NetAdminTools - Coprolite - NoNIC - SpotBridge - NAW
RoboCoop - AreWeDown - SolarPower - SysAdminTools
Xfig - Gold Loaf - GeekPapa - FixGMC - MCJ - FixRambler
Categories:
GNU/Linux | Homebrew designs | Perl | Administration | Backup/Recovery | Bugs/Fixes | Certification | Database | Email | File/Print | Hardware | Information Grab Bag | Interoperability | GNU/Linux ABCs | Monitoring | Name Resolution | Network Services | Networking | Remote Control | Security | Desktop | Web | BSD | Solaris | GIAGD | REALbasic

Last 30 Days | Last 60 Days | Last 90 Days | All Articles | RSS | Hail Support


Categories:
·GNU/Linux
·Homebrew designs
·Perl
·Administration
·Backup/Recovery
·Bugs/Fixes
·Certification
·Database
·Email
·File/Print
·Hardware
·Information Grab Bag
·Interoperability
·GNU/Linux ABCs
·Monitoring
·Name Resolution
·Network Services
·Networking
·Remote Control
·Security
·Desktop
·Web
·BSD
·Solaris
·GIAGD
·REALbasic
·All Categories


LVM Support for the Linux 2.4 Kernel - Device Mapper
Topic: GNU/Linux   Posted:2006-06-24
Printer Friendly: Print

spacerspacer

We decided to build a very small box to serve up an iSCSI target using LVM for the storage device. We used the root filesystem from here, which means that we are starting from a very basic system. We are using version 2.4.32 of the Linux kernel. Do consider Openfiler if you have more sophisticated needs. On the other hand, keeping things small, tight, and as independent as possible.

Anyway, we have upgraded the LVM on Red Hat systems before here, and many of the steps of the same; however, there are some differences since LVM didn't exist before we started installing. Two components are needed: device mapper, and the LVM software. Grab device-mapper.1.02.07 from here.

Patch the kernel source tree:

sv-1# tar -xzf device-mapper.1.02.07.tgz
sv-1# patch -p1 < 
/usr/src/device-mapper.1.02.07/patches/linux-2.4.28-pre4-devmapper-ioctl.patch
patching file Documentation/Configure.help
Hunk #1 succeeded at 1965 (offset -6 lines).
patching file MAINTAINERS
Hunk #1 succeeded at 581 (offset -4 lines).
patching file arch/mips64/kernel/ioctl32.c
.
.
.
patching file mm/mempool.c
patching file mm/vmalloc.c
sv-1#

Device mapper support will now show up:

sv-1# make menuconfig
Linux Kernel v2.4.32 Configuration 
Multi-device support (RAID and LVM) 
[*] Multiple devices driver support (RAID and LVM)               
RAID support                                                
*  Logical volume manager (LVM) support                        
*  Device-mapper support (NEW)                                 
Mirror (RAID-1) support                                    

Rebuild the kernel:

make dep clean bzImage

Configure your boot loader and reboot for grins. Compile and install the device-mapper software:

sv-1# cd device-mapper.1.02.07
sv-1# ./configure
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for gawk... gawk
.
.
.
config.status: creating kernel/Makefile
config.status: creating man/Makefile
config.status: creating po/Makefile
config.status: creating include/configure.h
sv-1# make
make -C include
make[1]: Entering directory `/usr/src/device-mapper.1.02.07/include'
find . -maxdepth 2 -type l -exec rm -f \{\} \;
for i in `cat .symlinks`; do ln -s $i ; done
touch .symlinks_created
ln -s ../../kernel/ioctl/dm-ioctl.h linux
.
.
.
ted-externs -Winline -O2 dmsetup.c -o dmsetup.o
gcc -o dmsetup dmsetup.o  -L../lib/ioctl \
-L../lib/ioctl -L/lib -ldevmapper 
make[1]: Leaving directory `/usr/src/device-mapper.1.02.07/dmsetup'
sv-1# 
sv-1# make install
make -C include
make[1]: Entering directory `/usr/src/device-mapper.1.02.07/include'
make[1]: Nothing to be done for `all'.
.
.
.
/usr/bin/install -c -D -o root -g root -m 555  dmsetup /sbin/dmsetup
make[1]: Leaving directory `/usr/src/device-mapper.1.02.07/dmsetup'
sv-1# ls /lib/libdev*
/lib/libdevmapper.so  /lib/libdevmapper.so.1.02
sv-1# 

See Compiling and Configuring LVM for the rest of the LVM installation.




Please read our Terms of Use
Microsoft, Windows, Windows XP, Windows 2003, Windows 2000, and NT are either trademarks or registered trademarks of Microsoft Corporation. NetAdminTools.com is not affiliated with Microsoft Corporation. Linux is a registered trademark of Linus Torvalds, and refers to the Linux kernel. The operating system of most distributions that contain the Linux kernel is GNU/Linux. All logos and trademarks in this site are property of their respective owner. Copyright 1997-2008 NetAdminTools.com

Created by:
MCJ
MCJ CMS