LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 09-23-2015, 07:24 PM   #1
Gerard Lally
Senior Member
 
Registered: Sep 2009
Location: Leinster, IE
Distribution: Slackware, NetBSD
Posts: 2,177

Rep: Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761
LVM on top of mdadm RAID 1


Does anyone know of a guide to configuring LVM on top of mdadm RAID 1? I set this up on Slackware current a couple of days ago and had an issue when trying to reconfigure lilo. The system booted fine but I couldn't make changes to lilo.conf; lilo would complain about /dev/md0. Sorry; I've since gone back to just RAID 1 without LVM so I don't have the exact error message.

On reflection I think it was my fault: instead of creating just one RAID 1 device (sda1 and sdb1) with LVM on top, I should have created two -- a small RAID 1 device for /boot (sda1 and sdb1 to make md0) and a second RAID 1 device (sda2 and sdb2 to make md1) for the LVM volume (with lvroot, lvswap, lvusr, lvvar, lvhome, etc.).

I was surprised to find no Slackware-specific information online about this setup. I would like to get it going again some time, hence the request for a guide. I did indeed have this setup running fine on a server for some years but I didn't take notes!

Last edited by Gerard Lally; 09-23-2015 at 07:26 PM.
 
Old 09-23-2015, 08:36 PM   #2
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
Quote:
Originally Posted by gezley View Post
On reflection I think it was my fault: instead of creating just one RAID 1 device (sda1 and sdb1) with LVM on top, I should have created two -- a small RAID 1 device for /boot (sda1 and sdb1 to make md0) and a second RAID 1 device (sda2 and sdb2 to make md1) for the LVM volume (with lvroot, lvswap, lvusr, lvvar, lvhome, etc.).
In fact, that's the setup I have on the machine I am using while typing this. I don't have my boot device set correctly in lilo.conf in that it isn't pointing to the /boot raid device but instead to one of the base drives.
 
1 members found this post helpful.
Old 09-23-2015, 08:52 PM   #3
Gerard Lally
Senior Member
 
Registered: Sep 2009
Location: Leinster, IE
Distribution: Slackware, NetBSD
Posts: 2,177

Original Poster
Rep: Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761
Quote:
Originally Posted by Richard Cranium View Post
In fact, that's the setup I have on the machine I am using while typing this. I don't have my boot device set correctly in lilo.conf in that it isn't pointing to the /boot raid device but instead to one of the base drives.
Oh I see! So I should have boot = /dev/sda in lilo.conf, instead of boot = /dev/md0 ? Another question while you're here: I presume I set the partition type to Linux raid autodetect and not Linux LVM when creating the partitions in the first place (with fdisk)?
 
Old 09-23-2015, 09:21 PM   #4
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
Oops. Actually, I lied a bit. I don't have that setup on *this* machine but it is that way on my primary desktop (and other servers). Unfortunately, they are all using grub2 instead of lilo. This machine uses lilo, but has only one drive (it's a laptop).

So, I guess that's quite a bit of lying, actually.

This fellow seems to have it figured out: http://prithak.blogspot.com/2013/07/...-on-linux.html
 
1 members found this post helpful.
Old 09-24-2015, 12:36 AM   #5
kikinovak
MLED Founder
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: CentOS, OpenSUSE
Posts: 3,453

Rep: Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154
Here's my own Slackware-specific documentation:

Cheers,

Niki
 
2 members found this post helpful.
Old 09-24-2015, 08:28 AM   #6
Gerard Lally
Senior Member
 
Registered: Sep 2009
Location: Leinster, IE
Distribution: Slackware, NetBSD
Posts: 2,177

Original Poster
Rep: Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761
Quote:
Originally Posted by kikinovak View Post
Here's my own Slackware-specific documentation:
Thanks. The problem on this occasion was that I set up a single RAID 1 array and put LVM on top. That meant /boot was inside LVM which, as your notes remind us, will not work. I don't know why I did this because usually I create a separate /boot partition. Anyway, lesson learned.
 
Old 09-24-2015, 08:35 AM   #7
slacker1337
Member
 
Registered: Jun 2012
Location: Connecticut, USA
Distribution: Slackware
Posts: 148

Rep: Reputation: 40
Quote:
Originally Posted by kikinovak View Post
Here's my own Slackware-specific documentation:

Cheers,

Niki
This was very helpful, Nikki! I had issues similar to the OP when I started up my NFS server using LVM over raid5, but I ended up setting up two volumes and wasting an entire 1TB disk for "system" files when I could have used this writeup to store everything on the raid. Thanks again!
 
  


Reply

Tags
raid lvm lilo slackware



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
[SOLVED] LVM on top of existing RAID 1 with out erasing data? Train Linux - Server 3 04-25-2014 06:24 PM
[SOLVED] How to migrate from raid 6 to raid 5 using mdadm and LVM haerta Linux - General 5 04-20-2012 06:16 PM
XFS stripe width on top of LVM over hardware RAID thebeerbaron Linux - Software 3 10-27-2011 02:41 PM
RAID 10 failed - and my installation uses a lvm on top - how can i recover from this? nicolasdiogo Linux - General 5 05-20-2011 12:22 PM
Should I use LVM on top of 3ware Hardware RAID? bfoddy Linux - Hardware 2 09-22-2007 04:06 PM

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

All times are GMT -5. The time now is 12:59 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