You are not logged in.

#1 2009-03-21 00:19:53

andjjru
Member
Registered: 2009-02-18
Posts: 12

Arch won't load my mdraid array, but ubuntu will?

Hi guys,

So I had a Mythbuntu 8.04.1 box set up in a mdadm RAID 5 with the /boot on a usb drive, but the mobo is out for warranty.  I threw all the drives in my desktop and copied over the mdadm.conf file, but it only assembles and mounts at boot sporadically under Arch.  If I use my Ubuntu /boot usb to boot up, it works fine, and normally rebooting from Ubuntu and going back into Arch it will then detect, assemble, and mount correctly.  I used that as my go to fix up until now, as attempting to reassemble under Arch has not been successful.  But that isn't working today.  ATM, cat /proc/mdstat is showing only one drive out of the three.  What could possibly be causing this behavior?

Thanks.

Offline

#2 2009-03-21 00:43:35

xaiviax
Member
From: Michigan
Registered: 2008-11-04
Posts: 282

Re: Arch won't load my mdraid array, but ubuntu will?

What's your /etc/mkinitcpio.conf and /boot/grub/menu.lst ?

Offline

#3 2009-03-21 01:12:03

andjjru
Member
Registered: 2009-02-18
Posts: 12

Re: Arch won't load my mdraid array, but ubuntu will?

My mkinitcpio.conf:

# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run.  Advanced users may wish to specify all system modules
# in this array.  For instance:
#     MODULES="piix ide_disk reiserfs"
MODULES="pata_acpi pata_amd ata_generic scsi_mod sata_nv"

# BINARIES
# This setting includes, into the CPIO image, and additional
# binaries a given user may wish.  This is run first, so may
# be used to override the actual binaries used in a given hook.
# (Existing files are NOT overwritten is already added)
# BINARIES are dependancy parsed, so you may safely ignore libraries
BINARIES=""

# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in anyway.  This is useful for config files.
# Some users may wish to include modprobe.conf for custom module options,
# like so:
#    FILES="/etc/modprobe.conf"
FILES=""

# HOOKS
# This is the most important setting in this file.  The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added.  Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'modload' may be used in place of 'udev', but is not recommended
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
#    This setup specifies all modules in the MODULES setting above.
#    No raid, lvm2, or encrypted root is needed.
#    HOOKS="base"
#
#    This setup will autodetect all modules for your system and should
#    work as a sane default
#    HOOKS="base udev autodetect pata scsi sata filesystems"
#
#    This is identical to the above, except the old ide subsystem is
#    used for IDE devices instead of the new pata subsystem.
#    HOOKS="base udev autodetect ide scsi sata filesystems"
#
#    This setup will generate a 'full' image which supports most systems.
#    No autodetection is done.
#    HOOKS="base udev pata scsi sata usb filesystems"
#
#    This setup assembles an pata raid array with an encrypted root FS.
#    Note: See 'mkinitcpio -H raid' for more information on raid devices.
#    HOOKS="base udev pata raid encrypt filesystems"
#
#    This setup loads an lvm2 volume group on a usb device.
#    HOOKS="base udev usb lvm2 filesystems"
HOOKS="base udev autodetect pata scsi sata usb fw usbinput keymap uresume filesystems dsdt"

My Arch menu.lst:

default 0
timeout 5
color light-blue/black light-cyan/blue

title Arch Linux
root (hd0,0)
kernel /vmlinuz26 root=/dev/disk/by-uuid/d7bafe42-0b62-4de2-9102-726f58e58ba1 ro quiet vga=791 splash
initrd /kernel26.img

title Arch Linux Fallback
root (hd0,0)
kernel /vmlinuz26 root=/dev/disk/by-uuid/d7bafe42-0b62-4de2-9102-726f58e58ba1 ro
initrd /kernel26-fallback.img

My Mythbuntu menu.lst:

# menu.lst - See: grub(8), info grub, update-grub(8)
#            grub-install(8), grub-floppy(8),
#            grub-md5-crypt, /usr/share/doc/grub
#            and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default        0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout        3

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
hiddenmenu

# Pretty colours
#color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line)  and entries protected by the
# command 'lock'
# e.g. password topsecret
#      password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title        Windows 95/98/NT/2000
# root        (hd0,0)
# makeactive
# chainloader    +1
#
# title        Linux
# root        (hd0,1)
# kernel    /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
##      kopt_2_6_8=root=/dev/hdc1 ro
##      kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=/dev/md0 ro

## Setup crashdump menu entries
## e.g. crashdump=1
# crashdump=0

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,0)

## should update-grub create alternative automagic boot options
## e.g. alternative=true
##      alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
##      lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash

## should update-grub lock old automagic boot options
## e.g. lockold=false
##      lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
##      altoptions=(recovery) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
##      howmany=7
# howmany=all

## should update-grub create memtest86 boot option
## e.g. memtest86=true
##      memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title        Ubuntu 8.04.1, kernel 2.6.24-23-generic
root        (hd0,0)
kernel        /vmlinuz-2.6.24-23-generic root=/dev/md0 ro quiet splash
initrd        /initrd.img-2.6.24-23-generic
quiet

title        Ubuntu 8.04.1, kernel 2.6.24-23-generic (recovery mode)
root        (hd0,0)
kernel        /vmlinuz-2.6.24-23-generic root=/dev/md0 ro single
initrd        /initrd.img-2.6.24-23-generic

title        Ubuntu 8.04.1, kernel 2.6.24-22-generic
root        (hd0,0)
kernel        /vmlinuz-2.6.24-22-generic root=/dev/md0 ro quiet splash
initrd        /initrd.img-2.6.24-22-generic
quiet

