LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-23-2016, 01:04 AM   #1
Gerard Lally
Senior Member
 
Registered: Sep 2009
Location: Leinster, IE
Distribution: Slackware, NetBSD
Posts: 2,178

Rep: Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761
LVM type raid1 - modules missing from installer kernel?


Following this recommendation I have been trying to set up LVM raid1 on 64-bit -current in a virtual machine. After creating the "lvraid" volume group, I set about creating the first raid1 logical volume as follows:

Code:
lvcreate --type raid1 -L 12G -n lvroot lvraid
However, I am presented with the following error:

Code:
modprobe: FATAL: Module dm-raid not found in directory /lib/modules/4.4.7
/sbin/modprobe failed: 1
raid1: Required device-mapper target(s) not detected in your kernel.
I tried modprobe dm-raid without success; I'm not sure what module(s) is required. Or does this mean Slackware's LVM in the installer does not yet support raid1 logical volumes?

Edit: man lvcreate shows support in the installer for LVM raid1, so this is a kernel issue. Any chance the kernel config in the -current installer could be adapted to provide for this scenario, or is it more complicated than that?

Last edited by Gerard Lally; 04-23-2016 at 08:52 AM. Reason: Clarify that the problem is with installer kernel
 
Old 04-23-2016, 10:33 PM   #2
Hangaber
Member
 
Registered: Sep 2004
Location: USA
Distribution: Slackware
Posts: 163

Rep: Reputation: 51
Quote:
Originally Posted by gezley View Post
Code:
modprobe: FATAL: Module dm-raid not found in directory /lib/modules/4.4.7
Quote:
Originally Posted by gezley View Post
Edit: man lvcreate shows support in the installer for LVM raid1, so this is a kernel issue. Any chance the kernel config in the -current installer could be adapted to provide for this scenario, or is it more complicated than that?
Yes. I'm not sure what you mean by "installer kernel", and I am making some assumptions here;
- That you had slack 14.1, upgraded to current, and can boot to that system
- That it is looking for the module created by CONFIG_DM_RAID=m set as in the kernel config. I'm a little uncertain on this, because it looks like CONFIG_DM_RAID should already be set to "m" if you're using the stock huge or generic kernel + config.

