storage

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2021 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DiskPrefixToIgnore disks with this prefix will not be reported and wiped.
	DiskPrefixToIgnore = "ram"
)

Functions

func FetchBlockIDProperties added in v0.5.0

func FetchBlockIDProperties(partitionDevice string) (map[string]string, error)

FetchBlockIDProperties use blkid to return more properties of the given partition device

func WipeDisk added in v0.5.0

func WipeDisk(disk *ghw.Disk) error

WipeDisk will erase all content and partitions of given existing disk.

func WipeDisks

func WipeDisks() error

WipeDisks will erase all content and partitions of all existing Disks

Types

type Disk

type Disk struct {
	// Device the name of the disk device visible from kernel side, e.g. sda
	Device string
	// Partitions to create on this disk, order is preserved
	Partitions []Partition
}

Disk is a physical Disk

type Filesystem added in v0.8.1

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

func New added in v0.8.1

func (*Filesystem) CreateFSTab added in v0.8.1

func (f *Filesystem) CreateFSTab() error

func (*Filesystem) Run added in v0.8.1

func (f *Filesystem) Run() error

func (*Filesystem) Umount added in v0.8.1

func (f *Filesystem) Umount()

type Partition

type Partition struct {
	Label      string
	Filesystem string
	Properties map[string]string
}

Jump to

Keyboard shortcuts

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