monitoring raid

I recently (this year) installed opensuse 11.2 on a little file,
print and LAMP server that sits in the closet. I selected to
install with a raid array (mirror) on two SATA drives. I’d like
to check on the array from time to time via SSH. I tried mdadm
–monitor, and it doesn’t look like mdadm is what I need to use
to check on the array from the output I get:
miser:/home/tom # mdadm --monitor
mdadm: Cannot monitor: need --scan or at least one device
What program manages the array if it’s setup during installation
of Opensuse 11.2?

Hi
Try the command;


mdadm --monitor --help
For example
mdadm --monitor --oneshot /dev/md0


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.32.27-0.2-default
up 8 days 16:34, 2 users, load average: 0.01, 0.05, 0.04
GPU GeForce 8600 GTS Silent - Driver Version: 260.19.26

That helped. I found that I need to have an address set for
notification before it runs.
The command you provided then tells me:
mdadm: Monitor using email address “xxxx@yyyy.zzz” from
config file

I ran mdadm --monitor --oneshot --scan, but it just went back
to the command prompt. Maybe that means it didn’t find any
problems?
mdadm.conf is in the /etc folder, but not a mdadm directory
that I could look in to see if output goes into a file there.
Is it possible to check the state of the array, even if it’s
OK, then have it monitor? I assume mdadm has the ability to
send email. Does it require anything to do that?
Thanks again. I can usually find what I need by searching,
but I’m getting stuck on this one.

malcolmlewis wrote:

>

> Hi
> Try the command;
>


> mdadm --monitor --help
> For example
> mdadm --monitor --oneshot /dev/md0
> 

>
>

Hi
Yes, the oneshot is like that, no response is good :wink:

You just need to configure it, use YaST->/etc/sysconfig editor
->System->File systems->Mdadm


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.32.27-0.2-default
up 8 days 17:09, 2 users, load average: 0.14, 0.09, 0.08
GPU GeForce 8600 GTS Silent - Driver Version: 260.19.26

Excellent. Thanks a lot.
-tom

malcolmlewis wrote:

>

> Hi
> Yes, the oneshot is like that, no response is good :wink:
>
> You just need to configure it, use YaST->/etc/sysconfig
editor
> ->System->File systems->Mdadm
>

Have a look at the service mdadmd if you want continuous monitoring, instead of contemplating writing periodic cron jobs, etc.