Skip to content

Use stable IDs for NVMe disks #64

Open
@wasd171

Description

@wasd171

Currently templates use talm.discovered.system_disk_name for detecting system disk name. Issue with it is that disk names are not stable. Could we add an additional helper to talm to use /dev/disk/by-id paths for NVMe disks?

Something like that

{{- define "talm.discovered.system_disk_nvme_id" }}
{{- $diskName := ( include "talm.discovered.system_disk_name" . ) }}
{{- range (lookup "disks" "" "").items }}
{{- if and (eq .spec.dev_path $diskName) (eq .spec.transport "nvme") .spec.wwid }}
{{- printf "/dev/disk/by-id/nvme-%s" .spec.wwid }}
{{- end }}
{{- end }}
{{- end }}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions