Skip to content

Conversation

k0ste
Copy link
Contributor

@k0ste k0ste commented Apr 28, 2025

This PR add's metric, when NVMe PLP is failed (bool). Further use of the drive is unsafe; if the power fails, the data may be lost.

Healthy device

[root@host]# smartctl --json --info --capabilities --health --attributes --tolerance=verypermissive --nocheck=standby --format=brief --log=error --device=nvme /dev/nvme1 | jq .smart_status
{
  "passed": true,
  "nvme": {
    "value": 0
  }
}

PLP failed

[root@host]# smartctl --json --info --capabilities --health --attributes --tolerance=verypermissive --nocheck=standby --format=brief --log=error --device=nvme /dev/nvme0 | jq .smart_status
{
  "passed": false,
  "nvme": {
    "value": 16,
    "spare_below_threshold": false,
    "temperature_above_or_below_threshold": false,
    "reliability_degraded": false,
    "media_read_only": false,
    "volatile_memory_backup_failed": true,
    "persistent_memory_region_unreliable": false,
    "other": 0
  }
}

@k0ste k0ste changed the title feat: support for mine NVMe Vlatile Memory Backup feat: support for mine NVMe Volatile Memory Backup Apr 28, 2025
@k0ste
Copy link
Contributor Author

k0ste commented Apr 28, 2025

Screenshot 2025-04-28 at 16 59 18

@k0ste
Copy link
Contributor Author

k0ste commented Apr 28, 2025

Rebase after updated .golangci.yml merged in #290

This PR add's metric, when NVMe PLP is failed (bool)
Further use of the drive is unsafe; if the power fails, the data may be lost.

Healthy device
```console
[root@host]# smartctl --json --info --capabilities --health --attributes --tolerance=verypermissive --nocheck=standby --format=brief --log=error --device=nvme /dev/nvme1 | jq .smart_status
{
  "passed": true,
  "nvme": {
    "value": 0
  }
}
```

PLP failed
```console
[root@host]# smartctl --json --info --capabilities --health --attributes --tolerance=verypermissive --nocheck=standby --format=brief --log=error --device=nvme /dev/nvme0 | jq .smart_status
{
  "passed": false,
  "nvme": {
    "value": 16,
    "spare_below_threshold": false,
    "temperature_above_or_below_threshold": false,
    "reliability_degraded": false,
    "media_read_only": false,
    "volatile_memory_backup_failed": true,
    "persistent_memory_region_unreliable": false,
    "other": 0
  }
}
```

Signed-off-by: Konstantin Shalygin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant