driver

package
v1.6.5 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2019 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewOverlayDriver added in v1.6.5

func NewOverlayDriver(volumesDir, overlaysDir string) (volume.Driver, error)

Types

type BtrFSDriver

type BtrFSDriver struct {
	// contains filtered or unexported fields
}

func NewBtrFSDriver

func NewBtrFSDriver(
	logger lager.Logger,
	btrfsBin string,
) *BtrFSDriver

func (*BtrFSDriver) CreateCopyOnWriteLayer

func (driver *BtrFSDriver) CreateCopyOnWriteLayer(path string, parent string) error

func (*BtrFSDriver) CreateVolume

func (driver *BtrFSDriver) CreateVolume(path string) error

func (*BtrFSDriver) DestroyVolume

func (driver *BtrFSDriver) DestroyVolume(path string) error

type NaiveDriver

type NaiveDriver struct{}

func (*NaiveDriver) CreateCopyOnWriteLayer

func (driver *NaiveDriver) CreateCopyOnWriteLayer(path string, parent string) error

func (*NaiveDriver) CreateVolume

func (driver *NaiveDriver) CreateVolume(path string) error

func (*NaiveDriver) DestroyVolume

func (driver *NaiveDriver) DestroyVolume(path string) error

type OverlayDriver

type OverlayDriver struct {
	VolumesDir  string
	OverlaysDir string
}

func (*OverlayDriver) CreateCopyOnWriteLayer

func (driver *OverlayDriver) CreateCopyOnWriteLayer(path string, parent string) error

func (*OverlayDriver) CreateVolume

func (driver *OverlayDriver) CreateVolume(path string) error

func (*OverlayDriver) DestroyVolume

func (driver *OverlayDriver) DestroyVolume(path string) error

func (*OverlayDriver) RecoverMountTable added in v1.6.5

func (driver *OverlayDriver) RecoverMountTable(liveVolumesDir string) error

We apply 2 types of mounts when using the overlay driver

  1. For any new volume, we create its root in the overlaysDir and issue a bind mount of that root into the liveVolumesDir
  2. For COW volumes, we create upper and work dirs and use ancestry to determine the lower dir. These dirs are used to create an overlay mount.

These mounts can disappear when the system reboots (mount table cleared) As a precaution we reattach mounts during startup to fix missing ones

Jump to

Keyboard shortcuts

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