Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's 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.
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.
Hi, I'm migrating from Windows to Linux, then be patient with me. :-)
Well, I read some articles about RAID. The RAID level 1 interested me because of its redundancy in both drives. And I successfully made it in a couple of partitions. But, I always did it after Linux installation. Then, I create both partitions, use 'mdadm' to create raidtab and RAID device (md0, for example) and then I format the RAID device with 'mkfs' and mount it.
Until there, it's all OK.
But my problem is to mirror ALL the hard disk, inclusive root partition.
To do that, I guess I need no Linux installation, then create the RAID (md0, raidtab, etc) and after that install Linux in RAID device created.
But I'm new in Linux world and I have no idea how to do that.
I use Debian Lenny, so I need a solution that uses only the first DVD of this distribution.
Thankful,
Caio Fernando Bertoldi Paes de Andrade.
Note: Sorry my possible grammatical and semantical errors, I'm learning English. :X
Click here to see the post LQ members have rated as the most helpful post in this thread.
Maybe you just need to go slower through the install; in RHEL/Centos there's an option during install to either take the default OR manually specify the layout, inc RAID, LVM.
Can't comment on Debian.
I believe that in Debian it's done from the partitioning menu. If I were asking this question though, I'd first ask it of yahoo or google. I'm pretty sure there are a number of tutorials on the subject that would be more thorough than what you could get ad hoc here on LQ.
I have 2 hard drives in my box running mdadm RAID 1. I also use Debian Lenny. The easiest way to do it is from the disk partitioner during the install.
When I did it this is what I did.
1.) When I got to the disk partitioner I said I want to manually partition the disk.
2.) I selected the first hard drive and created a new partition table
3.) I created a new partition that was 1GB. I then specified to use the partition as a Physical Volume for RAID.
4.) The partition in step 3 was to be used for /boot. I repeated step 3 to create partitions for / and /home. For me that was 500GB and 993GB respectively.
5.) I then used the remaining 6GB of the hard drive to create a swap partition.
6.) Repeat steps 1-5 for the second hard disk.
7.) After you have partitioned both disk to have a swap partition and all the Physical volumes for RAID you will see a menu option at the very top of the disk partitioner labeled 'Configure Software RAID'. Select that Option.
8.) Next you are asked to write changed to disk and configure RAID. Select Yes
9.) At the next screen select 'Create MD Device'
10.) Next choose RAID 1
11.) Next enter 2 for the number of drives and select Continue
12.) I don't have a spare hard drive in this system so I entered 0 for spare devices.
13.) Next you select the partitions you want to be members of /dev/MD0. For me I selected /dev/sda1 and /dev/sdb1
14.) Repeat steps 9-13 for all the partitions you created. In my case I created MD0(/boot), MD1(/), and MD2(/home)Do Not create a MD device for your swap partitions or else you will constantly get errors about a degraded array.
15.) When you are done creating all of your MD arrays and adding disk partitions to them you can go back to the main menu of the disk partitioner. You will now see RAID Device# 0 and RAID Device# 1. Each RAID Device will show the partitions of your MD arrays you created. you can then select each on and specify to use ext3, ext4, ReiserFS, etc. and what the mount point is just like you would if it was a hard drive. For me RAID Device# 0 was /boot, RAID Device# 1 was /, and RAID Device# 2 was /home.
16.)Once all of the RAID Devices are configures select 'Finish Partitioning and write changes to disk'
17.) Select yes and watch it do it's thing.
18.) Finish the rest of the install like normal
I've got a question for you, worm5252. What about grub? Won't he have to manually install it on the second disk of the array before that disk will be bootable, or does the Debian grub installer do that now?
Debian Installer Should do it for him. Easy wat to find out is to change /boot/grub/menu.lst to have root=/dev/sdb1 instead of /dev/md# and then reboot
No, that won't do it. That doesn't check to see whether the grub bootloader is on sector zero of the second disk. That only checks to see if the grub on disk0 can read the menu.lst on disk0 and then boot from disk1.
Added:
To actually check it, you need to swap the disk cables.
No, that won't do it. That doesn't check to see whether the grub bootloader is on sector zero of the second disk. That only checks to see if the grub on disk0 can read the menu.lst on disk0 and then boot from disk1.
Added:
To actually check it, you need to swap the disk cables.
Well if it isn't installed it can be done easily enough by running grub, selecting the sdb and the running setup. It is like 3 commands to do it and reading the man pages can tell you how.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.