MCPcopy Create free account
hub / github.com/cloudfoundry/bosh-agent / flushMultipathDevice

Method flushMultipathDevice

platform/linux_platform.go:1905–1920  ·  view source on GitHub ↗
(id string)

Source from the content-addressed store, hash-verified

1903}
1904
1905func (p linux) flushMultipathDevice(id string) error {
1906 p.logger.Debug(logTag, "Flush multipath device: %s", id)
1907 result, _, _, err := p.cmdRunner.RunCommand("multipath", "-ll")
1908 if err != nil {
1909 return bosherr.WrapErrorf(err, "Get multipath information")
1910 }
1911
1912 if strings.Contains(result, id) {
1913 _, _, _, err := p.cmdRunner.RunCommand("multipath", "-f", id)
1914 if err != nil {
1915 return bosherr.WrapErrorf(err, "Flush multipath device")
1916 }
1917 }
1918
1919 return nil
1920}
1921
1922type insufficientSpaceError struct {
1923 spaceFound uint64

Callers 1

MigratePersistentDiskMethod · 0.95

Calls 3

ContainsMethod · 0.80
DebugMethod · 0.65
RunCommandMethod · 0.65

Tested by

no test coverage detected