siderolabs / talos

Talos Linux is a modern Linux distribution built for Kubernetes.
https://www.talos.dev
Mozilla Public License 2.0
6.9k stars 555 forks source link

feat: implement tracking of blockdevice secondaries #9716

Closed smira closed 1 week ago

smira commented 1 week ago

This is going to be used to detect disks that are safe to wipe.

For blockdevices, track secondaries as direct references, e.g. encrypted STATE partition might have secondary vda5.

For disks, re-map secondaries to be whole devices names, e.g. vda.

frezbo commented 1 week ago

need tests?

smira commented 1 week ago

need tests?

yes... good idea, I will do

smira commented 1 week ago

need tests?

yes... good idea, I will do

added some tests for secondary disks detection

smira commented 1 week ago

The test works (when using encrypted volumes):

    volumes.go:174: disk: dm-0 secondaries: [vda]
    volumes.go:174: disk: dm-1 secondaries: [vda]
smira commented 1 week ago

/m