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 |
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.
|
 |
05-14-2006, 12:28 PM
|
#1
|
LQ Newbie
Registered: May 2006
Posts: 1
Rep:
|
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.
|
|
|
05-15-2006, 05:48 AM
|
#2
|
Member
Registered: Mar 2006
Location: belguim
Distribution: fedora, mandriva, suse
Posts: 148
Rep:
|
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.
|
|
|
05-15-2006, 07:20 AM
|
#3
|
LQ Newbie
Registered: Apr 2006
Posts: 10
Rep:
|
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
|
|
|
05-16-2006, 03:47 AM
|
#4
|
Member
Registered: Mar 2006
Location: belguim
Distribution: fedora, mandriva, suse
Posts: 148
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 10:30 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
|
|