vitastor-disk: Accept symlinks to whole disks in prepare #134

Merged
vitalif merged 2 commits from koolkhel/vitastor:disk-prepare-symlinks into master 2026-11-22 15:09:53 +03:00

2 Commits

Author SHA1 Message Date
7b72edda68 vitastor-disk: Keep the old checks for paths which fail to resolve in prepare
A path which realpath() can't resolve was skipped with only the "Failed
to resolve" message. Pass it on as given instead, so prepare reports it
like before: "does not start with /dev/" or "does not exist".
2026-11-20 19:27:28 +03:00
450cf4963b vitastor-disk: Accept symlinks to whole disks in prepare
prepare looked up /sys/block/<name> by the device path as given, so a
symlink to a whole disk, like /dev/disk/by-id/* or /dev/disk/by-path/*,
was refused as "probably a partition". Resolve each path once at the
start of collect_devices() and use the real device name after that.

One disk can now be given under several names, and the `seen` set meant
to catch duplicates was never filled, so a disk given twice was taken
twice. Fill it with the resolved names.
2026-11-20 07:37:07 +03:00