devicemapper

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 17, 2018 License: Apache-2.0 Imports: 12 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateNewDevice

func CreateNewDevice(containerId, devPrefix, rootPath string) error

func CreatePool

func CreatePool(dm *DeviceMapper) error

func CreateVolume

func CreateVolume(poolName, volName, dev_id, mkfs string, size int, restore bool) error

func DMCleanup

func DMCleanup(dm *DeviceMapper) error

Delete the pool which is created in 'Init' function

func DeleteVolume

func DeleteVolume(dm *DeviceMapper, dev_id int) error

func InjectFile added in v0.5.0

func InjectFile(src io.Reader, containerId, devPrefix, target, basePath string, perm, uid, gid int) error

func MountContainerToSharedDir

func MountContainerToSharedDir(containerId, sharedDir, devPrefix string) (string, error)

For device mapper, we do not need to mount the container to sharedDir. All of we need to provide the block device name of container.

func ProbeFsType

func ProbeFsType(device string) (string, error)

func UnmapVolume added in v0.6.0

func UnmapVolume(deviceFullPath string) error

Types

type DeviceMapper

type DeviceMapper struct {
	Datafile         string
	Metadatafile     string
	DataLoopFile     string
	MetadataLoopFile string
	Size             int
	PoolName         string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL