partition

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2021 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// BytesRequiredForGPTPartitionEntries is the total bytes required to store the GPT partition
	// entries. 128 bytes are required per partition, total no of partition supported by GPT = 128
	// Therefore, total bytes = 128*128
	BytesRequiredForGPTPartitionEntries = 16384

	// GPTPartitionStartByte is the byte on the disk at which the first partition starts.
	// Normally partition starts at 1MiB, (as done by fdisk utility). This is done to
	// align the partition start to physical block sizes on the disk.
	GPTPartitionStartByte = 1048576

	// NoOfLogicalBlocksForGPTHeader is the no. of logical blocks for the GPT header.
	NoOfLogicalBlocksForGPTHeader = 1

	// OpenEBSNDMPartitionName is the name meta info for openEBS created partitions.
	OpenEBSNDMPartitionName = "OpenEBS_NDM"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Disk

type Disk struct {
	// DevPath is the /dev/sdX entry of the disk
	DevPath string
	// DiskSize is size of disk in bytes
	DiskSize uint64
	// LogicalBlockSize is the block size of the disk normally 512 or 4k
	LogicalBlockSize uint64
	// contains filtered or unexported fields
}

Disk struct represents a disk which needs to be partitioned

func (*Disk) CreateSinglePartition

func (d *Disk) CreateSinglePartition() error

CreateSinglePartition creates a single GPT partition on the disk that spans the entire disk

Jump to

Keyboard shortcuts

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