Fabrizio Di Meo | 2 Apr 2003 09:22
Picon
Favicon

Questions

Hi,

 I've just installed smartd and configured smartd.conf as reported below:

/dev/hda -H -o on -f -l error -l selftest -m fabriziodimeo <at> yahoo.it -t \
-R 1 -R 3 -R 5 -R 7 -R 11 -R 13 -M daily

executing the command smartctl -c /dev/hda I get this message:

----------------

Off-line data collection status: (0x02) Offline data collection activity
                                        completed without error.
Self-test execution status:      (  16) The self-test routine was aborted by
                                        the host.
Total time to complete off-line
data collection:                 (  51) seconds.
Offline data collection
capabilities:                     (0x1b) SMART execute Offline immediate.
                                        Automatic timer ON/OFF support.
                                        Suspend Offline collection upon new
                                        command.
                   &nb sp;                    Offline surface scan supported.
                                        Self-test supported.
SMART capabilities:            (0x0003) Saves SMART data before entering
                                        power-saving mode.
                               &n bsp;        Supports SMART auto save timer.
Error logging capability:        (0x01) Error logging supported.
Short self-test routine
recommended polling time:        (   2) minutes.
Extended self-test routine
recommended polling time:        (  35) minutes.
-------------

I run the self test manually and next I abort it, but seems no more tests have been executed by smartd.....because the message reported just a few rows above...is this right?

My questions are:

1. how can I check out what smartd is doing (because no message is written in /var/log messages every 30 minutes - this is the default run-time right?)

2. is the configuration directives right as I wrote it in smartd.conf?

Thank you :o)

 Fabrizio

P.s. this is just the 1st time I run smartmontools....

 

 


Yahoo! Cellulari: loghi, suonerie, picture message per il tuo telefonino
Bruce Allen | 2 Apr 2003 15:11
Picon
Favicon

Re: Questions

Hi Fabrizio,

>  I've just installed smartd and configured smartd.conf as reported below:
> 
> /dev/hda -H -o on -f -l error -l selftest -m fabriziodimeo <at> yahoo.it -t \
> -R 1 -R 3 -R 5 -R 7 -R 11 -R 13 -M daily

This looks OK.

> executing the command smartctl -c /dev/hda I get this message:

You should probably use
smartctl -a /dev/hda
to get a complete picture.

> I run the self test manually and next I abort it, but seems no more
> tests have been executed by smartd.....because the message reported
> just a few rows above...is this right?

smartd does not run self-tests.  It only monitors the self-test log for
signs of self-tests that showed errors.  If you want to run self-tests on
a regular basis I suggest that you schedule a cron job to do this,
using
smartctl -t long /dev/hda
for example.

> My questions are:
> 
> 1. how can I check out what smartd is doing (because no message is
> written in /var/log messages every 30 minutes - this is the default
> run-time right?)

smartd only writes messages into /var/log/messages when a disk Attribute
has changed.  Until that happens, there are no messages.

> 2. is the configuration directives right as I wrote it in smartd.conf?

It looks fine.  You might want to add -M test to get a test mail on
startup to be sure that is working OK.

Cheers,
	Bruce

-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
Fabrizio Di Meo | 2 Apr 2003 16:11
Picon
Favicon

Re: Questions

Hi Bruce,

 thank you for having replied in a such short time.

Well I thought smartd run some tests infact I coulnd't explain the existence of smartctl except than reading attributes.

As you told I've to run  "smartctl -t long /dev/hda" by crontab...but what should be the most right scheduling...I mean 4 hours or more? Doesn't this generate some problems (conflicts)  with the self test which is made by the hard disk itself? (or the hard disk doesn't perform any kind of self test?).

Let me see if I understood the flow of operation:

1. I've to run smartctl in order to query the hard disk and smartctl updates the attributes

2. smartd will read the updated attributes and will notify what changed is.

Another question....(sorry :o) ) I can't understand when I should use the directive -S:

 

       -S VALUE

              Enables  or disables Attribute Autosave when smartd

              starts up and has no  further  effect.   The  valid

              arguments   to  this  Directive  are  on  and  off.

              

This is also a command line parameter we can find on using smartctl so this seems  I can use smartd instead of smartctl, but we have told that these programs make different things...so I feel a little confused on finding duplicated command line parameter/directive on both smartctl and smartd.... :o( when using the one and the other?

 

Thank you,

 Fabrizio

 Bruce Allen <ballen <at> gravity.phys.uwm.edu> wrote:

Hi Fabrizio,

> I've just installed smartd and configured smartd.conf as reported below:
>
> /dev/hda -H -o on -f -l error -l selftest -m fabriziodimeo <at> yahoo.it -t \
> -R 1 -R 3 -R 5 -R 7 -R 11 -R 13 -M daily

This looks OK.

> executing the command smartctl -c /dev/hda I get this message:

You should probably use
smartctl -a /dev/hda
to get a complete picture.

> I run the self test manually and next I abort it, but seems no more
> tests have been executed by smartd.....because the message reported
> just a few rows above...is this right?

smartd does not run self-tests. It only monitors the self-test log for
signs of self-tests that showed errors. If you want to run self-tests on
a regular basis I suggest that you schedule a cron job to do this,
using
smartctl -t long /dev/hda
for example.

> My questions are:
>
> 1. how can I check out what smartd is doing (because no message is
> written in /var/log messages every 30 minutes - this is the default
> run-time right?)

smartd only writes messages into /var/log/messages when a disk Attribute
has changed. Until that happens, there are no messages.

> 2. is the configuration directives right as I wrote it in smartd.conf?

It looks fine. You might want to add -M test to get a test mail on
startup to be sure that is working OK.

Cheers,
Bruce


Yahoo! Cellulari: loghi, suonerie, picture message per il tuo telefonino
Bruce Allen | 2 Apr 2003 17:17
Picon
Favicon

Re: Questions

> thank you for having replied in a such short time. Well I thought
> smartd run some tests infact I coulnd't explain the existence of
> smartctl except than reading attributes.

It's also for running self-tests, and examining the self-test logs and ATA
error logs.

Although your main interest is in smartd, you should carefully read the
smartctl manual page as well.

>  As you told I've to run
> "smartctl -t long /dev/hda" by crontab...but what should be the most
> right scheduling...I mean 4 hours or more?

I'd suggest about once per week.

> Doesn't this generate some
> problems (conflicts)  with the self test which is made by the hard
> disk itself? (or the hard disk doesn't perform any kind of self
> test?). 

Please read the smartctl manual page completely.  It has a description of
the different types of testing.

> and smartctl updates the
> attributes

smartctl does not update the attributes.  As it says in the manual page:
smartctl does not calculate any of these values, it merely reports them
from the S.M.A.R.T. data on the disk.

> 2. smartd will read the updated attributes and will notify
> what changed is. Another question....(sorry :o) ) I can't understand
> when I should use the directive -S:
>  
> 
>        -S VALUE
> 
>               Enables  or disables Attribute Autosave when smartd
> 
>               starts up and has no  further  effect.   The  valid
> 
>               arguments   to  this  Directive  are  on  and  off.
> 
>               
> 
> This is also a command line parameter we can find on using smartctl so
> this seems I can use smartd instead of smartctl, but we have told that
> these programs make different things...so I feel a little confused on
> finding duplicated command line parameter/directive on both smartctl
> and smartd.... :o( when using the one and the other?

In fact you can use either smartctl or smartd to turn on the Attribute
auto-save.  It's there as a convenience in smartd.

Cheers,
	Bruce

-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
Fabrizio Di Meo | 2 Apr 2003 18:14
Picon
Favicon

Re: Questions

Thanks Bruce...I read and printed the manual page but I've to re-read them. (double and double check is a must to me)

Maybe I've to "study" the SMART technology to know the meaning of some terms...just like the one I quoted previuosly (-S autosave...I don't really understand what means "Autosaving" and what saves in this case :o) ).

Well however I wish to thank you for your patience and your excellent work.

Fabrizio

 Bruce Allen <ballen <at> gravity.phys.uwm.edu> wrote:

> thank you for having replied in a such short time. Well I thought
> smartd run some tests infact I coulnd't explain the existence of
> smartctl except than reading attributes.

It's also for running self-tests, and examining the self-test logs and ATA
error logs.

Although your main interest is in smartd, you should carefully read the
smartctl manual page as well.

> As you told I've to run
> "smartctl -t long /dev/hda" by crontab...but what should be the most
> right scheduling...I mean 4 hours or more?

I'd suggest about once per week.

> Doesn't this generate some
> problems (conflicts) with the self test which is made by the hard
> disk itself? (or the hard disk doesn't perform any kind of self
> test?).

Please read the smartctl manual page completely. It has a description of
the differe nt types of testing.

> and smartctl updates the
> attributes

smartctl does not update the attributes. As it says in the manual page:
smartctl does not calculate any of these values, it merely reports them
from the S.M.A.R.T. data on the disk.

> 2. smartd will read the updated attributes and will notify
> what changed is. Another question....(sorry :o) ) I can't understand
> when I should use the directive -S:
>
>
> -S VALUE
>
> Enables or disables Attribute Autosave when smartd
>
> starts up and has no further effect. The valid
>
> arguments to this Directive are on and off.
>
>
>
> This is also a command line parameter we can find on using smartctl so
> this seems I can use smartd instead of smartctl, but we have told that
> these programs make different things...so I feel a little confused on
> finding duplicated comman d line parameter/directive on both smartctl
> and smartd.... :o( when using the one and the other?

In fact you can use either smartctl or smartd to turn on the Attribute
auto-save. It's there as a convenience in smartd.

Cheers,
Bruce


Yahoo! Cellulari: loghi, suonerie, picture message per il tuo telefonino
Bruce Allen | 2 Apr 2003 20:17
Picon
Favicon

Re: Questions

In addition to reading the smartmontools manual, you can download the ATA
specification from the web (a link is given on the smartmonools web page)
and read (or skim) the section of SMART. Being the specification itself,
this is in fact the "last word" on the subject.

Cheers,
	Bruce

On Wed, 2 Apr 2003, Fabrizio Di Meo wrote:

> 
> Thanks Bruce...I read and printed the manual page but I've to re-read
> them. (double and double check is a must to me) Maybe I've to "study"
> the SMART technology to know the meaning of some terms...just like the
> one I quoted previuosly (-S autosave...I don't really understand what
> means "Autosaving" and what saves in this case :o) ). Well however I
> wish to thank you for your patience and your excellent work. Fabrizio
>  Bruce Allen <ballen <at> gravity.phys.uwm.edu> wrote:> thank you for having replied in a such short time.
Well I thought
> > smartd run some tests infact I coulnd't explain the existence of
> > smartctl except than reading attributes.
> 
> It's also for running self-tests, and examining the self-test logs and ATA
> error logs.
> 
> Although your main interest is in smartd, you should carefully read the
> smartctl manual page as well.
> 
> > As you told I've to run
> > "smartctl -t long /dev/hda" by crontab...but what should be the most
> > right scheduling...I mean 4 hours or more?
> 
> I'd suggest about once per week.
> 
> > Doesn't this generate some
> > problems (conflicts) with the self test which is made by the hard
> > disk itself? (or the hard disk doesn't perform any kind of self
> > test?). 
> 
> Please read the smartctl manual page completely. It has a description of
> the different types of testing.
> 
> > and smartctl updates the
> > attributes
> 
> smartctl does not update the attributes. As it says in the manual page:
> smartctl does not calculate any of these values, it merely reports them
> from the S.M.A.R.T. data on the disk.
> 
> > 2. smartd will read the updated attributes and will notify
> > what changed is. Another question....(sorry :o) ) I can't understand
> > when I should use the directive -S:
> > 
> > 
> > -S VALUE
> > 
> > Enables or disables Attribute Autosave when smartd
> > 
> > starts up and has no further effect. The valid
> > 
> > arguments to this Directive are on and off.
> > 
> > 
> > 
> > This is also a command line parameter we can find on using smartctl so
> > this seems I can use smartd instead of smartctl, but we have told that
> > these programs make different things...so I feel a little confused on
> > finding duplicated command line parameter/directive on both smartctl
> > and smartd.... :o( when using the one and the other?
> 
> In fact you can use either smartctl or smartd to turn on the Attribute
> auto-save. It's there as a convenience in smartd.
> 
> Cheers,
> Bruce
> 
> 
> 
> ---------------------------------
> Yahoo! Cellulari: loghi, suonerie, picture message per il tuo telefonino

-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
Fabrizio Di Meo | 2 Apr 2003 21:50
Picon
Favicon

Questions - self-test

Bruce I want to point out that I understood the behaviour of S.M.A.R.T. when running at the same time two kind of self-test. It's well explained on the man page and it depends on the hard disk capabilities:

"Suspend Offline collection upon new command."

...but for this reason I think it's not a nice idea to have 2 o more rows in crontab to query the hd attributes because we're unable to know when one self-test if finished...the risk is not having any result.

Thanks,

 Fabrizio

 

 


Yahoo! Cellulari: loghi, suonerie, picture message per il tuo telefonino
temp7 | 3 Apr 2003 05:38

Re: Questions - self-test

At 03:50 PM 4/2/2003, Bruce Allen wrote:

>The solution is as follows:
>
>crontab -- runs smartctl -t once/week to do self-tests
>smartd  -- runs all the time, monitors self-test logs for error, and sends
>            email if a problem is detected.

Can this be built into smartd so I don't need to worry about crontabs?

-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
Bruce Allen | 3 Apr 2003 06:17
Picon
Favicon

Re: Questions - self-test

> >The solution is as follows:
> >
> >crontab -- runs smartctl -t once/week to do self-tests
> >smartd  -- runs all the time, monitors self-test logs for error, and sends
> >            email if a problem is detected.
> 
> 
> 
> Can this be built into smartd so I don't need to worry about crontabs?

Yes, I'll probably add this feature.  But it might be a little while.

Bruce

-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
Bruce Allen | 2 Apr 2003 23:50
Picon
Favicon

Re: Questions - self-test


On Wed, 2 Apr 2003, Fabrizio Di Meo wrote:

> 
> Bruce I want to point out that I understood the behaviour of
> S.M.A.R.T. when running at the same time two kind of self-test. It's
> well explained on the man page and it depends on the hard disk
> capabilities: "Suspend Offline collection upon new command."

A disk can only run a single self-test at once.  Provided that the
capability "Suspend Offline collection upon new command" is present, the
disk will suspend the self-test if the OS tries to access the disk, and
then continue it when the OS is done.

> ...but for this reason I think it's not a nice idea to have 2 o more
> rows in crontab to query the hd attributes

You don't need crontab entries to query the Attributes.  Just to
periodically (say, once per week) run self-tests.

[Note -- some cluster users run short self-tests every few hours.  Others
run extended self-tests every few days.]

> because we're unable to know when one self-test if finished...the risk
> is not having any result.

The solution is as follows:

crontab -- runs smartctl -t once/week to do self-tests
smartd  -- runs all the time, monitors self-test logs for error, and sends
           email if a problem is detected.

So you don't need to know (or to care) when a self-test finished.  If the
self test went well, you don't hear about it.  If a self-test fails, then
smartd will report it to you.

Bruce

-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
Fabrizio Di Meo | 2 Apr 2003 21:39
Picon
Favicon

Re: Questions

Even though there are things not explained because the only explaination can come from experiences... :o) I'm just afraid to use this useful tool because I always think to get some failure....an example would be running the long self test and the short one (this last is suggested to be run every 2 minutes as per Quantum Vendor), but what could happen if ever the short and long self-test were run together (?) (because I planned in cron the long one)

Well I know Bruce you're having some trouble with all these questions :o) (maybe you've never got a such massive e-mail from a smartmontools' user :o)))

:o) Ciao,

 Fabrizio

 Bruce Allen <ballen <at> gravity.phys.uwm.edu> wrote:

In addition to reading the smartmontools manual, you can download the ATA
specification from the web (a link is given on the smartmonools web page)
and read (or skim) the section of SMART. Being the specification itself,
this is in fact the "last word" on the subject.

Cheers,
Bruce

On Wed, 2 Apr 2003, Fabrizio Di Meo wrote:

>
> Thanks Bruce...I read and printed the manual page but I've to re-read
> them. (double and double check is a must to me) Maybe I've to "study"
> the SMART technology to know the meaning of some terms...just like the
> one I quoted previuosly (-S autosave...I don't really understand what
> means "Autosaving" and what saves in this case :o) ). Well however I
> wish to thank you for your patience and your excellent work. Fabrizio
> Bruce Allen wrote:> thank you for having replied in a such short time. Well I thought
> > smartd run some tests infact I coulnd't explain the existence of
> > smartctl except than reading attributes.
>
> It's also for running self-tests, and examining the self-test logs and ATA
> error logs.
>
> Although your main interest is in smartd, you should carefully read the
> smartctl manual page as well.
>
> > As you told I've to run
> > "smartctl -t long /dev/hda" by crontab...but what should be the most
> > right scheduling...I mean 4 hours or more?
>
> I'd suggest about once per week.
>
> > Doesn't this generate some
> > problems (conflicts) with the self test which is made by the hard
> > disk itself? (or the hard disk doesn't perform any kind of self
> > test?).
>
> Please read the smartctl manual page completely. It has a description of
> t he different types of testing.
>
> > and smartctl updates the
> > attributes
>
> smartctl does not update the attributes. As it says in the manual page:
> smartctl does not calculate any of these values, it merely reports them
> from the S.M.A.R.T. data on the disk.
>
> > 2. smartd will read the updated attributes and will notify
> > what changed is. Another question....(sorry :o) ) I can't understand
> > when I should use the directive -S:
> >
> >
> > -S VALUE
> >
> > Enables or disables Attribute Autosave when smartd
> >
> > starts up and has no further effect. The valid
> >
> > arguments to this Directive are on and off.
> >
> >
> >
> > This is also a command line parameter we can find on using smartctl so
> > this seems I can use smartd instead of smartctl , but we have told that
> > these programs make different things...so I feel a little confused on
> > finding duplicated command line parameter/directive on both smartctl
> > and smartd.... :o( when using the one and the other?
>
> In fact you can use either smartctl or smartd to turn on the Attribute
> auto-save. It's there as a convenience in smartd.
>
> Cheers,
> Bruce
>
>
>
> ---------------------------------
> Yahoo! Cellulari: loghi, suonerie, picture message per il tuo telefonino


Yahoo! Cellulari: loghi, suonerie, picture message per il tuo telefonino
Bruce Allen | 2 Apr 2003 23:52
Picon
Favicon

Re: Questions

> Even though there are things not explained because the only
> explaination can come from experiences... :o) I'm just afraid to use
> this useful tool because I always think to get some failure....an
> example would be running the long self test and the short one (this
> last is suggested to be run every 2 minutes as per Quantum Vendor),
> but what could happen if ever the short and long self-test were run
> together (?) (because I planned in cron the long one) 

