LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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
  Search this Thread
Old 10-26-2008, 10:24 PM   #1
centos82
Member
 
Registered: Sep 2008
Distribution: CentOS
Posts: 75

Rep: Reputation: 16
Software Raid with LVM and Live System Partitions


Hi,

I am trying to setup a software raid on a system that is already up and running using LVM for filesystem management. I know how to create the raid device /dev/md1 using /dev/sda2 and /dev/sdb2 (Which holds the LVM LVs for root, var, usr, etc) but I'm not sure how to get LVM to recognize that the physical volume on VolGroup00 should be /dev/md1 instead of /dev/sda2 now. Any suggestions?

Thanks.
 
Old 10-26-2008, 10:56 PM   #2
centos82
Member
 
Registered: Sep 2008
Distribution: CentOS
Posts: 75

Original Poster
Rep: Reputation: 16
Wow, I guess I spoke too soon. It looks like mdadm took care of this for me. For those who are interested I took my blank hard drive /dev/sdb, ran fdisk on it and created identical partitions sizes as I had on /dev/sda. I changed the partition type on /dev/sdb2 to 'fd' aka 'Linux raid autodetect'. Then I created the array using `mdadm --create /dev/md1 --level=1 --raid-devices=2 missing /dev/sdb2` Then I ran `mdadm /dev/md1 -a /dev/sda2`. Adding /dev/sda2 to my raid (which /dev/sda2 was originally an LVM PV partition for VolGroup00) took care of changing my LVM PV to /dev/md1 automatically.

I'm still using /dev/sda1 for my boot partition. I haven't decided/figured out what I am going to do with that yet. Any suggesstions here would be helpful.

Thanks.
 
Old 10-27-2008, 04:20 PM   #3
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Arch/Manjaro, might try Slackware again
Posts: 1,851
Blog Entries: 14

Rep: Reputation: 284Reputation: 284Reputation: 284
Quote:
I'm still using /dev/sda1 for my boot partition. I haven't decided/figured out what I am going to do with that yet. Any suggesstions here would be helpful.
What's wrong with setting up RAID 1 for /dev/sda1 and /dev/sdb1 and booting off of that?
 
Old 11-05-2008, 11:55 PM   #4
centos82
Member
 
Registered: Sep 2008
Distribution: CentOS
Posts: 75

Original Poster
Rep: Reputation: 16
OK, so I have my raid going for LVM. To make my boot redudant I just made a mirror copy of /dev/sda1 onto /dev/sda2. I did this manually using dd. I tried removing /dev/sda and /dev/sdb individually and everything worked. Awesome. But I got greedy and thought I could create and array device for /dev/sd[ab]1. So I zeroed out /dev/sdb1, used fdisk to make /dev/sdb1 of parition type "fd". I created the raid device /dev/md0 with one missing device and /dev/sdb1. Then I mirrored /dev/sda1 to /dev/md0. Then I unmounted /dev/sda1 and added /dev/sda1 to /dev/md0 and let linux sync the partition. I am having boot problems now though. I get into grub and the OS begins to boot. It finds my root volume group and all associated logical volumes, but (and the screen moves very fast) sometime after setting up udev, all of the sudden commands start flying on the sreen saying file not found. Commands used to setup the network and other things. Finally, if I let it sit it drops me to a text login prompt where any username I enter it says invalid login, and INIT keeps complaining that X is respawning to quickly.

I booted into the live CD and found /dev/rootvg/rootlv was corrupt, so I fixed that. Later, I mounted this filesystem and found the /etc/fstab was missing. Not sure how that happened? Luckily I had a backup copy. So I added /etc/fstab back, but I'm still getting the file not found errors, etc.

Any ideas at all? I am completely stumped.

Thanks.
 
Old 11-13-2008, 10:59 AM   #5
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Arch/Manjaro, might try Slackware again
Posts: 1,851
Blog Entries: 14

Rep: Reputation: 284Reputation: 284Reputation: 284
While it's possible to boot LVM off Raid in the manner you describe, it sounds like you may have done something else to your system that makes it a more complicated problem than that right now. Unfortunately I'm not a CentOS expert and the boot/LVM/RAID sequence varys quite a lot per distro.

I presume you've googled it and found this:

http://www.linuxquestions.org/questi...draid1-680543/

and this

http://www.flmnh.ufl.edu/linux/linux_software_raid.htm

Good luck!
 
  


Reply



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
LVM over software RAID on Slackware 12.1 saf Slackware - Installation 4 09-02-2008 08:59 AM
Partitions RAID LVM Disk Druid Kryptos Linux - Newbie 2 11-17-2007 08:13 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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

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