Display the config for the currently running kernel, showing just the CONFIG_DM_RAID line;
Code:
zcat /proc/config.gz |grep CONFIG_DM_RAID
Note: I'm guessing that this is how you would compile *just* the modules under the <kernelSourceDir>/drivers/md/ directory;
Code:
cd /usr/src/linux-4.4.7
make modules SUBDIRS=drivers/md
make modules_install SUBDIRS=drivers/md
(You might have to "depmod -a" at this point. I'm not certain.)
If you don't have a "/usr/src/linux-4.4.7" directory (or whatever version it is when you read this)... install kernel-source-4.4.7, available from your local friendly -current repo.

To recompile the kernel and all modules using the kernel-source-* package, or even from the source at kernel.org - http://docs.slackware.com/howtos:sla...kernelbuilding

Last edited by Hangaber; 04-23-2016 at 10:37 PM. Reason: Fixed 4-4-7 to 4.4.7 in src path.
 
Old 04-23-2016, 10:50 PM   #3
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
No, I think the OP means that the iso installer image doesn't have that module.
 
Old 04-24-2016, 02:27 AM   #4
Gerard Lally
Senior Member
 
Registered: Sep 2009
Location: Leinster, IE
Distribution: Slackware, NetBSD
Posts: 2,178

Original Poster
Rep: Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761
Quote:
Originally Posted by Hangaber View Post
Yes. I'm not sure what you mean by "installer kernel" ...
As Mr Cranium suggests, I mean the kernel (and modules) in use when booting from a -current ISO to install the system, not the kernel running on an installed system. It seems to me that raid as implemented by LVM, not by mdadm, is not supported in this kernel. The userspace LVM included in the installer does support it, but without kernel support this is as far as it goes.

It would be useful to have this feature in the installer as it would allow us to install directly on LVM raid1 volumes, bypassing mdadm and indeed bypassing partitioning as well.

Last edited by Gerard Lally; 04-24-2016 at 06:24 AM.
 
Old 04-24-2016, 03:04 AM   #5
Hangaber
Member
 
Registered: Sep 2004
Location: USA
Distribution: Slackware
Posts: 163

Rep: Reputation: 51
Ahh! Thanks for correcting my bad assumption.
Did you create the iso yourself using something like "mirror-slackware-current.sh"?

Maybe recompile the huge.s kernel but with the config line for CONFIG_DM_RAID set to "y" instead of "m"? Placing the resulting bzImage, System.map.gz and modified config in to the "<dirOfCurrentMirror>/kernels/huge.s", then re-create the iso without syncing.
 
1 members found this post helpful.
Old 04-24-2016, 03:23 AM   #6
Gerard Lally
Senior Member
 
Registered: Sep 2009
Location: Leinster, IE
Distribution: Slackware, NetBSD
Posts: 2,178

Original Poster
Rep: Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761
Quote:
Originally Posted by Hangaber View Post
Ahh! Thanks for correcting my bad assumption.
Did you create the iso yourself using something like "mirror-slackware-current.sh"?

Maybe recompile the huge.s kernel but with the config line for CONFIG_DM_RAID set to "y" instead of "m"? Placing the resulting bzImage, System.map.gz and modified config in to the "<dirOfCurrentMirror>/kernels/huge.s", then re-create the iso without syncing.
Well a custom ISO is certainly one way of doing it, although the CONFIG_DM_RAID option you mention doesn't apply, as far as I know, to LVM raid. The installer does have compiled-in or modular kernel support for mdadm raid, and indeed kernel and userspace support for setting up plain LVM, but kernel support for LVM's own internal raid seems to be missing.

Last edited by Gerard Lally; 04-24-2016 at 06:25 AM.
 
Old 04-30-2016, 08:27 PM   #7
Gerard Lally
Senior Member
 
Registered: Sep 2009
Location: Leinster, IE
Distribution: Slackware, NetBSD
Posts: 2,178

Original Poster
Rep: Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761
It seems Debian's installer does not include the dm-raid module either. Here is how Stack Exchange member derobert managed to get it working on Debian; in brief, he ignores the installer kernel and extracts and modprobes the dm-raid module from the kernel to be installed instead.

Step 4 is what we're interested in:
Code:
cd /tmp
dpkg-deb --fsys-tarfile /cdrom/pool/main/l/linux/linux-image-*.deb | tar x
depmod -a -b /tmp
modprobe -d /tmp dm-raid
Would somebody kindly show me how to replicate the above dpkg-deb pipeline on Slackware, so that I can extract the dm-raid module from the kernel that will be installed?
 
Old 04-30-2016, 09:08 PM   #8
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
I think you'd just need to explodepkg the package in a directory and then run the other commands. But I'm not too familiar with depmod and modprobe's options, so they might need some adjustment.

Code:
cd /tmp
explodepkg /location/to/slackware64-current/slackware64/a/kernel-huge-4.4.8-x86_64-1.txz
depmod -a -b /tmp
modprobe -d /tmp dm-raid
 
Old 05-01-2016, 04:43 AM   #9
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
Seems like that module is a good candidate for being built-in to the 'huge' kernel in future.
 
Old 05-01-2016, 05:56 AM   #10
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
I'd never use dmraid, mdraid is the correct solution.
 
Old 05-01-2016, 12:29 PM   #11
Gerard Lally
Senior Member
 
Registered: Sep 2009
Location: Leinster, IE
Distribution: Slackware, NetBSD
Posts: 2,178

Original Poster
Rep: Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761
Quote:
Originally Posted by bassmadrigal View Post
I think you'd just need to explodepkg the package in a directory and then run the other commands. But I'm not too familiar with depmod and modprobe's options, so they might need some adjustment.
explodepkg not found. depmod not found either.

But I did extract kernel-modules (not kernel-huge) with xz -d and I did then successfully modprobe dm-raid. I was then able to lvcreate --type raid1 the logical volumes; there were some errors but the installer found the volumes and installed to them.

Next problem - lilo is not happy with raid1 logical volumes. But at least progress.

Last edited by Gerard Lally; 05-01-2016 at 12:35 PM.
 
Old 05-01-2016, 12:34 PM   #12
Gerard Lally
Senior Member
 
Registered: Sep 2009
Location: Leinster, IE
Distribution: Slackware, NetBSD
Posts: 2,178

Original Poster
Rep: Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761
Quote:
Originally Posted by Emerson View Post
I'd never use dmraid, mdraid is the correct solution.
Can you elaborate on that?

I only ever use mdadm and/or LVM for the system anyway; data is always kept on a separate drive and backed up to another drive, neither of which is raid or LVM segmented. So no big deal if I have to reinstall the system, but I would like to know why you think dmraid is not the "correct" solution. There were scare stories about LVM perhaps 5 years ago, but I have yet to find contemporary reports on LVM raid that are reliable and not just hearsay.
 
Old 05-01-2016, 01:02 PM   #13
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
dmraid is only justified when you need to dual-boot and share the RAID with "other" operating system on a fakeraid controller. It has all the limitations of hardware controller and no benefits of hardware controller.
 
Old 05-01-2016, 01:20 PM   #14
Gerard Lally
Senior Member
 
Registered: Sep 2009
Location: Leinster, IE
Distribution: Slackware, NetBSD
Posts: 2,178

Original Poster
Rep: Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761
Quote:
Originally Posted by Emerson View Post
dmraid is only justified when you need to dual-boot and share the RAID with "other" operating system on a fakeraid controller. It has all the limitations of hardware controller and no benefits of hardware controller.
Again, open-ended assertions short on specifics. The raid I am trying to set up is specific to LVM and has nothing to do with either mdadm or motherboard fakeraid controllers. Nor does it have anything to do with other operating systems or dual-booting. If you know of problems with software raid as it is implemented in LVM I'm all ears but any other raid you care to discuss is irrelevant to this thread.
 
Old 05-01-2016, 02:12 PM   #15
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
OK, I guess I lost you. What stops you from setting up LVM with mdraid? BTW, the recommendation you linked to in your initial post talks about mdraid, too.
 
  


Reply

Tags
lvm raid1 installer



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
Unable to remove missing PV on LVM mirror raid1 abacus4772 Red Hat 0 02-13-2015 04:44 AM
[SOLVED] lvm and luks on raid1 in slackware64-14.1 slac-in-the-box Slackware 10 03-24-2014 10:38 PM
Rebuild RAID1 with LVM bit_head Linux - Hardware 1 12-28-2013 12:42 PM
lvm ontop of raid10 or combine two raid1 via lvm? okar Linux - Server 3 09-11-2009 02:37 PM
RAID1+LVM: data keeps getting corrupted Chojin Linux - Software 4 10-22-2006 09:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:32 AM.

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
Open Source Consulting | Domain Registration