Documentation
¶
Index ¶
Constants ¶
const ( RuntimeLvmdConfigFile = "/var/lib/microshift/lvms/lvmd.yaml" LvmdConfigFileName = "lvmd.yaml" )
const ( TypeThin = DeviceType("thin") TypeThick = DeviceType("thick") )
Variables ¶
This section is empty.
Functions ¶
func LvmPresentOnMachine ¶
func LvmPresentOnMachine() error
func SaveLvmdConfigToFile ¶
Types ¶
type DeviceClass ¶
type DeviceClass struct {
// Name for the device-class name
Name string `json:"name"`
// Volume group name for the device-class
VolumeGroup string `json:"volume-group"`
// Default is a flag to indicate whether the device-class is the default
Default bool `json:"default"`
// SpareGB is storage capacity in GiB to be spared
SpareGB *uint64 `json:"spare-gb"`
// Stripe is the number of stripes in the logical volume
Stripe *uint `json:"stripe"`
// StripeSize is the amount of data that is written to one device before moving to the next device
StripeSize string `json:"stripe-size"`
// LVCreateOptions are extra arguments to pass to lvcreate
LVCreateOptions []string `json:"lvcreate-options"`
// Type is the name of logical volume target, supports 'thick' (default) or 'thin' currently
Type DeviceType `json:"type"`
// ThinPoolConfig holds the configuration for thinpool in this volume group corresponding to the device-class
ThinPoolConfig *ThinPoolConfig `json:"thin-pool"`
}
DeviceClass maps between device-classes and target for logical volume creation current targets are VolumeGroup for thick-lv and ThinPool for thin-lv
type DeviceType ¶
type DeviceType string
type Lvmd ¶
type Lvmd struct {
DeviceClasses []*DeviceClass `json:"device-classes"`
SocketName string `json:"socket-name"`
Message string `json:"-"`
}
Lvmd stores the read-in or defaulted values of the lvmd configuration and provides the topolvm-node process information about its host's storage environment.
func DefaultLvmdConfig ¶
DefaultLvmdConfig returns a configuration struct for Lvmd with default settings based on the current host. If a single volume group is found, that value is used. If multiple volume groups are available and one is named "rhel", that group is used. Otherwise, the configuration returned will report that it is not enabled (see IsEnabled()).
func NewLvmdConfigFromFile ¶
type ThinPoolConfig ¶
type ThinPoolConfig struct {
// Name of thinpool
Name string `json:"name"`
// OverprovisionRatio signifies the upper bound multiplier for allowing logical volume creation in this pool
OverprovisionRatio float64 `json:"overprovision-ratio"`
}
ThinPoolConfig holds the configuration of thin pool in a volume group