converge: github.com/asteris-llc/converge/resource/lvm/fs Index | Files

package fs

import "github.com/asteris-llc/converge/resource/lvm/fs"

Index

Package Files

fs.go preparer.go

func NewResourceFS Uses

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

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

type Mount Uses

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 Uses

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 Uses

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

Prepare a new task

Package fs imports 10 packages (graph) and is imported by 1 packages. Updated 2017-01-13. Refresh now. Tools for package owners.