LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 02-11-2010, 04:57 AM   #1
caio2710
LQ Newbie
 
Registered: Feb 2010
Posts: 5

Rep: Reputation: 0
Question RAID at root partition in Debian.


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.
Old 02-11-2010, 09:51 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,349

Rep: Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750
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.
 
0 members found this post helpful.
Old 02-11-2010, 10:13 PM   #3
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
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.
 
0 members found this post helpful.
Old 02-11-2010, 11:10 PM   #4
worm5252
Member
 
Registered: Oct 2004
Location: Atlanta
Distribution: CentOS, RHEL, HP-UX, OS X
Posts: 567

Rep: Reputation: 57
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
 
2 members found this post helpful.
Old 02-12-2010, 03:22 PM   #5
caio2710
LQ Newbie
 
Registered: Feb 2010
Posts: 5

Original Poster
Rep: Reputation: 0
Thank you.

Thank you very much, worm5252. My RAID level 1 at root partition is finally done.
 
Old 02-12-2010, 03:53 PM   #6
worm5252
Member
 
Registered: Oct 2004
Location: Atlanta
Distribution: CentOS, RHEL, HP-UX, OS X
Posts: 567

Rep: Reputation: 57
No Problem Buddy.
 
Old 02-12-2010, 05:12 PM   #7
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
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?
 
Old 02-12-2010, 05:36 PM   #8
worm5252
Member
 
Registered: Oct 2004
Location: Atlanta
Distribution: CentOS, RHEL, HP-UX, OS X
Posts: 567

Rep: Reputation: 57
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
 
Old 02-12-2010, 06:02 PM   #9
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
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.
 
Old 02-12-2010, 08:38 PM   #10
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
This is the best tutorial I have read on setting up a bootable RAID1 in Debian. http://www200.pair.com/mecham/raid/r...aded-etch.html

Most of the steps are not needed anymore because RAID is alread installed. But it proides useful other information as well.

jlinkels
 
1 members found this post helpful.
Old 02-12-2010, 09:56 PM   #11
worm5252
Member
 
Registered: Oct 2004
Location: Atlanta
Distribution: CentOS, RHEL, HP-UX, OS X
Posts: 567

Rep: Reputation: 57
Quote:
Originally Posted by Quakeboy02 View Post
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.
 
  


Reply

Tags
debian, raid1, root


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
GRUB won't load windows partition - root (hd0,0), Filesystem type unknown partition.. cillm527 Linux - Software 4 04-27-2008 06:44 AM
no raid disk found remounting root partition shahz Linux - Networking 0 06-11-2007 07:48 PM
Converting an ordinary partition to RAID 1 or RAID 5? krishvij Linux - Newbie 1 03-20-2005 09:39 PM
software RAID on the root partition spuzzzzzzz Linux - Hardware 5 08-12-2004 11:28 PM
How do I Set up Debian on a ReiserFS Root Partition? atheist Debian 3 07-12-2004 01:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:17 PM.

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