fs

package
v0.0.0-...-02c76fb Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2020 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewResourceFS

func NewResourceFS(lvm lowlevel.LVM, m *Mount) (resource.Task, error)

NewResourceFS create new resource.Task node for create/mount FileSystem.

Types

type Mount

type Mount struct {
	What       string
	Where      string
	Type       string
	Before     string
	WantedBy   string
	RequiredBy string
}

Mount is a structure for holding values to be rendered as .mount unit for systemd

type Preparer

type Preparer struct {
	// Device path to be mount
	// Examples: `/dev/sda1`, `/dev/mapper/vg0-data`
	Device string `hcl:"device" required:"true" nonempty:"true"`

	// Mountpoint where device will be mounted
	// (should be an existing directory)
	// Example: /mnt/data
	Mountpoint string `hcl:"mount" required:"true" nonempty:"true"`

	// Fstype is filesystem type
	// (actually any linux filesystem, except `ZFS`)
	// Example:  `ext4`, `xfs`
	Fstype string `hcl:"fstype" required:"true" nonempty:"true"`

	// RequiredBy is a list of dependencies, to pass to systemd .mount unit
	RequiredBy []string `hcl:"requiredBy"`

	// WantedBy is a list of dependencies, to pass to systemd .mount unit
	WantedBy []string `hcl:"wantedBy"`

	// Before is a list of dependencies, to pass to systemd .mount unit
	Before []string `hcl:"before"`
}

Preparer for LVM FS Task

Filesystem do formatting and mounting for LVM volumes (also capable to format usual block devices as well)

func (*Preparer) Prepare

func (p *Preparer) Prepare(ctx context.Context, render resource.Renderer) (resource.Task, error)

Prepare a new task

Jump to

Keyboard shortcuts

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