LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 04-11-2009, 09:52 AM   #1
nex9
LQ Newbie
 
Registered: Apr 2009
Posts: 8

Rep: Reputation: 0
Software raid not working


I'm trying to get a software raid 10 set up in ubuntu 8.10 and having some issues. This is for a non-boot/system set of drives.

I was able to create the raid with:
mdadm -v --create /dev/md0 --level=raid10 --raid-devices=4 /dev/sda1 /dev/sdc1 /dev/sdd1 /dev/sde1

Then mkfs.ext3 and mount it. The array fully sync'ed according to /proc/mdstat.

The problem is that it is not working after I reboot the box. After reboot, /proc/mdstat shows:
Personalities : [raid10]
unused devices: <none>
mdadm --detail /dev/md0

and
mdadm --detail /dev/md0
mdadm: md device /dev/md0 does not appear to be active.

At this point, I have to do a

mdadm --assemble --verbose --run /dev/md0

which seems to fix things. Any idea why this is happening?

I already have this in mdadm.conf:

ARRAY /dev/md0 level=raid10 num-devices=4 UUID=877d4490:3d657917:134a5b84:9888814b

I also have this in /etc/modules:

fuse
lp
rtc
md
raid10

Thanks!
 
Old 04-11-2009, 02:26 PM   #2
inside-man
LQ Newbie
 
Registered: Mar 2009
Posts: 16

Rep: Reputation: 1
Hello, have you checked the partition type? It has to be 'fd' , that is the mark where the kernel tries to detect existing raid arrays and startup the md...
Good Luck Randolf Balasus
 
Old 04-11-2009, 08:12 PM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Use fdisk to check the partition type as mentioned.
However, that being said, in your OP you don't mention adding it to /etc/fstab. If its not there the system can't magically guess where you wanted it or if you wanted it mounted.
Remember /dev/md0 is just another 'disk' to the OS; still needs to be explicitly mounted on a dir somewhere.
 
Old 04-12-2009, 03:08 PM   #4
nex9
LQ Newbie
 
Registered: Apr 2009
Posts: 8

Original Poster
Rep: Reputation: 0
Thanks all. I changed my partition table to use the FD type (hadn't done that before - current sfdisk -l for one of the drives is below. All 4 drives are identically partitioned), and recreated by array. Still no luck.

I haven't put this in /etc/fstab yet - I've just been mounting it manually, when /dev/md0 is actually working (which at this point requires a manual mdadm --assemble --scan). Any other ideas? Do I need to initrd even though this isn't a bootable partition?


sfdisk -l /dev/sdb

Disk /dev/sdb: 60801 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

Device Boot Start End #cyls #blocks Id System
/dev/sdb1 1 999 999 8024467+ fd Linux raid autodetect
/dev/sdb2 0 - 0 0 0 Empty
/dev/sdb3 0 - 0 0 0 Empty
/dev/sdb4 0 - 0 0 0 Empty
 
Old 04-18-2009, 08:54 AM   #5
nex9
LQ Newbie
 
Registered: Apr 2009
Posts: 8

Original Poster
Rep: Reputation: 0
Unfortunately this is still not working.

I get this during a reboot if I have that line in /etc/fstab:

fsck 1.40.8 (13-Mar-200
fsck.ext3: Invalid argument while trying to open /dev/md0^M
/dev/md0:
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>

fsck died with exit status 8

Also:

mdadm -D /dev/md0
mdadm: md device /dev/md0 does not appear to be active.

mdadm --assemble --scan
mdadm: /dev/md0 has been started with 4 drives.
root@linux-quad:/var/log/fsck# mdadm -D /dev/md0
/dev/md0:
Version : 00.90.03
Creation Time : Sun Apr 12 16:24:14 2009
Raid Level : raid10
Array Size : 16048768 (15.31 GiB 16.43 GB)
Used Dev Size : 8024384 (7.65 GiB 8.22 GB)
Raid Devices : 4
Total Devices : 4
Preferred Minor : 0
Persistence : Superblock is persistent

Update Time : Mon Apr 13 07:23:28 2009
State : clean
Active Devices : 4
Working Devices : 4
Failed Devices : 0
Spare Devices : 0

Layout : near=2, far=1
Chunk Size : 64K

UUID : 465177d9:168e40e8:134a5b84:9888814b (local to host linux-quad)
Events : 0.6

Number Major Minor RaidDevice State
0 8 17 0 active sync /dev/sdb1
1 8 33 1 active sync /dev/sdc1
2 8 49 2 active sync /dev/sdd1
3 8 65 3 active sync /dev/sde1
 
  


Reply



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
LXer: How To Resize RAID Partitions (Shrink & Grow) (Software RAID) LXer Syndicated Linux News 1 05-01-2009 12:02 PM
software raid 1 not working sunlinux Linux - Server 3 05-10-2008 05:25 AM
Adding an old software-RAID array to a software-RAID installation.. Boot problems GarethM Linux - Hardware 2 05-05-2008 03:16 PM
Reuse disks software RAID not working GATTACA Fedora 4 06-10-2007 09:05 PM
Will a ex - Software Raid 1 disk boot without Raid software? carlosruiz Linux - Software 0 05-27-2006 01:12 PM

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

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