Example #1
0
func UmountExistingVolume(fstype, target, sharedDir string) error {
	if fstype == "dir" {
		return storage.UmountVFSVolume(target, sharedDir)
	}
	if !path.IsAbs(target) {
		return nil
	}
	return dm.UnmapVolume(target)
}
Example #2
0
func (dms *DevMapperStorage) CleanupContainer(id, sharedDir string) error {
	devFullName, err := dm.MountContainerToSharedDir(id, sharedDir, dms.DevPrefix)
	if err != nil {
		glog.Error("got error when mount container to share dir ", err.Error())
		return err
	}

	return dm.UnmapVolume(devFullName)
}
Example #3
0
func CleanupExistingVolume(fstype, filepath, sharedDir string) error {
	if fstype == "dir" {
		return storage.UmountVFSVolume(filepath, sharedDir)
	}
	return dm.UnmapVolume(filepath)
}