[mythtv-users] Software RAID disappearing on reboot...

David Snider dsnider at thesniderpad.com
Sat Jul 29 04:59:01 UTC 2006


Well to be completely honest, I use Gentoo, not Knoppmyth, I followed  
the RAID howto here:

http://gentoo-wiki.com/HOWTO_Gentoo_Install_on_Software_RAID

I skipped the stuff to install on RAID and just got the RAID  
working.  They go through the mdadm.conf, but essentially, the short  
answer is once your RAID is setup and you can see that it is all  
synched up (no filesystems yet hopefully), do this:

mdadm --detail --scan >> /etc/mdadm.conf

The mdadm init script stuff is automatically added in upon install.   
There is a start-raid script which I have pasted below:

# cat /lib/rcscripts/addons/raid-start.sh
# /lib/rcscripts/addons/raid-start.sh:  Setup raid volumes at boot
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-fs/mdadm/files/raid-start.sh,v  
1.4 2005/06/10 02:09:28 vapier Exp $

[[ -f /proc/mdstat ]] || exit 0

# We could make this dynamic, but eh
#[[ -z ${MAJOR} ]] && export MAJOR=$(awk '$2 = "md" { print $1 }' / 
proc/devices)
MAJOR=9

# Try to make sure the devices exist before we use them
create_devs() {
         local node dir minor
         for node in $@ ; do
                 [[ ${node} !                 [[ -e ${node} ]] && continue

                 dir=${node%/*}
                 [[ ! -d ${dir} ]] && mkdir -p "${dir}"

                 minor=${node##*/}
                 mknod "${node}" b ${MAJOR} ${minor##*md} &> /dev/null
         done
}

# Start software raid with raidtools (old school)
if [[ -x /sbin/raidstart && -f /etc/raidtab ]] ; then
         devs=$(awk '/^[[:space:]]*raiddev/ { print $2 }' /etc/raidtab)
         if [[ -n ${devs} ]] ; then
                 create_devs ${devs}
                 ebegin "Starting up RAID devices (raidtools)"
                 output=$(raidstart -aq 2>&1)
                 ret=$?
                 [[ ${ret} -ne 0 ]] && echo "${output}"
                 eend ${ret}
         fi
fi

# Start software raid with mdadm (new school)
if [[ -x /sbin/mdadm && -f /etc/mdadm.conf ]] ; then
         devs=$(awk '/^[[:space:]]*ARRAY/ { print $2 }' /etc/mdadm.conf)
         if [[ -n ${devs} ]] ; then
                 create_devs ${devs}
                 ebegin "Starting up RAID devices (mdadm)"
                 output=$(mdadm -As 2>&1)
                 ret=$?
                 [[ ${ret} -ne 0 ]] && echo "${output}"
                 eend ${ret}
         fi
fi

# vim:ts=4

I did a quick search for Knoppix mdadm, didn't find much....  But to  
help, I was wondering if you could do the following:

1.  resetup your RAID array.
2.  send the output of /proc/mdstat
3.  Create the mdadm.conf as specified above
4.  reboot
5.  send the output of dmesg
6.  send the output of /proc/mdstat
7.  run mdadm -As (if we are unlucky enough to not have a running  
RAID array at this point)

On Jul 28, 2006, at 11:59 AM, Jon Larson wrote:

> I know I created the FD "autodetect RAID" type on the partitions,  
> but I didn't create the mdadm.conf or do anything to any init scripts.
>
> Can you tell me what you needed to do to add the "mdadm stuff in my  
> init scripts"? What do you mean by that?
>
>
> From: mythtv-users-bounces at mythtv.org [mailto:mythtv-users- 
> bounces at mythtv.org] On Behalf Of David Snider
> Sent: Friday, July 28, 2006 8:35 AM
> To: Discussion about mythtv
> Subject: Re: [mythtv-users] Software RAID disappearing on reboot...
>
> I had a similar problem, here are the things I did wrong:
>
> a) I didn't create a partition on the drives of the correct  
> "Autodetect RAID type", was setting up the RAID on the raw disks  
> instead
> b) I didn't create the /etc/mdadm.conf
> c) I didn't have the mdadm stuff in my init scripts....
>
> My suggestions, setup the raid, check out the contents of /proc/ 
> mdstat after everything is all synched up, reboot... If the raid  
> volume is there, you should be golden to proceed with LVM.  
> Otherwise, try starting it manually with mdadm... If that doesn't  
> work, post the output of your /proc/mdstat to the list and any  
> applicable dmesg stuff...
>
>
>
> On Jul 28, 2006, at 9:11 AM, Jon Larson wrote:
>
>> I'm using mdadm to create a raid1 array on knoppmyth R5C7. I  
>> thought that I had overcome all the problems since the raid array  
>> seemed to work fine--I even configured LVM on top of it. But when  
>> I rebooted the whole thing just disappeared, as if mdadm forgot  
>> that it ever existed. Please note, I'm not trying to boot of the  
>> raid array (not yet), just get it up and running so that I can  
>> transfer my knoppmyth distrobution over to it... Can anyone  
>> suggest what I might be doing wrong?
>> _______________________________________________
>> mythtv-users mailing list
>> mythtv-users at mythtv.org
>> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mythtv.org/pipermail/mythtv-users/attachments/20060728/5c1ed68e/attachment-0001.htm 


More information about the mythtv-users mailing list