Linux - GeneralThis 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.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
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.
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"
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?
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.