LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-19-2006, 11:18 AM   #1
rosey
LQ Newbie
 
Registered: Jan 2005
Location: Michigan, US
Distribution: Debian/Ubuntu
Posts: 12

Rep: Reputation: 0
RAID through mdadm


I have setup two drives in an array using mdadm but everytime i restart the machine the array dissapears and I have to "assemble" the array again. After I reassamble everything that was in the array before the reboot is still there but I need to know how to make it stick.

I made the array with:
#mdadm --create /dev/md0 --level 1 --raid-devices=2 /dev/sda1 /dev/sdb2

Or if mdadm is not the ideal way to do this I'm up for trying something else.

Thanks for your help in advance,
Cody
 
Old 08-20-2006, 05:21 AM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
If you configure the arrays in /etc/mdadm.conf and then make sure that mdadm is starting on boot then it should start the array devices automatically.
 
Old 08-20-2006, 04:08 PM   #3
rosey
LQ Newbie
 
Registered: Jan 2005
Location: Michigan, US
Distribution: Debian/Ubuntu
Posts: 12

Original Poster
Rep: Reputation: 0
You were right about it being a startup issue.

I thought debian would do that for me but when I checked out my rc2.d directory I did not find the link to /etc/init.d/mdadm-raid. Once I made that link it was able to do a 'mount -a' and it mounts without me having to assemble every time I reboot.

I do have one other question though. When I boot up /dev/md0 doesn't get mounted. I know its setup correctly in fstab because when I do a 'mount -a' everything mounts fine.

I'm not sure if i have to make the sym link to /etc/init.d/mdadm-raid to a priority or what. For the time being I just made a shell file to do a 'mount -a' right at the end of the boot (I know its dirty). This isn't seriously important to me but I would like to know why its not mounting on its own.

Thanks,
COdy
 
Old 08-21-2006, 01:54 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Can you post a copy of /etc/fastab and /etc/mdadm.conf
 
Old 09-07-2006, 06:44 PM   #5
rosey
LQ Newbie
 
Registered: Jan 2005
Location: Michigan, US
Distribution: Debian/Ubuntu
Posts: 12

Original Poster
Rep: Reputation: 0
DEVICE partitions
ARRAY /dev/md0 level=raid1 num-devices=2 UUID=647c4943:e5dd243d:85bd62bd:0f7f121b
devices=/dev/sda1,/dev/sdb1

Sorry it took me so long to respond but here it is.
 
Old 04-08-2007, 12:57 PM   #6
doorito
LQ Newbie
 
Registered: Feb 2006
Posts: 11

Rep: Reputation: 0
Unhappy raid5 on mdadm

Hi:

I'm new/old at linux. The good thing about Linux is, once it's setup there is not much the user have to do to maintain it. The problem with it is once it's time to redo the system you've forgotten what your originally did.

Anyways:

I have a similar issue with my system. I'm running Debian 3.1.5 kernel 2.6.8.3.x and using mdadm for my raid setup. I have various drives setup

/dev/hda
/dev/hdb
/dev/hdc

/dev/sda
/dev/sdb
/dev/sdc
/dev/sdd

The most important are the /dev/sd[abcd] drives. I'm trying to setup RAID5 on these drives. I have read and followed various instructions on this and other forums and have already configured/rebuild multiple times only to end up with the same result.

The problem is mdadm doesn't appear to be reading /etc/mdadm/mdadm.conf on boot, and because it doesn't get read on boot I always get this message "mdadm: no devices found for /dev/md0". There are also a bunch of other messages that followed, but suffice to say if mdadm can't find any devices belonging to /dev/md0 array it will error out and will not create the array.

The reason I believe mdadm is not reading mdadm.conf is because I can logon and execute the command to assemble the array:
#mdadm -A /dev/md0
mdadm: /dev/md0 has been started with 4 drives.

I also test /etc/fstab by:
#mount -a

#df -h
shows the mounted file system
/dev/md0 101G 33M 96G 1% /raid5

This is a pain especially if I can't rely on the system to complete it's boot-up without pausing at "mdadm: no devices found for /dev/md0" , give root password for maintenance or CONTROL-D to continue.

Here's my /etc/mdadm/mdadm.conf
DEVICE partitions
DEVICE /dev/sda /dev/sdb /dev/sdc /dev/sdd

ARRAY /dev/md0 level=raid5 num-devices=4 UUID=23ff6bb9:eb8d753f:2682b942:7ae393e
7
devices=/dev/sda,/dev/sdb,/dev/sdc,/dev/sdd


It doesn't matter if I remove the first line "DEVICE partitions" it still pauses

Here's my /etc/fstab

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hda3 / ext3 defaults,errors=remount-ro 0 1
/dev/hda1 /boot ext3 defaults 0 2
/dev/hdc /done_downloading ext3 defaults 0 2
/dev/hdb1 /downloading ext3 defaults 0 2
/dev/md0 /raid5 ext3 defaults 0 2
/dev/hda2 none swap sw 0 0
/dev/hdd /media/cdrom0 iso9660 ro,user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0


I've also checked /etc/rd2.d to make sure the link to mdadm is proper...

I've also checked /etc/init.d mdadm and mdadm-raid file, from what I can tell they look proper...

Is there anything else I'm missing? If some linux/mdadm guru or someone experience them me (and I know there are plenty out there) who can give me some info on this problem, I will be extremely greatful.

I know it's a long read but please understand my delimma.
 
  


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
Why can't I mount this md0 raid? (mdadm and software raid) cruiserparts Linux - Software 35 01-05-2013 04:35 PM
RAID - mdadm.conf keith ralph Linux - General 4 05-05-2006 10:10 AM
Linux raid with mdadm eyt Linux - Newbie 6 02-07-2006 06:26 AM
Mdadm Raid question stefaandk Linux - General 12 08-16-2005 03:11 AM
Mailing with MDADM RAID rootking Linux - Hardware 1 07-26-2005 05:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:23 AM.

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