Skip to content

Disable SMART Disk Monitoring Service (smartd)

An XCCDF Rule

Description

SMART (Self-Monitoring, Analysis, and Reporting Technology) is a feature of hard drives that allows them to detect symptoms of disk failure and relay an appropriate warning. The smartd service can be disabled with the following command:
$ sudo systemctl mask --now smartd.service

Rationale

SMART can help ensure availability of systems by notifying system operators of failing hardware. Nevertheless, if it is not needed or the system's drives are not SMART-capable (such as solid state drives), this service can be disabled.

ID
xccdf_org.ssgproject.content_rule_service_smartd_disabled
Severity
Low
References
Updated

Remediation Templates

A Kubernetes Patch

apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
spec:
  config:
    ignition:
      version: 3.1.0

OS Build Blueprint

[customizations.services]
disabled = ["smartd"]

An Ansible Snippet

- name: Block Disable service smartd
  block:
  - name: Disable service smartd
    block:

    - name: Disable service smartd

A Shell Script

# Remediation is applicable only in certain platforms
if [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; then
SYSTEMCTL_EXEC='/usr/bin/systemctl'
"$SYSTEMCTL_EXEC" stop 'smartd.service'
"$SYSTEMCTL_EXEC" disable 'smartd.service'
"$SYSTEMCTL_EXEC" mask 'smartd.service'

A Puppet Snippet

include disable_smartd
class disable_smartd {
  service {'smartd':
    enable => false,
    ensure => 'stopped',
  }
}