-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use BusPath to resolve dm devices to real devices
If multipathd is running and has taken over a device, ResolvePersistentDevPath() will end up returning a "/dev/dm-*" device path, which we don't want. We want the real underyling device (e.g. "/dev/sda"). If we take a "/dev/dm-*" path and later update the blockdevice CR with it, we lose all the interesting DeviceStatus information, like the WWN. Happily, in this case, we can figure out the right path to use by checking "/dev/disk/by-path/" + the device's bus path. This has the added advantage of also working for block devices that have no WWN. Related issue: harvester/harvester#6531 Signed-off-by: Tim Serong <[email protected]>
- Loading branch information
Showing
2 changed files
with
74 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters