rebuild the harddisk

Heinz Mauelshagen mauelshagen at redhat.com
Tue Sep 27 11:10:21 UTC 2005


On Tue, Sep 27, 2005 at 05:23:41PM +0800, KC (PacificNet) wrote:
> Hi Heinz,
> 
> I want to write a script the when the harddisk have a problem then it would
> send emial to me. I use the dmraid -s cmd to get the status and using the
> following script to send a emial alert to me.
> 
> emailList=kc.wong at pacificnet.com
> 
> check=`dmraid -s | grep "status : ok"`
> echo $check > /tmp/raidcheck
> if [ "$check" = "" ]
> then
> dmraid -s | mail -s "shksa raid's 71h status is not ok" $emailList
> 
> 
> the script can work when i execute once. but the script callnot work when I
> execute as cron job.
> */5 * * * * sh /script/checkHD.sh
> 
> I find the the parameter cannot get parameter. Can u help me?

I assume that PATH isn't defined properly to execute dmraid.
Find out by redirecting checkHD.sh stderr to a file.

Regards,
Heinz

> 
> Thanks
> KC
> 
> ----- Original Message ----- 
> From: "Heinz Mauelshagen" <mauelshagen at redhat.com>
> To: "KC (PacificNet)" <kc.wong at pacificnet.com>
> Cc: <mauelshagen at redhat.com>; <ataraid-list at redhat.com>
> Sent: Friday, September 16, 2005 6:15 PM
> Subject: Re: rebuild the harddisk
> 
> 
> > On Fri, Sep 16, 2005 at 06:07:29PM +0800, KC (PacificNet) wrote:
> > > Hi Heinz
> > >
> > > How can i subscrib the mail list ar?
> >
> > You can access the archive at
> >
> > https://listman.redhat.com/archives/ataraid-list/
> >
> > Heinz
> >
> > >
> > > Thanks
> > > KC
> > > ----- Original Message ----- 
> > > From: "Heinz Mauelshagen" <mauelshagen at redhat.com>
> > > To: "KC (PacificNet)" <kc.wong at pacificnet.com>
> > > Cc: <ataraid-list at redhat.com>; <Mauelshagen at redhat.com>
> > > Sent: Friday, September 16, 2005 5:50 PM
> > > Subject: Re: rebuild the harddisk
> > >
> > >
> > > >
> > > > KC,
> > > >
> > > > you need to use the Silicon Image BIOS to rebuild the set today.
> > > > A dmraid extension to cover this will be added in the future.
> > > >
> > > > Make sure, that sdb is actually sane (iw, run badblocks on it) or
> replace
> > > it.
> > > >
> > > > Regards,
> > > > Heinz
> > > >
> > > > On Fri, Sep 16, 2005 at 11:52:02AM +0800, KC (PacificNet) wrote:
> > > > > Dear all,
> > > > >
> > > > > When one of the harddisk need to rebuild. What is the command to
> rebuild
> > > it?
> > > > >
> > > > >
> > > > > /dev/sda: sil, "sil_afaiagafdcfabgja", mirror, ok, 240119680
> sectors,
> > > data@ 0
> > > > > /dev/sdb: sil, "sil_afaiagafdcfabgja", mirror, broken, 240119680
> > > sectors, data@ 0
> > > > >
> > > > >   ----- Original Message ----- 
> > > > >   From: KC (PacificNet)
> > > > >   To: ataraid-list at redhat.com
> > > > >   Sent: Friday, September 16, 2005 11:47 AM
> > > > >   Subject: rebuild the harddisk
> > > > >
> > > > >
> > > > >   Dear all,
> > > > >
> > > > >   When one of the harddisk need to rebuild. What is the command to
> > > rebuild it?
> > > > >
> > > > >
> > > > >   /dev/sda: sil, "sil_afaiagafdcfabgja", mirror, ok, 240119680
> sectors,
> > > data@ 0
> > > > >   /dev/sdb: sil, "sil_afaiagafdcfabgja", mirror, broken, 240119680
> > > sectors, data@ 0
> > > > >
> > > > >
> > > > >   Thanks
> > > > >   KC

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Heinz Mauelshagen                                 Red Hat GmbH
Consulting Development Engineer                   Am Sonnenhang 11
Cluster and Storage Development                   56242 Marienrachdorf
                                                  Germany
Mauelshagen at RedHat.com                            +49 2626 141200
                                                       FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-




More information about the Ataraid-list mailing list