disks API should report `by-id` and `by-path` links
Feature Request
When constructing machine configs for reliable installation media selection, it is useful to use the /dev/disk/by-id or /dev/disk/by-path links. However, the current disks API makes these difficult to determine (especially since talosctl ls --insecure is not supported).
To facilitate this, we should include link information for the by-id and by-path paths for these. In doing so, note that the by-id link references are multi-valued: more than one link exists for the same disk:
$ ls /dev/disk/by-id -l |grep nvme0n1 |grep -v nvme0n1p
lrwxrwxrwx 1 root root 13 Oct 20 21:04 nvme-eui.002538570141e6e2 -> ../../nvme0n1
lrwxrwxrwx 1 root root 13 Oct 20 21:04 nvme-Samsung_SSD_970_EVO_1TB_S5H9NS0N703046B -> ../../nvme0n1
Description
Perhaps something like:
message Disk {
...
// Aliases, such as `/dev/disk/by-id/nvme-eui.002538570141e6e2`
repeated string aliases = 10
}
In case anyone is coming here wanting this and they are not still in the build phase, talosctl ls /dev/disk/by-id works once the machine is joined to the cluster. Won't help for install disk situations, but might for extra disk scenarios. Would love to see this implemented in talosctl disks in future.
Thank you Martyn, I was pulling my hair out over this! This should be mentioned somewhere in the docs.