talos
talos copied to clipboard
MachineDisk should support diskSelector like InstallConfig does
https://github.com/siderolabs/talos/blob/da0e638f04cfab1ed93891231035439ad77666d1/pkg/machinery/config/types/v1alpha1/v1alpha1_types.go#L1607
VMware in particular is not good at assigning /dev/sd* in any particular order (except for the boot disk).
+1 for this feature request.
For my use case i have multiple disks of different sizes, one that needs to store some important config and one that can contain huge amounts of data.
It's kinda random if it's /dev/sdb or /dev/sdb with VMware, they do however have different paths and I can enforce this more by selecting a different bus (example):
NODE DEV MODEL SERIAL TYPE UUID WWID MODALIAS NAME SIZE BUS_PATH
10.8.111.31 /dev/sda Virtual disk - HDD - - scsi:t-0x00 - 32 GB /pci0000:00/0000:00:15.0/0000:03:00.0/host0/target0:0:0/0:0:0:0/
10.8.111.31 /dev/sdb Virtual disk - HDD - - scsi:t-0x00 - 10 TB /pci0000:00/0000:00:17.0/0000:13:00.0/host3/target3:0:1/3:0:1:0/
10.8.111.31 /dev/sdc Virtual disk - HDD - - scsi:t-0x00 - 1.1 GB /pci0000:00/0000:00:15.0/0000:03:00.0/host0/target0:0:2/0:0:2:0/
It would be great to be able to filter those using a diskSelector like the case with the InstallConfig.diskSelector
.
A small update here, I tried setting the following in the talosconfig:
machine:
disks:
- device: /dev/disk/by-path/pci-0000:03:00.0-scsi-0:0:2:0
partitions:
- mountpoint: /var/mnt/test
However the mounting then fails, the disk on that path does exist:
I also tried using /dev/disk/by-id/
and it doesn't work.
I also tried using
/dev/disk/by-id/
and it doesn't work.
Most likely since the suffix is set to 1
instead of -part1
for example. This behaviour you can see above as well:
# Configured:
/dev/disk/by-path/pci-0000:03:00.0-scsi-0:0:2:0
# Talos is trying to mount the path:
/dev/disk/by-path/pci-0000:03:00.0-scsi-0:0:2:01 (Note the 1 in the end)
# Actual disk by-path:
/dev/disk/by-path/pci-0000:03:00.0-scsi-0:0:2:0-part1
The issue with device symlinks was fixed in v1.6.0-beta.1