Skip to content

Commit aac01d4

Browse files
committed
add hint about multipathd not running in logs
1 parent 52c573c commit aac01d4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

iscsi/iscsi.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,11 @@ func getMultipathDevice(devices []Device) (*Device, error) {
224224

225225
for _, device := range devices {
226226
if len(device.Children) != 1 {
227-
return nil, fmt.Errorf("device is not mapped to exactly one multipath device: %v", device.Children)
227+
multipathdNotRunning := ""
228+
if len(device.Children) == 0 {
229+
multipathdNotRunning = " (is multipathd running?)"
230+
}
231+
return nil, fmt.Errorf("device is not mapped to exactly one multipath device%s: %v", multipathdNotRunning, device.Children)
228232
}
229233
if multipathDevice != nil && device.Children[0].Name != multipathDevice.Name {
230234
return nil, fmt.Errorf("devices don't share a common multipath device: %v", devices)

0 commit comments

Comments
 (0)