devicemapper

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2016 License: Apache-2.0 Imports: 11 Imported by: 0

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 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, rootPath 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)

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