drive selection for disk arrays

David Christensen dpchrist at
Sat Mar 28 03:03:14 UTC 2020

On 2020-03-27 17:45, Karl Denninger wrote:
> On 3/27/2020 19:39, David Christensen wrote:
>> On 2020-03-27 02:45, Polytropon wrote:
>>> When a drive _reports_ bad sectors, at least in the past
>>> it was an indication that it already _has_ lots of them.
>>> The drive's firmware will remap bad sectors to spare
>>> sectors, so "no error" so far.
>> If a drive detects an error, my guess is that it will report the error
>> to the OS; regardless of the outcome of a particular I/O operation
>> (data read, data written, data lost) or internal actions taken (block
>> marked bad, block remapped, etc.).  It is then up to the OS to decide
>> what to do next.  RAID and/or ZFS offer the means for shielding the
>> application from I/O and drive failures.
> Yes, but...
> Those drives that can do "SMART" will report (if you have a patrol
> daemon for it running) if they do a "silent" sector reassignment.
> Otherwise the OS is none the wiser and neither is ZFS (or anything
> else.)  

I guess I need to RTFM:

> Needless to say if reassignments increase you might want to
> think about swapping the drive *before* it blows up!


> I have the daemon running on all my machines.  It works nicely and has
> warned me a few times over the years.  With that said it doesn't ALWAYS
> catch a drive before it pukes.

Are  you referring to periodic, smartd, or something else?

# pkg install smartmontools
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 1 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
	smartmontools: 7.0_2

Number of packages to be installed: 1

The process will require 2 MiB more space.
495 KiB to be downloaded.
[1/1] Fetching smartmontools-7.0_2.txz: 100%  495 KiB 507.1kB/s    00:01
Checking integrity... done (0 conflicting)
[1/1] Installing smartmontools-7.0_2...
[1/1] Extracting smartmontools-7.0_2: 100%
Message from smartmontools-7.0_2:

smartmontools has been installed

To check the status of drives, use the following:

	/usr/local/sbin/smartctl -a /dev/ad0	for first ATA/SATA drive
	/usr/local/sbin/smartctl -a /dev/da0	for first SCSI drive
	/usr/local/sbin/smartctl -a /dev/ada0	for first SATA drive

To include drive health information in your daily status reports,
add a line like the following to /etc/periodic.conf:
	daily_status_smart_devices="/dev/ad0 /dev/da0"
substituting the appropriate device names for your SMART-capable disks.

To enable drive monitoring, you can use /usr/local/sbin/smartd.
A sample configuration file has been installed as
Copy this file to /usr/local/etc/smartd.conf and edit appropriately

To have smartd start at boot
	echo 'smartd_enable="YES"' >> /etc/rc.conf


More information about the freebsd-questions mailing list