LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-19-2007, 07:57 AM   #1
SlowCoder
Senior Member
 
Registered: Oct 2004
Location: Southeast, U.S.A.
Distribution: Debian based
Posts: 1,250

Rep: Reputation: 164Reputation: 164
Software RAID 1 on Fedora 6?


I have a computer with 2 identical hard drives. I would like to RAID 1 (mirror) them to be exactly the same. That includes the MBR, /, Boot, etc. partitions. This way, should the primary drive fail, I can quickly move the second drive into master position and restart.

During Fedora 6 installation, it gives the option to RAID, but it looks like it only wants to RAID by partition. I don't know if this can work in my situation.

Can someone provide some input in this?
 
Old 04-19-2007, 08:17 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
yeah that's right, you wouldn't mirror mbrs and such, only partitions. your boot sector will almost never change though, and can easily be copied between the two drives, e.g. "dd if=/dev/hda of=/dev/hdb bs=512 count=1"
 
Old 04-19-2007, 08:44 AM   #3
SlowCoder
Senior Member
 
Registered: Oct 2004
Location: Southeast, U.S.A.
Distribution: Debian based
Posts: 1,250

Original Poster
Rep: Reputation: 164Reputation: 164
Thank you for that information. However, I still don't understand about the RAID/LVM configuration. I had to blow away the LVM partitions before Fedora would allow me to clone the 1st drive to the 2nd drive. Does that sound right?
 
Old 04-19-2007, 08:52 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
yes. if you want both lvm and raid1, which is a perfectly godo thing to do, as each technology provides different benefits, you'd create a *single* raid1 partition, /dev/md0 and then format that as LVM, and subdivide the one partition as you see fit within LVM. Last time i checked, you'd want to still leave 100mb or so at the start of each drive to hold /boot outside of raid and such, but at the partition level you're still just left with one tiny /boot and the rest as raid.
 
Old 04-19-2007, 09:16 AM   #5
SlowCoder
Senior Member
 
Registered: Oct 2004
Location: Southeast, U.S.A.
Distribution: Debian based
Posts: 1,250

Original Poster
Rep: Reputation: 164Reputation: 164
Thanks again. This is great information, and it is helping me move forward.

Can you explain what the benefits of LVM are?
 
Old 04-19-2007, 09:32 AM   #6
SlowCoder
Senior Member
 
Registered: Oct 2004
Location: Southeast, U.S.A.
Distribution: Debian based
Posts: 1,250

Original Poster
Rep: Reputation: 164Reputation: 164
More questions/problems:
1. I am supposed to create the /boot partition outside of the RAID partition. I understand this, because the boot partition must reside on a single drive. But in RAID 1, the boot partition will reside on a single (actually 2, but whole on each) drive for booting purposes anyway. Why can't I combine the /boot into the / partition?
2. How do I make sure the /boot partition is also duplicated on the 2nd drive?
3. I am having trouble figuring out how to add LVM to the RAID partition. It keeps wanting to add LVM to unused space. How can I force it to use the RAID partition?
4. How do I configure the swap partition so that it exists on both drives?

P.S.
Please remember that the hope is that in the event of a failure of the primary drive, I can just move the 2nd drive to master and keep going.

I am trying to do this during the Fedora 6 installation, if that makes any difference.

Last edited by SlowCoder; 04-19-2007 at 10:14 AM.
 
Old 04-19-2007, 10:12 AM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
LVM creates a vastly more flexible way to control partitions. you could add a second parit of drives and expand any lvm partition into that drive, seamlessly adding space etc... very flexible.

1. it's about grub's access to the data, there's only so much code you can fit into a boot sector, so only so complex a motion grub can go through. it may be the case that modern version of grub can boot to a software raid partition, but also there's really no point, and you certainly wouldn't want to go without a dedicated /boot in some form or other. /boot in itself is *only* used for booting from, as such you shouldn't even ever mount that /boot partition at all other than for kernel updates and things. i.e. you shouldn't access that filesystem at all. and if you don't access it you can't corrupt it etc... so as you neever change it, there's nothign to keep ruthlessly synchronized anyway.

2. just copy the files, but it *may* be the case that if you did have /dev/md1 as a raid device for /boot then you could still access the original /dev/hda1 or /dev/hda2 in isolation by grub. sure someone will actually confirm that. either way, it would still be a seperate raid partition, e.g. /dev/md0 for lvm including /, /home, /tmp, swap etc, and /dev/md1 for a native /boot.

3. can't remember offhand. i think you need to select "show raid devices" or something.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Fedora does not load up after software raid baddah Fedora - Installation 2 04-19-2007 06:53 AM
I can't install fedora 5 on software Raid flipmendisair Linux - Hardware 2 08-13-2006 09:29 AM
Slow writes in software raid 1+0 (Fedora Core 3) spencerkellis Linux - Hardware 0 09-23-2005 01:11 AM
software RAID 1 Fedora 2 question jabaker707 Linux - Software 0 10-04-2004 10:06 AM
Fedora software raid 1 norbul Fedora - Installation 4 08-23-2004 03:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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

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