LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 11-03-2008, 11:16 PM   #1
centos82
Member
 
Registered: Sep 2008
Distribution: CentOS
Posts: 75

Rep: Reputation: 16
Linux Raid using LVM


I am having problems booting into my newly created software raid device /dev/md1 using grub as my bootloader and /dev/md1 being a PV in LVM.

This is not my first attempt at this so I saved detailed information about how I set up this array so please ask if any additional information is needed. In short though, here is how I set this up:

I have a VG named /dev/rootvg which has the PV /dev/sda2. All of my OS filesystems are in this volume group.

• I added an identical size disk and used sfdisk to mirror the configuration of /dev/sda.
• Used fdisk to change the partition type of /dev/sdb2 from “LVM Linux” to “Linux raid autodetect”
• Created a raid device named /dev/md1 with one missing device and /dev/sdb2
• Ran pvcreate on /dev/md1 and added this PV to rootvg
• Ran pvmove /dev/sda2 /dev/md1
• Removed /dev/sda2 from rootvg and ran pvremove to remove it from LVM
• Used fdisk to change the /dev/sda2 partition from “LVM Linux” to “Linux raid autodetect”
• Added /dev/sda2 to /dev/md1 array and let the raid software complete the data sync

Now, rootvg is completely accessible and pvdisplay, vgdisplay all show what I would want which is /dev/md1 as being my PV. The problem I am having is when I reboot. I get a kernel panic with the error.

No volume groups found
Volume group “roovg” not found
 
Old 11-04-2008, 12:26 AM   #2
centos82
Member
 
Registered: Sep 2008
Distribution: CentOS
Posts: 75

Original Poster
Rep: Reputation: 16
For those dying in suspense. The solution was for me was to create a new initrd image and edit /boot/grub/grub.conf to use this new image. Here's the command I used to create the image:

mkinitrd --force-raid-probe --force-lvm-probe /boot/initrd-2.6.18-53.el5.raid.img 2.6.18-53.el5
 
Old 11-04-2008, 01:17 AM   #3
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 13.1 / 12.3_64-KDE, Ubuntu 12.04, Fedora 17, Mint 16, Chakra
Posts: 3,618

Rep: Reputation: Disabled
Oh dear. Why are you doing such things so early in the morning? Or is it morning where you are? Argh. And why LVM on raid at all?
 
  


Reply

Tags
grub, lvm, raid


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
after install Linux, want to make a raid and LVM in "GUI" hocheetiong Linux - Newbie 3 09-04-2007 09:09 AM
software raid 5 + LVM and other raid questions slackman Slackware 5 05-09-2007 02:58 PM
lvm and raid wlfdgcrkz Linux - Software 15 05-05-2003 02:50 PM


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