LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Problem with LVM on Slackware 10.2 (https://www.linuxquestions.org/questions/slackware-14/problem-with-lvm-on-slackware-10-2-a-425295/)

RoloThomasee 03-16-2006 02:22 AM

Problem with LVM on Slackware 10.2
 
Trying to get LVM working on Slackware 10.2. Have compiled LVM support into the kernel (also tried it as module). Installed LVM2 and device-mapper using the installpkg tool.

Re-compiled kernel works fine except that when I try to run any of the LVM related commands it says to try running vgsacn first. Of course vgscan tells me the LVM drivers are not loaded.

I see lots of posts with the "LVM drivers not loaded?" issue but no solutions.

This should be this hard. Can anyone help?

uselpa 03-16-2006 04:22 AM

Are you using kernel 2.4 or 2.6?

RoloThomasee 03-16-2006 08:45 AM

Using 2.6.15.6

uselpa 03-16-2006 12:21 PM

I am running LVM2 with kernel 2.6.13.4 with these settings:
Code:

# Multi-device support (RAID and LVM)
#
CONFIG_MD=y
CONFIG_BLK_DEV_MD=m
CONFIG_MD_LINEAR=m
CONFIG_MD_RAID0=m
CONFIG_MD_RAID1=m
CONFIG_MD_RAID10=m
CONFIG_MD_RAID5=m
CONFIG_MD_RAID6=m
CONFIG_MD_MULTIPATH=m
CONFIG_MD_FAULTY=m
CONFIG_BLK_DEV_DM=m
CONFIG_DM_CRYPT=m
CONFIG_DM_SNAPSHOT=m
CONFIG_DM_MIRROR=m
CONFIG_DM_ZERO=m
CONFIG_DM_MULTIPATH=m
CONFIG_DM_MULTIPATH_EMC=m

I have done nothing special other than
- installing device mapper and lvm2 from /testing
- created a disk partition with type 8E
- created a physical volume, then a volume group, then the logical volumes (and a vgscan somewhere inbetween).

I'd suggest that you recompile a kernel with the above settings, then we can go on step by step.

RoloThomasee 03-16-2006 11:48 PM

It helps to use the correct packages.

I re-compiled with your config settings, installed the device-mapper and LVM2 from /testing (I got device-mapper and LVM2 from somewhere else the first time around...big mistake). Re-installed and rebooted. So far so good.

Had already set up my /dev/hdb with 4 partitions (type 8E). Created physical volumes for each /dev/hdb1 thru 4. No problem. Created a volume group, no problem.

When I tried to create a logical volume using root# lvcreate -L500M -n test group1 I just got the usage listing (as if I had typed lvcreate --help).

Ran "lvcreate --version" and it said it couldn't find the device-mapper in the kernel. I manually loaded the device-mapper driver (insmod dm-mod.ko). Re-tried creating a logical volume and everything worked as advertised.

Now I guess I just need to set up my /etc files so everything gets loaded, configured, and correctly mounted at boot time.

Thanks for your help!

uselpa 03-17-2006 01:16 AM

Slackware's init scripts will do it automatically if they find an LVM2 config file. Try a `grep -i lvm /etc/rc.d/*` as root to find the relevant sections.

Apart from that, you should only have to add a line to /etc/fstab.

Glad it worked.


All times are GMT -5. The time now is 01:59 PM.