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

Method IsPersistentDiskMounted

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

Source from the content-addressed store, hash-verified

1610}
1611
1612func (p linux) IsPersistentDiskMounted(diskSettings boshsettings.DiskSettings) (bool, error) {
1613 p.logger.Debug(logTag, "Checking whether persistent disk %+v is mounted", diskSettings)
1614 realPath, timedOut, err := p.devicePathResolver.GetRealDevicePath(diskSettings)
1615 if timedOut {
1616 p.logger.Debug(logTag, "Timed out resolving device path for %+v, ignoring", diskSettings)
1617 return false, nil
1618 }
1619 if err != nil {
1620 return false, bosherr.WrapError(err, "Getting real device path")
1621 }
1622
1623 if !p.options.UsePreformattedPersistentDisk {
1624 realPath = p.partitionPath(realPath, 1)
1625 }
1626
1627 return p.diskManager.GetMounter().IsMounted(realPath)
1628}
1629
1630func (p linux) StartMonit() error {
1631 err := p.GetServiceManager().Setup("monit")

Callers

nothing calls this directly

Calls 5

partitionPathMethod · 0.95
DebugMethod · 0.65
GetRealDevicePathMethod · 0.65
IsMountedMethod · 0.65
GetMounterMethod · 0.65

Tested by

no test coverage detected