RFC: Disk Monitoring
Brian Sutherland
jinty at web.de
Mon Mar 21 08:19:15 CST 2005
The disk monitoring wiki page [1] has been around a while with no signs
of life, so I thought I would give it a little push forward in my spare
time.
This RFC deals with proposed changes to the smartmontools package
required to support Disk Monitoring graphical app. Guido Guenther, the
debian maintainer, and I have been talking and agree on the general way
to do this.
As said in the wiki page [1] there are 2 types of monitoring:
* Interactive monitoring: User provokes action through a graphical
tool to check the disk through smartctl. There is no need to change
smartmontools to support this, the graphical tool can be written
now.
* non-Interactive monitoring: User is notified when the disk is
showing signs of dying. The infrastructure to support this is
detailed in the rest of the proposal.
The basic idea is to run smartd by default and have it, instead of
executing /bin/mail, execute a script runner which in turn executes the
scripts in an /etc/smart/all.d directory. Thus a package wishing
to be notified of disk problems, would drop a script in
/etc/smart/all.d. This could then, for example, send a dbus message.
In more detail, with specific actions/caveats necessary to reach this
point:
Running smartd by default:
Currently this causes things like system hangs with some hardware. I
am not sure how much hardware is affected. This seems to be
something that is under development in the Debian upstream with the
solution to be a script which generates a safe /etc/smartd.conf.
A question for the list is whether it is better for this to be
debconf-configurable or just an Ubuntu specific patch?
smartd as non-root:
smartd runs as root. This also has implications for the permissions
with which the script runner runs.
script runner:
This would be started by changing the default configuration smartd
to run a script runner (/usr/sbin/smartd-scripts ?) by default.
This, in turn, runs all scripts in /etc/smartd/all.d and pipes the
stdin to them. As smartd monitors the exit status of the script
runner, the script runner should monitor the exit status of the
sub-scripts. For obvious reasons these scripts should run and
exit quickly.
Another question for the list is weather this has any use being
debconf configurable?
[1] http://www.ubuntulinux.org/wiki/DiskMonitoring
--
Brian Sutherland
It's 10 minutes, 5 if you walk fast.
More information about the ubuntu-devel
mailing list