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 - Kubernetes Patch

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

Remediation - OS Build Blueprint


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

Remediation - Ansible

- name: Block Disable service smartd
  block:

  - name: Disable service smartd
    block:


Remediation - 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'

Remediation - Puppet

include disable_smartd

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