From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 30 Sep 2004 23:06:19 +0400 From: "Konstantin A. Lepikhov" To: community@altlinux.ru Message-ID: <20040930190619.GA21259@lks.home> Mail-Followup-To: community@altlinux.ru References: <433501c4a61d$98ea97b0$2101a8c0@main.radio> <20040929162956.GA9527@lks.home> <002801c4a6b1$5f433a00$2101a8c0@main.radio> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="0OAP2g/MAC+5xKAE" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <002801c4a6b1$5f433a00$2101a8c0@main.radio> User-Agent: Mutt/1.4.2.1i X-Operation-System: ALT Linux Sisyphus (20040921) 2.6.8-wks26-up-alt3 X-Virus-Scanned: by amavisd-new at smtp.elektrostal.ru Subject: [Comm] Re: Software RAID-5 & XFS trouble X-BeenThere: community@altlinux.ru X-Mailman-Version: 2.1.5 Precedence: list Reply-To: community@altlinux.ru List-Id: Mailing list for ALT Linux users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Sep 2004 19:06:05 -0000 Archived-At: List-Archive: List-Post: --0OAP2g/MAC+5xKAE Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit Hi Овечкин! Thursday 30, at 09:50:20 AM you wrote: > > ужасть. Хотите дам приличный init.d скрипт для мониторинга? :) > Был бы очень признателен. ловите -- WBR, Konstantin chat with ==>ICQ: 109916175 Lepikhov, speak to ==>JID: lakostis@jabber.org aka L.A. Kostis write to ==>mailto:lakostis@pisem.net.nospam ...The information is like the bank... (c) EC8OR --0OAP2g/MAC+5xKAE Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=mdadm #!/bin/sh # # Start the RAID monitor daemon for all active md arrays if desired. # # based on init.d script of Mario Jou/3en # modified for ALTLinux by LAKostis # # chkconfig: 345 90 10 # description: mdadm monitors all active md arrays # processname: mdadm # pidfile: /var/run/mdadm.pid # Do not load RH compatibility interface. WITHOUT_RC_COMPAT=1 # Source function library. . /etc/init.d/functions BINARY=/usr/sbin/mdadm CONFIG=/etc/mdadm.conf LOCKFILE=/var/lock/subsys/mdadm MAIL_TO=root ARRAYS="`sed -ne 's/^\(md[[:digit:]]\+\) : active.*/\1/p' /proc/mdstat`" RETVAL=0 # if overriding these is needed SourceIfNotEmpty /etc/sysconfig/mdadm start() { if [ -n "$ARRAYS" ] ; then if [ -e /dev/.devfsd ] ; then ARRAYS="`echo $ARRAYS | sed -e 's%md%/dev/md/%g'`" else ARRAYS="`echo $ARRAYS | sed -e 's%md%/dev/md%g'`" fi start_daemon --lockfile "$LOCKFILE" --expect-user root -- \ $BINARY -F -f -m $MAIL_TO $ARRAYS else echo " no arrays for monitoring were found." fi RETVAL=$? return $RETVAL } stop() { stop_daemon --lockfile "$LOCKFILE" --expect-user root -- mdadm RETVAL=$? return $RETVAL } restart() { stop start } # See how we were called. case "$1" in start) start ;; stop) stop ;; reload) restart ;; restart) restart ;; condstop) if [ -e "$LOCKFILE" ]; then stop fi ;; condrestart) if [ -e "$LOCKFILE" ]; then restart fi ;; condreload) if [ -e "$LOCKFILE" ]; then reload fi ;; status) status --expect-user root -- mdadm RETVAL=$? ;; *) msg_usage "${0##*/} {start|stop|reload|restart|condstop|condrestart|condreload|status}" RETVAL=1 esac exit $RETVAL --0OAP2g/MAC+5xKAE--