LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 10-31-2008, 10:43 AM   #1
matrix007
LQ Newbie
 
Registered: Oct 2008
Posts: 1

Rep: Reputation: 0
Problem Assembling RAID 0 arrays during bootup


Raid 0 arrays are not assembled after reboot.

INITIAL SETUP
_______________________________

#fdisk -l
----------

Disk /dev/sda: 73.5 GB, 73543163904 bytes
255 heads, 63 sectors/track, 8941 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 33 265041 83 Linux
/dev/sda2 8805 8941 1100452+ 82 Linux swap / Solaris
/dev/sda3 34 8804 70453057+ 83 Linux

Partition table entries are not in disk order

Disk /dev/sdb: 73.4 GB, 73407868928 bytes
255 heads, 63 sectors/track, 8924 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdb doesn't contain a valid partition table

****** NOT USING /dev/sdb AT ALL ******

Created two 16 GB files on devices /dev/sda and made them iSCSI devices.


After setting up iSCSI devices

#fdisk -l

Disk /dev/sda: 73.5 GB, 73543163904 bytes
255 heads, 63 sectors/track, 8941 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 33 265041 83 Linux
/dev/sda2 8805 8941 1100452+ 82 Linux swap / Solaris
/dev/sda3 34 8804 70453057+ 83 Linux

Partition table entries are not in disk order

Disk /dev/sdb: 73.4 GB, 73407868928 bytes
255 heads, 63 sectors/track, 8924 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdb doesn't contain a valid partition table

Disk /dev/sdc: 17.1 GB, 17179869184 bytes
64 heads, 32 sectors/track, 16384 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes

Device Boot Start End Blocks Id System
/dev/sdc1 1 16384 16777200 fd Linux raid autodetect

Disk /dev/sdd: 17.1 GB, 17179869184 bytes
64 heads, 32 sectors/track, 16384 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes

Device Boot Start End Blocks Id System
/dev/sdd1 1 16384 16777200 fd Linux raid autodetect



/dev/sdc and /dev/sdd are the new iSCSI devices which i created. I have one partition in each with fd option.


NOW, i am building a RAID 0 across these devices,

I used mdadm

mdadm --create /dev/md0 --level=0 --raid-devices=2 /dev/sdc1 /dev/sdd1

mkfs.ext3 /dev/md0

I partitioned it using fdisk /dev/md0

fdisk -l shows

( in addition to the previous output)

Disk /dev/md0: 34.3 GB, 34359476224 bytes
2 heads, 4 sectors/track, 8388544 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Device Boot Start End Blocks Id System
/dev/md0p1 1 62501 250002 83 Linux
/dev/md0p2 62502 8312502 33000004 83 Linux
/dev/md0p3 8312503 8388544 304168 83 Linux
______________________
NOTE: just FYI

when i try to do

#mkfs.ext3 /dev/md0p1
mke2fs 1.39 (29-May-2006)
Could not stat /dev/md0p1 --- No such file or directory

The device apparently does not exist; did you specify it correctly?

_________

I updated /etc/mdadm.conf

mdadm -E -s

mdadm: metadata format 00.90 unknown, ignored.
ARRAY /dev/md0 level=raid0 num-devices=2 UUID=85fc3c30:a57a2999:39b3f74a:bbe7a877


mdadm --detail /dev/md0
mdadm: metadata format 00.90 unknown, ignored.
/dev/md0:
Version : 00.90
Creation Time : Fri Oct 31 10:06:51 2008
Raid Level : raid0
Array Size : 33554176 (32.00 GiB 34.36 GB)
Raid Devices : 2
Total Devices : 2
Preferred Minor : 0
Persistence : Superblock is persistent

Update Time : Fri Oct 31 10:06:51 2008
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0

Chunk Size : 64K

UUID : 85fc3c30:a57a2999:39b3f74a:bbe7a877
Events : 0.1

Number Major Minor RaidDevice State
0 8 33 0 active sync /dev/sdc1
1 8 49 1 active sync /dev/sdd1


HOWEVER,

After i reboot the machine,

the arrays are not assembled, and when i do fdisk -l, i cannot see disk /dev/md0

I tried putting command mdadm -A -s in /etc/rc.local but of no use.

Can someone please explain me how /dev/md0 shows up when i reboot the machine ?

Thanks
 
Old 11-01-2008, 03:15 AM   #2
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
First of all, regenerate the initramfs image and see if your problems go away. If not, unpack the initramfs image and see if it contains the md and raid0 drivers, and md tools. If not, you may need to tweak the initramfs generation scripts to ensure that the drivers are included in the image and loaded, and that the md config file and tools are included and run as appropriate.

How you regenerate the initramfs image depends on your particular distro; for Debian it's simply: dpkg-reconfigure linux-image-$(uname -r)
 
Old 04-05-2009, 08:39 AM   #3
freehood4all
LQ Newbie
 
Registered: Apr 2009
Location: 127.0.0.1
Distribution: Debian, Gentoo, Ubuntu
Posts: 6

Rep: Reputation: 0
Quote:
Originally Posted by pinniped View Post
How you regenerate the initramfs image depends on your particular distro; for Debian it's simply: dpkg-reconfigure linux-image-$(uname -r)
Pinniped, Thank you for this post! Newbie with a RAID controller and Linux here...

I recently bought a Areca 1220 RAID controller. I was having difficulty getting my hdd on my motherboards hdd controller to boot. I had an error message with something like "FAILED! /dev/sda1 was not found! Dropping to a shell!"

I'm not sure if it's a problem with Debian that needs to be reported? The arcmsr driver is built into the kernel for Debian Lenny (kernel 2.6.26-1) and both the OS hard drive and the RAID array where correctly displayed when installing. However after reboot a "dpkg-reconfigure linux-image-$(uname -r)" needs to be done.
 
  


Reply

Tags
boot, creating, devices, raid, two



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
multiple md raid arrays edgjerp Linux - Software 0 10-13-2007 07:28 AM
mdadm: re-assembling raid array on new installation hamish Linux - Server 3 06-10-2007 02:23 PM
SATA RAID 0 errors on bootup -- invalid raid superblock vonst Slackware 3 07-04-2006 03:55 PM
Transferring two RAID arrays Dee-ehn Linux - Software 2 09-01-2004 12:12 AM
Raid Arrays and IDE Probes Tarball_Phreak Linux - Hardware 0 07-15-2003 04:42 PM

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

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