Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 11-03-2008, 11:16 PM   #1
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
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/ 2.6.18-53.el5
Old 11-04-2008, 01:17 AM   #3
Senior Member
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 18.3+19.3, MX-18, Mandrake
Posts: 4,498

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?


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

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 > Forums > Linux Forums > Linux - Software

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

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration