disk

package
v0.2.23 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MountVirtualDisk

func MountVirtualDisk(ctx context.Context, logger *zap.Logger, opts *MountOptions) error

MountVirtualDisk mounts a virtual disk device.

Types

type LVMOptions

type LVMOptions struct {
	// VolumeGroup is the name of the LVM volume group to create.
	VolumeGroup string
	// LogicalVolume is the name of the LVM logical volume to create.
	// It will be allocated to use all available space in the volume group.
	LogicalVolume string
}

LVMOptions are the options for setting up an LVM logical volume.

type MountOptions

type MountOptions struct {
	// SocketPath is the path to host the NBD server on.
	SocketPath string
	// ImagePath is the path to the qcow2 backing image.
	ImagePath string
	// Size is the size of the qcow2 backing image in bytes.
	Size int64
	// LVM are the options for setting up an LVM logical volume.
	LVM *LVMOptions
}

MountOptions are the options for mounting a virtual disk device.

Jump to

Keyboard shortcuts

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