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

Method UnmountPersistentDisk

platform/linux_platform.go:1509–1525  ·  view source on GitHub ↗
(diskSettings boshsettings.DiskSettings)

Source from the content-addressed store, hash-verified

1507}
1508
1509func (p linux) UnmountPersistentDisk(diskSettings boshsettings.DiskSettings) (bool, error) {
1510 p.logger.Debug(logTag, "Unmounting persistent disk %+v", diskSettings)
1511
1512 realPath, timedOut, err := p.devicePathResolver.GetRealDevicePath(diskSettings)
1513 if timedOut {
1514 return false, nil
1515 }
1516 if err != nil {
1517 return false, bosherr.WrapError(err, "Getting real device path")
1518 }
1519
1520 if !p.options.UsePreformattedPersistentDisk {
1521 realPath = p.partitionPath(realPath, 1)
1522 }
1523
1524 return p.diskManager.GetMounter().Unmount(realPath)
1525}
1526
1527func (p linux) GetEphemeralDiskPath(diskSettings boshsettings.DiskSettings) (string, error) {
1528 realPath, _, err := p.devicePathResolver.GetRealDevicePath(diskSettings)

Callers

nothing calls this directly

Calls 5

partitionPathMethod · 0.95
DebugMethod · 0.65
GetRealDevicePathMethod · 0.65
UnmountMethod · 0.65
GetMounterMethod · 0.65

Tested by

no test coverage detected