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 |
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.
|
|
04-19-2007, 07:57 AM
|
#1
|
Senior Member
Registered: Oct 2004
Location: Southeast, U.S.A.
Distribution: Debian based
Posts: 1,250
Rep:
|
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?
|
|
|
04-19-2007, 08:17 AM
|
#2
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
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"
|
|
|
04-19-2007, 08:44 AM
|
#3
|
Senior Member
Registered: Oct 2004
Location: Southeast, U.S.A.
Distribution: Debian based
Posts: 1,250
Original Poster
Rep:
|
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?
|
|
|
04-19-2007, 08:52 AM
|
#4
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
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.
|
|
|
04-19-2007, 09:16 AM
|
#5
|
Senior Member
Registered: Oct 2004
Location: Southeast, U.S.A.
Distribution: Debian based
Posts: 1,250
Original Poster
Rep:
|
Thanks again. This is great information, and it is helping me move forward.
Can you explain what the benefits of LVM are?
|
|
|
04-19-2007, 09:32 AM
|
#6
|
Senior Member
Registered: Oct 2004
Location: Southeast, U.S.A.
Distribution: Debian based
Posts: 1,250
Original Poster
Rep:
|
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.
|
|
|
04-19-2007, 10:12 AM
|
#7
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
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.
|
|
|
All times are GMT -5. The time now is 07:12 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
|
|