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) CreatePartitionTable ¶ added in v1.8.0
CreatePartitionTable create a GPT header on the disk
func (*Disk) CreateSinglePartition ¶
CreateSinglePartition creates a single GPT partition on the disk that spans the entire disk
Click to show internal directories.
Click to hide internal directories.