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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
10-26-2008, 10:24 PM
|
#1
|
Member
Registered: Sep 2008
Distribution: CentOS
Posts: 75
Rep:
|
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.
|
|
|
10-26-2008, 10:56 PM
|
#2
|
Member
Registered: Sep 2008
Distribution: CentOS
Posts: 75
Original Poster
Rep:
|
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.
|
|
|
10-27-2008, 04:20 PM
|
#3
|
Senior Member
Registered: Jan 2008
Distribution: Arch/Manjaro, might try Slackware again
Posts: 1,859
|
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?
|
|
|
11-05-2008, 11:55 PM
|
#4
|
Member
Registered: Sep 2008
Distribution: CentOS
Posts: 75
Original Poster
Rep:
|
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.
|
|
|
11-13-2008, 10:59 AM
|
#5
|
Senior Member
Registered: Jan 2008
Distribution: Arch/Manjaro, might try Slackware again
Posts: 1,859
|
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!
|
|
|
All times are GMT -5. The time now is 07:18 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|