LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-14-2006, 12:28 PM   #1
dplmartin
LQ Newbie
 
Registered: May 2006
Posts: 1

Rep: Reputation: 0
Unhappy Software RAID; can't create /dev/md1


Hi,

I hope someone can help me with my software RAID problem. In a nutshell I can create /dev/md0 using either mkraid or mdadm. However I can't create /dev/md1 or /dev/md2. I'm told by both programs that there is no such file or directory. I've checked the syntax and parameters and can't find anything wrong.

Details
========

The distribution is Mandrake Linux 2006. However, I downloaded the 2.6.16.16 kernel source and re-compiled it to include direct support for all the IDE controller cards, Reiserfs filesystem and RAID support. The modified kernel boots up OK.

I have three hard drives in the machine, each on a different IDE controller.
HDA is 120GB
HDE is 152GB
HDI is 149GB

I started the linux installation from scratch. Using Diskdrake, I configured the drives as per the following:
HDA = primary partition formatted Reiserfs for entire disk (114GB), [hda1]
HDE = primary partition formatted Reiserfs, 100MB, [hde1]
extended partition formatted Reiserfs, 114GB, [hde5]
extended partition formatted Reiserfs, 34GB, [hde6]
primary partition formatted native ext2, 3.6GB, root mount point, [hde4]
HDI = primary partition formatted Reiserfs, 100MB, [hdi1]
extented partition formatted Reiserfs, 114GB, [hdi5]
extended partition formatted Reiserfs, 34GB, [hdi6]

Note: I also tried the configuration where all partitions are primary and no extended partitions.

I installed the OS on to hde4 so that I didn't have to worry about it while I was creating the arrays. I plan to copy it over to /dev/md0 once everything is setup. Then I'll have two copies of the OS that I can boot to, one version on the RAID and another that isn't.

My aim is to create 3 RAID arrays:
/dev/md0 is a RAID 5 array using the 3 114GB partitions - hda1,hde5,hdi5. It will eventually have the OS and data files on it.

/dev/md1 is a RAID 1 array using the 2 100MB partitions - hde1, hdi1. It will store the modified boot kernel 2.6.16.16 so that LILO can see it.

/dev/md2 is a RAID 1 array using the remaining 34GB partitions - hde6, hdi6. I just wanted to make use of the remaining space on the drives.

All goes well up to the point of making the RAIDS. I'll reference mdadm but I've included /etc/raidtab at the end of the post as well. I start with /dev/md0:
mdadm -Cv /dev/md0 -l5 -n3 -c32 /dev/hda1 /dev/hde5 /dev/hdi5
This gets constructed without any problems.

Now for /dev/md1:
mdadm -Cv /dev/md1 -l1 -n2 -c32 /dev/hde1 /dev/hdi1
mdadm tells me that:
mdadm: error opening /dev/md1: No such file or directory

The story is the same for /dev/md2 and the response from mkraid.

Here's the /etc/raidtab
# md0 is the root array, about 240GB
raiddev /dev/md0
raid-level 5
nr-raid-disks 3
nr-spare-disks 0
persistent-superblock 1
parity-algorithm left-symmetric
chunk-size 32
device /dev/hda1
raid-disk 0
device /dev/hde5
raid-disk 1
device /dev/hdi5
raid-disk 2

# md1 is the boot kernel array, about 100MB
raiddev /dev/md1
raid-level 1
nr-raid-disks 2
nr-spare-disks 0
persistent-superblock 1
chunk-size 32
device /dev/hde1
raid-disk 0
device /dev/hdi1
raid-disk 1

# md2 is a spare mirror, about 34GB
raiddev /dev/md2
raid-level 1
nr-raid-disks 2
nr-spare-disks 0
persistent-superblock 1
chunk-size 32
device /dev/hde6
raid-disk 0
device /dev/hdi6
raid-disk 1

Your thoughts on this matter would be much appreciated. I'm either trying to do something that can't be done or I'm missing a step.

Thanks for your help.

Dominic

Last edited by dplmartin; 05-14-2006 at 12:32 PM.
 
Old 05-15-2006, 05:48 AM   #2
shorun
Member
 
Registered: Mar 2006
Location: belguim
Distribution: fedora, mandriva, suse
Posts: 148

Rep: Reputation: 15
mandriva raid

the mandriva tool can help you make software raid.
to do this, type "drakconf"

ps: if you want to compile your linux, best use gentoo.
mandriva is best to use as it is, install with the tool from cd.

you should prob. need to make your partitions "linux raid" in stead of reiserfs. then you add both partitions to the array and you format the array as eg: reiser.


it may be needed to reinstall your system.

keep this in mind:
your swap AND your /boot CANNOT be in a software raid, you CAN put / in an array but then you must make a seperate /boot partition.
 
Old 05-15-2006, 07:20 AM   #3
DENSVO
LQ Newbie
 
Registered: Apr 2006
Posts: 10

Rep: Reputation: 0
Personally, I usually find it more efficient not to have software RAID on non-critical systems, but rather schedule dd for copying one drive onto another. This way the system is obviously not failure tolerant, but is very easy to fix quickly by just reconnecting the harddrive, and also this provides somewhat a last day backup of files that might be deleted by mistake.

Before using this, fstab should be edited in order NOT to use labels (for example in RedHat/Fedora).

Best regards,
Den
 
Old 05-16-2006, 03:47 AM   #4
shorun
Member
 
Registered: Mar 2006
Location: belguim
Distribution: fedora, mandriva, suse
Posts: 148

Rep: Reputation: 15
Quote:
Originally Posted by DENSVO
Personally, I usually find it more efficient not to have software RAID on non-critical systems, but rather schedule dd for copying one drive onto another. This way the system is obviously not failure tolerant, but is very easy to fix quickly by just reconnecting the harddrive, and also this provides somewhat a last day backup of files that might be deleted by mistake.
if it is not esential that the data remains online then indeed software raid may not be the best option. but when you start copying eg: 100GB each day it could become painfull.

if you delete a file it's the user's fault, should really be carefull with the rm command/delete key.
and to prevent data loss/corruption you best write to external media every once and a while
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
FC5 installer software RAID maker messed up old /dev/md0 cruiserparts Fedora 2 04-05-2006 08:43 AM
Create RAID 5 software array wesleywest Red Hat 3 02-09-2005 02:41 AM
Mandrake 10.1 not creating /dev/md1 Meta42 Mandriva 1 11-23-2004 06:48 AM
Create software RAID partitions first, then create filesystem partitions on top of th stefanlasiewski Linux - Software 1 04-28-2004 04:12 PM
moving system from ide software raid to new box with scsi raid ftumsh Linux - General 0 10-28-2003 09:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:12 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