[rhelv6-list] Antwort: MD devices lost after boot
Andreas Reschke
Andreas.Reschke at behrgroup.com
Thu Sep 27 07:21:24 UTC 2012
rhelv6-list-bounces at redhat.com schrieb am 27.09.2012 09:05:35:
> "Roth, Sandro" <Sandro.Roth at zurich-airport.com>
> Gesendet von: rhelv6-list-bounces at redhat.com
>
> 27.09.2012 09:09
>
> Bitte antworten an
> "Red Hat Enterprise Linux 6 \(Santiago\) discussion mailing-list"
> <rhelv6-list at redhat.com>
>
> An
>
> "rhelv6-list at redhat.com" <rhelv6-list at redhat.com>
>
> Kopie
>
> Thema
>
> [rhelv6-list] MD devices lost after boot
>
> Hi experts
>
> I wasn’t sure where to post this so I’m sending it to this list.
>
> We have a setup which uses lvm over md over multipath devices. (at
> least that’s the plan)
> According to this article it is supported in RHEL6 (it wasn’t in RHEL5)
> https://access.redhat.com/knowledge/solutions/48634
>
> I created my md device as follows
> # mdadm --create --verbose /dev/md0 --level=1 --raid-devices=2 /dev/
> mapper/mpatha /dev/mapper/mpathb
>
> /etc/mdadm.conf has the following content
> DEVICE /dev/mapper/mpath*
> ARRAY /dev/md/0 metadata=1.2 UUID=52bd4011:f61badd6:0e63e7bb:
> 2448596b name=spch9003.zrh.local:0
>
> Then some lvm stuff on /dev/md0. Everything works fine.
> But after a reboot the md device won’t get assembled automatically.
>
> /proc/mdstat shows
> Personalities :
> unused devices: <none>
>
> And therefore nothing gets mounted either, obviously.
> I have to
>
> # mdadm -As
> mdadm: /dev/md/0 has been started with 2 drives.
> # vgchange -ay datavg1
> 1 logical volume(s) in volume group "datavg1" now active
> # mount /data
>
> I’ve done my part of googleing and a lot of people suggest creating
> a new initrd when everything is running.
> So I went…
>
> # dracut –f
> # init 6
>
> No change, still won’t get assembled.
> Any ideas? I’m sure I’m just missing a configuration step..
>
> # uname -r; rpm -q mdadm
> 2.6.32-279.5.1.el6.x86_64
> mdadm-3.2.3-9.el6.x86_64
>
>
> Any help would be appreciated.
>
>
> Regards
>
>
> Sandro Roth
>
> Systems Engineer
>
> IT-Operations
>
> Flughafen Zürich AG
> Postfach
> CH-8058 Zürich-Flughafen
>
> www.flughafen-zuerich.ch
>
>
>
> Tel.
>
> +41 (0)43 816 10 58
>
> Mobile
>
> +41 (0)76 356 71 19
>
> Fax
>
> +41 (0)43 816 76 90
>
>
>
>
> This email message and any attachments are confidential and may be
> privileged. If you are not the intended recipient, please notify us
> immediately and destroy the original transmittal. You are hereby
> notified that any review, copying or distribution of it is strictly
> prohibited. Thank you for your cooperation.
>
> Header information contained in E-mails to and from the company are
> monitored for operational reasons in accordance with swiss data
> protection act.
>
> _______________________________________________
> rhelv6-list mailing list
> rhelv6-list at redhat.com
> https://www.redhat.com/mailman/listinfo/rhelv6-list
Hi Sandro,
I was in the same situation, so I create this script:
[root at bgstorals01 ~]# cat /etc/init.d/raid-setup
#!/bin/bash
#
# chkconfig: 2345 07 86
# description: Start the raid0 with mdadm
# processname: -
# pidfile: -
# config: /etc/mdadm.conf
# source function library
. /etc/init.d/functions
RETVAL=0
start() {
action $"Starting raid arrays via mdadm: " /sbin/mdadm.static
--assemble --scan
action $"Setting up Logical Volume Management:" /sbin/lvm.static
vgchange -a y --ignorelockingfailure
for fs in `grep noauto /etc/fstab | awk '{ print $2; }'`
#for fs in `grep noauto /etc/fstab | cut -d\ -f1`
do
action $"Mount filesystem $fs:" /bin/mount $fs
done
touch /var/lock/subsys/raid-start
}
stop() {
rm -f /var/lock/subsys/raid-start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
stop
start
;;
condrestart)
if [ -f /var/lock/subsys/raid-start ]; then
stop
start
fi
;;
status)
status raid-start
RETVAL=$?
;;
*)
echo $"Usage: $0 {start|stop|restart|condrestart|status}"
exit 1
esac
exit $RETVAL
[root at bgstorals01 ~]#
and take this script in the adequate runlevel BEFORE S15mdmonitor and
S15mdmpd is starting.
[root at bgstorals01 ~]# ls -l /etc/rc3.d/ | grep raid
lrwxrwxrwx 1 root root 20 May 30 07:39 S07raid-setup ->
../init.d/raid-setup
[root at bgstorals01 ~]# ls -l /etc/rc5.d/ | grep raid
lrwxrwxrwx 1 root root 20 May 30 07:39 S07raid-setup ->
../init.d/raid-setup
[root at bgstorals01 ~]#
Mit freundlichen Grüßen
Andreas Reschke
________________________________________________________________
Unix/Linux-Administration
Andreas.Reschke at behrgroup.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/rhelv6-list/attachments/20120927/44fb60f9/attachment.htm>
More information about the rhelv6-list
mailing list