Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
DISKCHECKD(8)		    System Manager's Manual		 DISKCHECKD(8)

NAME
       diskcheckd -- daemon to check for disk read errors

SYNOPSIS
       diskcheckd [-d] [-f conf_file] [-o save_file]

DESCRIPTION
       diskcheckd  is  a  daemon  which	runs in	the background,	reading	entire
       disks to	find any read errors on	those disks.  The disks	 which	should
       be  scanned,  and  the  rates  at which they should be scanned, must be
       specified     in	    the	    configuration     file,	 which	    is
       /usr/local/etc/diskcheckd.conf by default.

       Any blank lines or lines	starting with a	`#' character in this file are
       ignored.	 Each non-comment line of this file must be in one of two for-
       mats.   The  first  format  is  `!xx',  and specifies that device names
       matching	/dev/xx* should	not be included	in expansion of	wildcards (see
       below).	The second format  consists  of	 four  white  space  separated
       fields,	which  are  the	 full pathname of the disk device, the size of
       this disk, the frequency	in days	at which to check this disk,  and  the
       rate in kilobytes per second at which to	check this disk.

       Either the frequency or the rate	should be specified, not both, since a
       specified  frequency will be internally converted to whatever rate will
       result in the disk being	scanned	 at  (approximately)  that  frequency.
       The  size of the	disk should not	be specified if	the rate is specified,
       since the size is used only to convert a	 specified  frequency  into  a
       rate.

       If  the	disk is	specified as "*", then diskcheckd will apply the given
       settings	to all disks in	the  system,  obtained	using  the  kern.disks
       sysctl  variable.   If the size is specified as "*" (recommended), then
       the size	of the disk will be automatically determined from the  diskla-
       bel, if possible.  Fields which are not specified should	contain	a sin-
       gle "*" character.

       Note that diskcheckd always reads data from the disk in 64KB blocks, so
       the rate	you specify may	not be the exact rate at which the disk	is ac-
       tually  checked.	  Similarly,  if you specify the third field (days for
       complete	scan) it is unlikely that a complete scan will	actually  take
       exactly this many days.

       To  run	diskcheckd  automatically  at boot time, the diskcheckd_enable
       variable	in rc.conf(5) should be	set to "YES".

       When diskcheckd receives	a SIGTERM or SIGINT signal, it saves its  cur-
       rent state information to a file, so that after a reboot	diskcheckd can
       resume  reading	from  where it left off, rather	than starting from the
       beginning of the	disk again.  The information saved to this  file  con-
       sists of	the device filename and	the current offset into	that device.

       diskcheckd  can be instructed to	reload the configuration file by send-
       ing it a	SIGHUP signal.

       diskcheckd accepts the following	command	line options:

       -d	   If this flag	is specified, diskcheckd will  not  fork  into
		   the	background and detach from its controlling terminal to
		   become a daemon, and	it will	duplicate its system log  mes-
		   sages on its	standard error output.

		   This	flag is	primarily used for debugging, and may be spec-
		   ified  more than once.  Additional instances	will result in
		   additional debugging	 messages  on  standard	 error;	 these
		   added messages will not be written to the system log.

       -f	   Specify  the	 configuration file to use, instead of the de-
		   fault /usr/local/etc/diskcheckd.conf.

       -o	   Specify the file to save disk offsets to,  instead  of  the
		   default /var/db/diskcheckd.offsets.

PROGRESS REPORTING
       After  every 5 minutes or so of sleep time between reads	(not including
       time spent waiting for the reads	themselves  to	complete),  diskcheckd
       will  update  its command parameter space to show its progress in scan-
       ning each disk.	This report can	be viewed using	ps(1).

FILES
       /usr/local/etc/diskcheckd.conf
				   Default configuration file.
       /var/db/diskcheckd.offsets  Default location of saved offsets.

EXAMPLES
       To check	all of /dev/ad0	for errors once	every two weeks, use this  en-
       try in diskcheckd.conf:

	     /dev/ad0	     *	     14	     *

       To  check  the  first SCSI disk for errors at approximately 64KB/s, use
       the following entry:

	     /dev/da0	     *	     *	     64

       To check	all disks once every four weeks:

	     *	     *	     28	     *

DIAGNOSTICS
       If any errors occur, they will be written to syslogd(8).

HISTORY
       diskcheckd first	appeared in FreeBSD 5.0.

AUTHORS
       diskcheckd  and	this  manual  page  were  written  by  Ben   Smithurst
       <ben@FreeBSD.org>, with input from Poul-Henning Kamp <phk@FreeBSD.org>.
       The  geom-aware	version	 of the	sector->partition translation code was
       added by	Perry Hutchison	<perryh@pluto.rain.com>, based on a  mechanism
       suggested by Warner Losh	<imp@bsdimp.com>.

BUGS
       diskcheckd  Too	much  of the code assumes all disks have 512 byte sec-
       tors.

       There are two versions of the code that attempts	to identify and	report
       which slice and/or partition contain a detected error.  The older  ver-
       sion,  used  when  the  DIOCGDINFO  ioctl  is  available	(i.e. prior to
       FreeBSD 11.0 ), does not	understand either GPT partitions or  dedicated
       BSD disks (having the BSD disklabel in place of an MBR).

FreeBSD	Ports 14.quarterly	 July 4, 2001			 DISKCHECKD(8)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=diskcheckd&sektion=8&manpath=FreeBSD+Ports+14.3.quarterly>

home | help