LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 12-28-2003, 01:46 PM   #1
Kroenecker
Member
 
Registered: May 2003
Location: The States
Distribution: Gentoo
Posts: 245

Rep: Reputation: 30
lvm 2 device-mapper


I have tried to compile the lvm device-mapper both into my 2.6.0 kernel and as a module, but I dont have /proc/lvm when I am finished.

I can see the modules being made when I run make in the source directory.

I cant find dm-table, dm-linear, etc when everything is done.

Anyone else struggled with LVM using the new kernel?
 
Old 12-28-2003, 01:52 PM   #2
hw-tph
Senior Member
 
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 57
Mmm, this is just a longshot as I haven't tried it with the 2.6 series yet, but have you inserted the modules (and are they active when you do an lsmod?)?

Sorry if I offended you by asking this, but it's hard to tell the level of acquantaince posters have with stuff.

Håkan
 
Old 12-28-2003, 07:37 PM   #3
Kroenecker
Member
 
Registered: May 2003
Location: The States
Distribution: Gentoo
Posts: 245

Original Poster
Rep: Reputation: 30
I was going to ask you about how to make the /dev/mapper/control which is missing everytime I try to use LVM2, but then I took a second to google and found this:

http://www.redhat.com/archives/fedor.../msg01117.html

I suppose that this is my solution since when I try to make logical volumes I get the error:

/dev/mapper/control: open failed: No such file or directory
Is device-mapper driver missing from kernel?

Anyway when you try LVM2, I hope that this link helps. I havent tried it yet, but it looks like my solution.
 
Old 12-29-2003, 08:04 AM   #4
hw-tph
Senior Member
 
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 57
Thanks! I'm rebuilding my old desktop as a server and I'm popping in a handful of old HD's that I have scattered around my apartment. It should come in handy.

Håkan
 
Old 12-29-2003, 12:19 PM   #5
Kroenecker
Member
 
Registered: May 2003
Location: The States
Distribution: Gentoo
Posts: 245

Original Poster
Rep: Reputation: 30
hw-tph,

YO. I finally found the solution (let me say it again...i think

You see I was getting the following error whenever I tried to make a logical volume on one of my volume groups...

" /dev/mapper/control : open failed : No such file or directory .
Is device mapper mapped to kernel ? "

So anyway I found the info below in the sistina pipermail forums. If it is any help to anyone else trying out LVM2, thats cool!

#############################################

Did you compile device mapper as a module or into the kernel?

Here I have compile them into the kernel directly. You must add this =
line into your /etc/modules.conf:

post-install dm-mod /etc/rc.d/init.d/devmap_mknod.sh

And the script /etc/rc.d/init.d/devmap_mknod.sh is next:

#! /bin/sh

# Startup script to create the device-mapper control device
# on non-devfs systems.
# Non-zero exit status indicates failure.

# These must correspond to the definitions in device-mapper.h and dm.h
DM_DIR=3D"mapper"
DM_NAME=3D"device-mapper"

set -e

DIR=3D"/dev/$DM_DIR"
CONTROL=3D"$DIR/control"

# Check for devfs, procfs
if test -e /dev/.devfsd ; then
echo "devfs detected: devmap_mknod.sh script not required."
exit
fi

if test ! -e /proc/devices ; then
echo "procfs not found: please create $CONTROL manually."
exit 1
fi

# Get major, minor, and mknod
MAJOR=3D$(sed -n 's/^ *\([0-9]\+\) \+misc$/\1/p' /proc/devices)
MINOR=3D$(sed -n "s/^ *\([0-9]\+\) \+$DM_NAME\$/\1/p" /proc/misc)

if test -z "$MAJOR" -o -z "$MINOR" ; then
echo "$DM_NAME kernel module not loaded: can't create $CONTROL."
exit 1
fi

mkdir -p --mode=3D755 $DIR
test -e $CONTROL && rm -f $CONTROL

echo "Creating $CONTROL character device with major:$MAJOR =
minor:$MINOR."
mknod --mode=3D600 $CONTROL c $MAJOR $MINOR

With that everything works fine. If you use them as a module, I'm not =
sure, but I think that you will have to add it into your rc.local, or =
create a startup script for devmap_mknod.sh, but I'm not really sure =
about that.


###########################################

So I am almost positive that this is it because I have not compiled devfs into my kernel. I specifically remember not selecting it since we can always use lspci. Well, I might try compiling it in now just to see if it fixes things or maybe I will go ahead and use the above. Let you know. (Im a geek. Free time during the holidays...what do you expect?)

Later

Last edited by Kroenecker; 12-29-2003 at 12:25 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Does Mandrake 10.1 has device mapper? edccorp Mandriva 2 03-20-2005 09:51 AM
installing device-mapper aaronj Linux - Software 1 10-02-2004 03:00 AM
device mapper failure booting SuSE 9.1 Joseph Schiller Linux - Distributions 2 08-18-2004 08:54 AM
LVM problems, device-mapper missing dworkin Linux - Newbie 3 03-22-2004 05:54 PM
LVM and device-mapper instalation- Help zick Linux - General 0 10-29-2003 11:56 PM


All times are GMT -5. The time now is 04:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration