Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#213 closed defect (worksforme)

did not find smartmontools script

Reported by: Martin Suc Owned by: somebody
Priority: trivial Milestone:
Component: all Version:
Keywords: Cc: martin.suc@…

Description

Hi,

I did not find forum so I put it here as a question. I have compiled and installed smartmontools from svn - version 5.43 2012-02-12 r3509.
But I did not find smartmontools script which was located in previous version in /etc/init.d/smartmontools directory. So I started it by:
sudo /usr/local/etc/init.d/smartd restart

It seems to be working properly according to logs files. ... but I am not sure ... I did not find any word about start smartmontools script in INSTALL documentation ... .

Was this script removed or did I messed up something ?
(Previous version 5.41 has this script.)

Regards,
Martin

P.S. very nice software :-)

Change History (7)

in reply to:  description comment:1 by Christian Franke, 13 years ago

Keywords: smartmontools removed
Milestone: Release 5.43

The smartmontools-support mailing list is the right place to ask questions.

The default location of the init.d script was changed (r3356) such that all files are installed below /usr/local. If ./configure is run without parameters, the system's /etc should (IMO) not be touched. Try:

./configure --with-initscriptdir=/etc/init.d
./configure --sysconfdir=/etc

The latter command would put smartd.conf in /etc also.

To check the settings examine the ./configure output. This command could be used to install to some test directory:

make DESTDIR=/tmp/testing install

See INSTALL file for some further info.

Re:P.S. Thanks :-)

comment:2 by Martin Suc, 13 years ago

Cc: martin.suc@… added

Hi,

Thanks for quick response.

Actually I made some small changes in smartmontools script:
MARTCTL=/usr/local/sbin/smartctl
DAEMON=/usr/local/sbin/smartd


I have another problem. I have following in smartd.conf:
/dev/sda -d sat -a -o on -S on -s (S/../.././02|L/../../6/03)
...
/dev/sdf -d sat -a -o on -S on -s (S/../.././02|L/../../6/03)

But I have hot-plug for hard disks , so sometimes it is going to change /dev/sdX "X-ing".
In such case my smartd failed to restart and I had to change smartd.conf manually again.

Is it possible to use some bash script somewhere to change smartd.conf automatically/dynamically ?

For example , if disk /dev/sdf is suddenly missing or changed from "-d sat" to "usb pen-drive" than I would like to comment out this: /dev/sdf -d sat -a -o on -S on -s (S/../.././02|L/../../6/03).

Would be nice to can run script which is checking the type of disk (sata,scsi,ide,usb) and make configuration in smartd.conf accordingly - if some disk is inserted or removed from computer.

Best Regards,
Martin

comment:3 by Christian Franke, 13 years ago

There is no easy way to do this. Using "-d sat" or "-d usb..." may not be necessary if USB auto-detection is supported and USB ID the device is in drive database.

Hotplug support in general is an open issue.

Please use smartmontools-support mailing list for further discussions. It does not require subscription.

comment:4 by Christian Franke, 13 years ago

Resolution: worksforme
Status: newclosed

The ./configure option --with-initscriptdir can be used to specify location of smartd initd script if the default is not suitable. See INSTALL file for details.

comment:5 by Martin Suc, 13 years ago

OK.
Thank you for explanation and details.

(I am still not clear how is managed smartmontools script - if is/will be part of this software or where it comes from ? I could not find it in svn)

Best Regards,
Martin

comment:6 by Christian Franke, 13 years ago

SVN and src tarball provide templates for initd scripts (smartd.initd.in, smartd.freebsd.initd.in) and a systemd service file (smartd.service.in). The file to be installed is build by Makefile based on ./configure guesses and/or parameters.

Note that the smartmontools packages from various distributions provide their own customized scripts which may differ considerably. Ask the package maintainer for details.

comment:7 by Martin Suc, 13 years ago

thank you.

Note: See TracTickets for help on using tickets.