Oh, I understand your question.  I'm not sure what will happen, but you
can certainly try it and see.  I'm sure it won't do any hard.

By the way, the "recommended polling time" does not indicate how often you
should run the self-tests.  It suggests how long you should wait, after
running the self-test, before looking to see if the self-test has
completed.

Cheers,
	Bruce

> Bruce you're having some trouble with all these questions :o) (maybe
> you've never got a such massive e-mail from a smartmontools' user
> :o))) :o) Ciao,
>  Fabrizio
>  Bruce Allen <ballen <at> gravity.phys.uwm.edu> wrote:In addition to reading the smartmontools manual,
you can download the ATA
> specification from the web (a link is given on the smartmonools web page)
> and read (or skim) the section of SMART. Being the specification itself,
> this is in fact the "last word" on the subject.
> 
> Cheers,
> Bruce
> 
> On Wed, 2 Apr 2003, Fabrizio Di Meo wrote:
> 
> > 
> > Thanks Bruce...I read and printed the manual page but I've to re-read
> > them. (double and double check is a must to me) Maybe I've to "study"
> > the SMART technology to know the meaning of some terms...just like the
> > one I quoted previuosly (-S autosave...I don't really understand what
> > means "Autosaving" and what saves in this case :o) ). Well however I
> > wish to thank you for your patience and your excellent work. Fabrizio
> > Bruce Allen wrote:> thank you for having replied in a such short time. Well I thought
> > > smartd run some tests infact I coulnd't explain the existence of
> > > smartctl except than reading attributes.
> > 
> > It's also for running self-tests, and examining the self-test logs and ATA
> > error logs.
> > 
> > Although your main interest is in smartd, you should carefully read the
> > smartctl manual page as well.
> > 
> > > As you told I've to run
> > > "smartctl -t long /dev/hda" by crontab...but what should be the most
> > > right scheduling...I mean 4 hours or more?
> > 
> > I'd suggest about once per week.
> > 
> > > Doesn't this generate some
> > > problems (conflicts) with the self test which is made by the hard
> > > disk itself? (or the hard disk doesn't perform any kind of self
> > > test?). 
> > 
> > Please read the smartctl manual page completely. It has a description of
> > the different types of testing.
> > 
> > > and smartctl updates the
> > > attributes
> > 
> > smartctl does not update the attributes. As it says in the manual page:
> > smartctl does not calculate any of these values, it merely reports them
> > from the S.M.A.R.T. data on the disk.
> > 
> > > 2. smartd will read the updated attributes and will notify
> > > what changed is. Another question....(sorry :o) ) I can't understand
> > > when I should use the directive -S:
> > > 
> > > 
> > > -S VALUE
> > > 
> > > Enables or disables Attribute Autosave when smartd
> > > 
> > > starts up and has no further effect. The valid
> > > 
> > > arguments to this Directive are on and off.
> > > 
> > > 
> > > 
> > > This is also a command line parameter we can find on using smartctl so
> > > this seems I can use smartd instead of smartctl, but we have told that
> > > these programs make different things...so I feel a little confused on
> > > finding duplicated command line parameter/directive on both smartctl
> > > and smartd.... :o( when using the one and the other?
> > 
> > In fact you can use either smartctl or smartd to turn on the Attribute
> > auto-save. It's there as a convenience in smartd.
> > 
> > Cheers,
> > Bruce
> > 
> > 
> > 
> > ---------------------------------
> > Yahoo! Cellulari: loghi, suonerie, picture message per il tuo telefonino
> 
> 
> 
> ---------------------------------
> Yahoo! Cellulari: loghi, suonerie, picture message per il tuo telefonino

-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/

Gmane