internal/diskmatch.Match compares every hint field exactly. A machine whose disk name or serial is not known in advance cannot be described.
Decided shape:
- Every field accepts a glob, not just the device name. Serial numbers often carry a fixed vendor prefix, so a glob is useful there too.
- When a glob matches more than one disk, sort the matches in string order and take the smallest —
sd* against sda and sdb selects sda.
- The tiebreak exists because a glob is the only way to reach more than one match. An exact hint that matched several disks would still be an error, as it is today: the controller requires exactly one match before any write.
Not scheduled.
internal/diskmatch.Matchcompares every hint field exactly. A machine whose disk name or serial is not known in advance cannot be described.Decided shape:
sd*againstsdaandsdbselectssda.Not scheduled.