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

FreeBSD Manual Pages


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

     diskcheckd	-- daemon to check for disk read errors

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

     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 de-

     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 match-
     ing /dev/xx* should not be	included in expansion of wildcards (see	be-
     low).  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	kilo-
     bytes 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 disklabel, if pos-
     sible.  Fields which are not specified should contain a single "*"	char-

     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 actu-
     ally checked.  Similarly, if you specify the third	field (days for	com-
     plete scan) it is unlikely	that a complete	scan will actually take	ex-
     actly this	many days.

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

     When diskcheckd receives a	SIGTERM	or SIGINT signal, it saves its current
     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 consists of	the
     device filename and the current offset into that device.

     diskcheckd	can be instructed to reload the	configuration file by sending
     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	messages on
		 its standard error output.

		 This flag is primarily	used for debugging, and	may be speci-
		 fied more than	once.  Additional instances will result	in ad-
		 ditional 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 default

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

     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	scanning each
     disk.  This report	can be viewed using ps(1).

				 Default configuration file.
     /var/db/diskcheckd.offsets	 Default location of saved offsets.

     To	check all of /dev/ad0 for errors once every two	weeks, use this	entry
     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	   *

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

     diskcheckd	first appeared in FreeBSD 5.0.

     diskcheckd	and this manual	page were written by Ben Smithurst
     <>,	with input from	Poul-Henning Kamp <>.
     The geom-aware version of the sector->partition translation code was
     added by Perry Hutchison <>, based on	a mechanism
     suggested by Warner Losh <>.

     diskcheckd	Too much of the	code assumes all disks have 512	byte sectors.

     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	13.0			 July 4, 2001			  FreeBSD 13.0


Want to link to this manual page? Use this URL:

home | help