title        Ubuntu 8.04.1, kernel 2.6.24-22-generic (recovery mode)
root        (hd0,0)
kernel        /vmlinuz-2.6.24-22-generic root=/dev/md0 ro single
initrd        /initrd.img-2.6.24-22-generic

title        Ubuntu 8.04.1, kernel 2.6.24-21-generic
root        (hd0,0)
kernel        /vmlinuz-2.6.24-21-generic root=/dev/md0 ro quiet splash
initrd        /initrd.img-2.6.24-21-generic
quiet

title        Ubuntu 8.04.1, kernel 2.6.24-21-generic (recovery mode)
root        (hd0,0)
kernel        /vmlinuz-2.6.24-21-generic root=/dev/md0 ro single
initrd        /initrd.img-2.6.24-21-generic

title        Ubuntu 8.04.1, kernel 2.6.24-19-generic
root        (hd0,0)
kernel        /vmlinuz-2.6.24-19-generic root=/dev/md0 ro quiet splash
initrd        /initrd.img-2.6.24-19-generic
quiet

title        Ubuntu 8.04.1, kernel 2.6.24-19-generic (recovery mode)
root        (hd0,0)
kernel        /vmlinuz-2.6.24-19-generic root=/dev/md0 ro single
initrd        /initrd.img-2.6.24-19-generic

title        Ubuntu 8.04.1, memtest86+
root        (hd0,0)
kernel        /memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

My /etc/fstab:

# 
# /etc/fstab: static file system information
#
# <file system>        <dir>         <type>    <options>          <dump> <pass>
none                   /dev/pts      devpts    defaults            0      0
none                   /dev/shm      tmpfs     defaults            0      0


/dev/cdrom /media/cdrom   auto    ro,user,noauto,unhide   0      0
/dev/dvd /media/dvd   auto    ro,user,noauto,unhide   0      0
UUID=072281d6-813e-4f7d-a3bc-e4d9fee68912 /boot ext2 defaults 0 1
UUID=0ad30633-155d-42cf-a56c-6eb48d9ba55c /home ext4 defaults 0 1
UUID=9865110c-2358-4c1d-8f27-877e9cd01e23 swap swap defaults 0 0
UUID=d7bafe42-0b62-4de2-9102-726f58e58ba1 / ext4 defaults 0 1
# UltraBetty
#//ultrabetty/music    /media/music        cifs    credentials=/etc/samba/user,rw,iocharset=utf8,uid=andjjru,gid=users,file_mode=0766,dir_mode=0766 0 0
#//ultrabetty/videos   /media/videos       cifs    credentials=/etc/samba/user,rw,iocharset=utf8,uid=andjjru,gid=users,file_mode=0766,dir_mode=0766 0 0
#//ultrabetty/downloads   /media/downloads       cifs    credentials=/etc/samba/user,rw,iocharset=utf8,uid=andjjru,gid=users,file_mode=0766,dir_mode=0766 0 0
/dev/md0 /media/ultrabetty ext3 defaults 0 0

My mdadm.conf:

# mdadm.conf
#
# Please refer to mdadm.conf(5) for information about this file.
#

# by default, scan all partitions (/proc/partitions) for MD superblocks.
# alternatively, specify devices to scan, using wildcards if desired.
DEVICE partitions

# auto-create devices with Debian standard permissions
CREATE owner=root group=disk mode=0660 auto=yes

# automatically tag new arrays as belonging to the local system
HOMEHOST <system>

# instruct the monitoring daemon where to send mail alerts
MAILADDR root

# definitions of existing MD arrays
ARRAY /dev/md0 level=raid5 num-devices=3 UUID=db5c48a2:297c67c3:e368bf24:bd0fce41

# This file was auto-generated on Tue, 05 Aug 2008 12:56:47 +0000
# by mkconf $Id$

Offline

#4 2009-03-21 03:18:11

xaiviax
Member
From: Michigan
Registered: 2008-11-04
Posts: 282

Re: Arch won't load my mdraid array, but ubuntu will?

in this line of mkinitcpio.conf:
HOOKS="base udev autodetect pata scsi sata usb fw usbinput keymap uresume filesystems dsdt"
add raid right before filesystems, and then reinstall your kernel

Last edited by xaiviax (2009-03-21 03:18:43)

Offline

#5 2009-03-21 03:38:48

xaiviax
Member
From: Michigan
Registered: 2008-11-04
Posts: 282

Re: Arch won't load my mdraid array, but ubuntu will?

Also you should be loading modules raid and raid5 (in rc.conf or mkinitcpio.conf)

Offline

#6 2009-03-21 16:05:10

andjjru
Member
Registered: 2009-02-18
Posts: 12

Re: Arch won't load my mdraid array, but ubuntu will?

Added those hooks and modules, I will see if it makes a difference.  But what was weird is it would load and mount the array about 60% of the time or so and then bitch about superblocks and only load one drive the rest of the time.  I'm waiting for another drive to come in the mail, then I'll just back it all up and create a new array in Arch and see how that goes.

Offline

#7 2009-03-21 16:28:47

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Arch won't load my mdraid array, but ubuntu will?

Perhaps the drives are clocked by different clocks which would cause poor sync in the raid array.

Just a thought...............


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#8 2009-03-21 16:31:50

andjjru
Member
Registered: 2009-02-18
Posts: 12

Re: Arch won't load my mdraid array, but ubuntu will?

How would I check or fix that?

Offline

#9 2009-03-21 18:42:02

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Arch won't load my mdraid array, but ubuntu will?

Perhaps.... hdparm - I ....will give some info for each drive that may indicate a problem.........


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

Board footer

Powered by FluxBB