Documentation ¶
Overview ¶
TODO: do we need to handle .wh..wh.plnk layer hardlinks?
Package storagemigration ¶
migrates images and containers from `aufs` to `overlay2` storage-driver
To enable safe rollback, no breaking changes are applied to the real storage locations until we are done. The overlay2 tree is built in a temporary location: `/var/lib/balena-engine/overlay2.temp` and moved on completion.
We use hardlinks to "duplicate" the layer data. This ensures we have a rollback path at the cost of ~2x the inode count.
Index ¶
- Constants
- func AppendLower(lower, parentID string) string
- func CreateLayerLink(root, layerID string) (layerRef string, err error)
- func GetParentIDs(root, id string) ([]string, error)
- func IsOpaqueParentDir(filename string) bool
- func IsWhiteout(filename string) bool
- func IsWhiteoutMeta(filename string) bool
- func LoadIDs(root string) ([]string, error)
- func Migrate(root string) (err error)
- func SetOpaque(path string) error
- func SetWhiteout(path string) error
- func StripWhiteoutPrefix(filename string) string
- func SwitchAllContainersStorageDriver(root, newStorageDriver string) error
- type Layer
- type Meta
- type MetaType
- type State
Constants ¶
const ( // MetaOpaque means the directory should appear empty MetaOpaque = iota // MetaWhiteout means the file should not appear MetaWhiteout // MetaOther is a catch-all for everything else MetaOther )
Variables ¶
This section is empty.
Functions ¶
func AppendLower ¶
AppendLower adds parentID to the list of lower directories written to /:layer_id/lower
func CreateLayerLink ¶
CreateLayerLink creates a link file in the layer root dir and a corresponding file in the l directory The returned layerRef is the content of the created link file
func GetParentIDs ¶
Read the layers file for the current id and return all the layers represented by new lines in the file
If there are no lines in the file then the id has no parent and an empty slice is returned.
from daemon/graphdriver/aufs/dirs.go
func IsOpaqueParentDir ¶
func IsWhiteout ¶
func IsWhiteoutMeta ¶
func SetOpaque ¶
SetOpaque marks the directory to appera empty by setting the xattr "trusted.overlay.opaque" to "y"
func SetWhiteout ¶
SetWhiteout marks the file as deleted by creating a character device with 0/0 device number
func StripWhiteoutPrefix ¶
func SwitchAllContainersStorageDriver ¶
SwitchAllContainersStorageDriver iterates over all containers and configures them to use `newStorageDriver`.