LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - Installation
User Name
Password
Slackware - Installation This forum is for the discussion of installation issues with Slackware.

Notices

Reply
 
Search this Thread
Old 09-01-2008, 11:51 AM   #1
saf
LQ Newbie
 
Registered: Mar 2004
Location: Bucharest
Distribution: Slackware 10.2
Posts: 26

Rep: Reputation: 15
LVM over software RAID on Slackware 12.1


Hello,

I tried to install Slackware 12.1 using LVM over software RAID thinking i could combine the flexibility of LVM and the pseudo-safety of RAID.
Please tell me if I thought (and did) properly, and if it should work, why do I get the message from the bottom of this post:
3 HDDs of 250GB each

sd[abc]1=256MB=/dev/md1=RAID1=/boot
sd[abc]2=2GB=/dev/md2=RAID5=swap
sd[abc]3=the rest of it=/dev/md3=RAID5

pvcreate /dev/md3
vgcreate linux /dev/md3
lvcreate -L 10G -n root linux
lvcreate -L 10G -n home linux
lvcreate -L 10G -n var linux
lvcreate -L 10G -n www linux
vgscan --mknodes
vgchange -ay

Then ran "setup" where every partition and LVM node is recognized
I installed kernel-huge-smp (no need for initrd)
Then I modified (/mnt)/etc/mdadm.conf, installed lilo on RAID (installed in MBR, raid-extra-boot=mbr, no append=root), then reboot.

====>>> "unable to mount root fs on unknown-block(0,0)" (I'm not sure about the 0,0, I'm not at the would-be-server right now)

Could give me some pointers on where to start the "repairs"

Thanks
 
Old 09-01-2008, 01:43 PM   #2
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,223

Rep: Reputation: Disabled
Quote:
I installed kernel-huge-smp (no need for initrd)
This is where you went wrong.
You will need an initrd that contains the mdadm and lvm binaries because your root partition is on that LVM (which is in turn built on RAID).

There are two good README's in the Slackware tree's root directory:
http://slackware.osuosl.org/slackwar...EADME_RAID.TXT
http://slackware.osuosl.org/slackwar...README_LVM.TXT
If you have not read those yet, I suggest that you do so now.
If you want to have a script that runs a check of your system, download mkinitrd_command_generator.sh and get it into your installer environment in some way (floppy, USB stick, or after enabling the network use wget).

What you need to do is boot from the Slackware CD, wait until you reach the command prompt, and do not start 'setup'.
Instead, configure your RAID and LVM again so that the partitions become available, then mount all of those partitions at /mnt , and if you have that mkinitrd_command_generator.sh script copy it into /mnt/root/.
Then, run
Code:
mount -o bind /proc /mnt/proc
mount -o bind /sys /mnt/sys
chroot /mnt
In the chroot you can generate a new initrd.gz, then run lilo, reboot and hope for the best.
The mkinitrd_command_generator.sh script can help in determining the correct "mkinitrd" command... try running
Code:
mkinitrd_command_generator.sh -r
in that chroot environment and examine the output.

Eric
 
Old 09-01-2008, 02:20 PM   #3
saf
LQ Newbie
 
Registered: Mar 2004
Location: Bucharest
Distribution: Slackware 10.2
Posts: 26

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Alien Bob View Post
This is where you went wrong.
You will need an initrd that contains the mdadm and lvm binaries because your root partition is on that LVM (which is in turn built on RAID).
Thanks. I'll give it a try. I thought that kernel-huge-smp contained the LVM kernel module compiled statically.
I still have a question, and that is what dou you mean by "contains the mdadm and lvm binaries"? When building server using only the software RAID, I never needed the mdadm utility to be available at boot time. Or do you mean the raid and lvm modules in the kernel?
Nevertheless, I have yet to successfully boot an initrd (always had problems with locating the chain of modules for the sata controllers - but I'll try the script you provided).

I will get back tomorrow with the results.

PS: I know about your ~alien site, and it contains lots of useful and interesting stuff. Thanks for it and keep up the good work.
 
Old 09-01-2008, 03:50 PM   #4
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,223

Rep: Reputation: Disabled
An initrd image is not just used to load kernel modules which are not included in your kernel.

Slackware's LILO can boot the system if it is built on a RAID and the RAID partition flags are set to "RAID autodetect". In that case, you do not need an initrd.

But with the LVM it becomes different. Because you have installed the root partition on LVM, you need an initrd to prepare the system to a state where the partition can be mounted and the init program started.
This is what needs to be done in the initrd. When you pass the "-L" switch to mkinitrd you tell it to copy the lvm tools into the initrd image. The init script inside the initrd will run the "vgscan --mknodes" and "vgchange -ay" commands.
If you pass the "-R" switch to the mkinitrd command, the mdadm binary will be added to your initrd.gz image and the "/sbin/mdadm -E -s >/etc/mdadm.conf" and "/sbin/mdadm -A -s" commands will be run at boot, from within the initrd, before initializing the LVM volumes.

In your case, the "-L" is required and the "-R" switch may be optional but you may as well just add it.

Eric
 
Old 09-02-2008, 08:59 AM   #5
saf
LQ Newbie
 
Registered: Mar 2004
Location: Bucharest
Distribution: Slackware 10.2
Posts: 26

Original Poster
Rep: Reputation: 15
It works. Thanks very much.
 
  


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
how do you create software raid on rh8 using lvm xender69 Red Hat 6 12-03-2007 04:19 PM
software raid 5 + LVM and other raid questions slackman Slackware 5 05-09-2007 02:58 PM
software raid 5 + LVM slackman Slackware 1 05-07-2007 09:27 AM
moving disks with software raid and LVM mastrboy Linux - General 8 09-30-2006 09:33 AM


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

Main Menu
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