Skip to content

Commit 7b2d8ee

Browse files
committed
add function to resize multipath map
1 parent d23b324 commit 7b2d8ee

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

iscsi/multipath.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,14 @@ func FlushMultipathDevice(device *Device) error {
116116
debug.Printf("Finshed flushing multipath device %v.\n", devicePath)
117117
return nil
118118
}
119+
120+
// ResizeMultipathDevice resize a multipath device based on its underlying devices
121+
func ResizeMultipathDevice(device *Device) error {
122+
debug.Printf("Resizing multipath device %s\n", device.GetPath())
123+
124+
if output, err := exec.Command("multipathd", "resize", "map", device.Name).CombinedOutput(); err != nil {
125+
return fmt.Errorf("could not resize multipath device: %s (%v)", output, err)
126+
}
127+
128+
return nil
129+
}

0 commit comments

Comments
 (0)