LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-04-2010, 07:52 AM   #1
agurkas
LQ Newbie
 
Registered: Aug 2010
Posts: 3

Rep: Reputation: 0
mdadm software raid problem after every reboot


Hi guys,

I hope someone will help with this.

problem in short:
I cannot figure out why mdadm software raid fails to autodetect and assemble raid1 array members after every reboot.
Somehow it assembles raid members wrongly. After I fix it manually it works fine again until the next reboot. It seemed to work fine initially.

more details:
on boot mdadm assembly is wrong. what I get is
cat /proc/mdstat:
md9: active raid1 sdb1 sda0(which absolutely wrong - no idea how it ends up with this).
other members are not listed at all. Ubuntu fails to mount and boot stops with initramfs prompt.
then I have to manually do:
mdadm --stop /dev/md9
mdadm -A --scan
now it assembles all raid volumes correctly.
cat /proc/mdstat:
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md9 : active raid1 sda9[0] sdb9[1]
7378880 blocks [2/2] [UU]
md0 : active raid1 sda8[0] sdb8[1]
173521856 blocks [2/2] [UU]
md1 : active raid1 sda7[0] sdb7[1]
97659008 blocks [2/2] [UU]
md6 : active raid1 sda6[0] sdb6[1]
9767424 blocks [2/2] [UU]
md2 : active raid1 sda5[0] sdb5[1]
97659008 blocks [2/2] [UU]

then it boots and works fine till next reboot.

I am using
Ubuntu Lucid lynx with grub2.
Box is Dell XPS420 with 2 hard drives and fake raid controller. It had fake raid0 installed by default with windows but I disassembled and disabled that in BIOS and created Linux software raid basically from scratch using alternative Ubuntu install.

thanks for help,
agurkas
 
Old 08-04-2010, 09:15 AM   #2
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Arch/Manjaro, might try Slackware again
Posts: 1,851
Blog Entries: 14

Rep: Reputation: 284Reputation: 284Reputation: 284
Did you make a mdadm.conf file with something like mdadm -D --scan >> /etc/mdadm/mdadm.conf ?
 
Old 08-04-2010, 09:36 AM   #3
agurkas
LQ Newbie
 
Registered: Aug 2010
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by mostlyharmless View Post
Did you make a mdadm.conf file with something like mdadm -D --scan >> /etc/mdadm/mdadm.conf ?
thanks for asking but yes I did. at the bottom of /etc/mdadm/mdadm.conf I have all members listed by UUID:
#taken from #mdadm --examine --scan
ARRAY /dev/md2 level=raid1 num-devices=2 UUID=c0612d2a:3ce4c7c9:3d186b3c:53958f34
ARRAY /dev/md6 level=raid1 num-devices=2 UUID=7ce4a26e:1ffb7c27:5611f15b:a92b01a9
ARRAY /dev/md1 level=raid1 num-devices=2 UUID=6977edd0:1bc5a44e:5611f15b:a92b01a9
ARRAY /dev/md0 level=raid1 num-devices=2 UUID=41ea4263:2d9ec7d3:21f2bbc1:ca3ddc1f
ARRAY /dev/md9 level=raid1 num-devices=2 UUID=383abd60:380d197a:5611f15b:a92b01a9

any ideas?
BTW.
all those raid partitions are also set to Linux raid autodetect as it should be. From fdisk I have output that I have noticed has sda8 partition end and sda9 partition start to be same cylinder number 59883 for some reason. Could this be a problem?

fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x8ef2d872

Device Boot Start End Blocks Id System
/dev/sda1 * 1 12748 102396928 7 HPFS/NTFS
/dev/sda2 12749 60802 385988219+ 5 Extended
/dev/sda5 12749 24906 97659103+ fd Linux raid autodetect
/dev/sda6 24907 26122 9767488+ fd Linux raid autodetect
/dev/sda7 26123 38280 97659103+ fd Linux raid autodetect
/dev/sda8 38281 59883 173521920 fd Linux raid autodetect
/dev/sda9 59883 60802 7378944 fd Linux raid autodetect

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x8d1eaa59

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 12748 102396928 7 HPFS/NTFS
/dev/sdb2 12749 60802 385988219+ 5 Extended
/dev/sdb5 12749 24906 97659103+ fd Linux raid autodetect
/dev/sdb6 24907 26122 9767488+ fd Linux raid autodetect
/dev/sdb7 26123 38280 97659103+ fd Linux raid autodetect
/dev/sdb8 38281 59883 173521920 fd Linux raid autodetect
/dev/sdb9 59883 60802 7378944 fd Linux raid autodetect

Disk /dev/md2: 100.0 GB, 100002824192 bytes
2 heads, 4 sectors/track, 24414752 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

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

Disk /dev/md6: 10.0 GB, 10001842176 bytes
2 heads, 4 sectors/track, 2441856 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

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

Disk /dev/md1: 100.0 GB, 100002824192 bytes
2 heads, 4 sectors/track, 24414752 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

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

Disk /dev/md0: 177.7 GB, 177686380544 bytes
2 heads, 4 sectors/track, 43380464 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

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

Disk /dev/md9: 7555 MB, 7555973120 bytes
2 heads, 4 sectors/track, 1844720 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

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

any ideas?

thanks
 
Old 08-04-2010, 09:53 AM   #4
agurkas
LQ Newbie
 
Registered: Aug 2010
Posts: 3

Original Poster
Rep: Reputation: 0
solved it myself.
I deleted raid member md9 (was not used anyway)
deleted partitions that were used in that raid.
/dev/sda9
/dev/sdb9
not sure if that makes any difference but I placed raid members in mdadm.conf in order by md number 0,1,2,6
ARRAY /dev/md0 level=raid1 num-devices=2 UUID=41ea4263:2d9ec7d3:21f2bbc1:ca3ddc1f
ARRAY /dev/md1 level=raid1 num-devices=2 UUID=6977edd0:1bc5a44e:5611f15b:a92b01a9
ARRAY /dev/md2 level=raid1 num-devices=2 UUID=c0612d2a:3ce4c7c9:3d186b3c:53958f34
ARRAY /dev/md6 level=raid1 num-devices=2 UUID=7ce4a26e:1ffb7c27:5611f15b:a92b01a9

now it boots with no problem at all.

regards

agurkas
 
  


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 On
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 03:35 PM
Software RAID using mdadm onthefritz Red Hat 2 12-09-2009 03:38 AM
how to setup a software raid mdadm oehq Linux - Newbie 1 04-28-2009 01:35 AM
remount RAID drive after reboot with mdadm ufmale Linux - Software 1 11-15-2007 08:13 PM
Major problem with software raid (mdadm) and disk failure norwolf Linux - Server 8 07-27-2007 06:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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