Documentation ¶
Overview ¶
Package config for OSD config managed by the operator
Package config for OSD config managed by the operator ¶
Copyright 2016 The Rook Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- func GetConfigStoreName(nodeName string) string
- func LoadOSDDirMap(kv *k8sutil.ConfigMapKVStore, nodeName string) (map[string]int, error)
- func MetadataDevice(config map[string]string) string
- func PopulateCollocatedPerfSchemeEntry(entry *PerfSchemeEntry, device string, storeConfig StoreConfig) error
- func PopulateDistributedPerfSchemeEntry(entry *PerfSchemeEntry, device string, metadataInfo *MetadataDeviceInfo, ...) error
- func RemoveFromScheme(e *PerfSchemeEntry, kv *k8sutil.ConfigMapKVStore, storeName string) error
- func SaveOSDDirMap(kv *k8sutil.ConfigMapKVStore, nodeName string, dirMap map[string]int) error
- type MetadataDeviceInfo
- type MetadataDevicePartition
- type PartitionType
- type PerfScheme
- type PerfSchemeEntry
- type PerfSchemePartitionDetails
- type StoreConfig
Constants ¶
const ( StoreTypeKey = "storeType" WalSizeMBKey = "walSizeMB" DatabaseSizeMBKey = "databaseSizeMB" JournalSizeMBKey = "journalSizeMB" OSDsPerDeviceKey = "osdsPerDevice" EncryptedDeviceKey = "encryptedDevice" MetadataDeviceKey = "metadataDevice" DeviceClassKey = "deviceClass" )
const ( Filestore = "filestore" Bluestore = "bluestore" UseRemainingSpace = -1 WalDefaultSizeMB = 576 DBDefaultSizeMB = 20480 JournalDefaultSizeMB = 5120 BluestoreDirBlockName = "bluestore-block" BluestoreDirWalName = "bluestore-wal" BluestoreDirDBName = "bluestore-db" )
const (
OSDFSStoreNameFmt = "rook-ceph-osd-%d-fs-backup"
)
Variables ¶
This section is empty.
Functions ¶
func GetConfigStoreName ¶
func LoadOSDDirMap ¶
func MetadataDevice ¶
func PopulateCollocatedPerfSchemeEntry ¶
func PopulateCollocatedPerfSchemeEntry(entry *PerfSchemeEntry, device string, storeConfig StoreConfig) error
populates a partition scheme entry for an OSD where all its partitions are collocated on a single device
func PopulateDistributedPerfSchemeEntry ¶
func PopulateDistributedPerfSchemeEntry(entry *PerfSchemeEntry, device string, metadataInfo *MetadataDeviceInfo, storeConfig StoreConfig) error
populates a partition scheme entry for an OSD that will have distributed partitions: its metadata will live on a dedicated metadata device and its block data will live on a dedicated device
func RemoveFromScheme ¶
func RemoveFromScheme(e *PerfSchemeEntry, kv *k8sutil.ConfigMapKVStore, storeName string) error
func SaveOSDDirMap ¶
Types ¶
type MetadataDeviceInfo ¶
type MetadataDeviceInfo struct { Device string `json:"device"` DiskUUID string `json:"diskUuid"` Partitions []*MetadataDevicePartition `json:"partitions"` }
represents a dedicated metadata device and all of the partitions stored on it
func NewMetadataDeviceInfo ¶
func NewMetadataDeviceInfo(device string) *MetadataDeviceInfo
func (*MetadataDeviceInfo) GetPartitionArgs ¶
func (m *MetadataDeviceInfo) GetPartitionArgs() []string
type MetadataDevicePartition ¶
type MetadataDevicePartition struct { ID int `json:"id"` OsdUUID uuid.UUID `json:"osdUuid"` Type PartitionType `json:"type"` PartitionUUID string `json:"partitionUuid"` SizeMB int `json:"sizeMB"` OffsetMB int `json:"offsetMB"` }
represents a specific partition on a metadata device, including details about which OSD it belongs to
type PartitionType ¶
type PartitionType int
const ( WalPartitionType PartitionType = iota DatabasePartitionType BlockPartitionType FilestoreDataPartitionType )
type PerfScheme ¶
type PerfScheme struct { Metadata *MetadataDeviceInfo `json:"metadata"` Entries []*PerfSchemeEntry `json:"entries"` }
top level representation of an overall performance oriented partition scheme, with a dedicated metadata device and entries for all OSDs that define where their partitions live
func LoadScheme ¶
func LoadScheme(kv *k8sutil.ConfigMapKVStore, storeName string) (*PerfScheme, error)
Load the persistent partition info from the config directory.
func NewPerfScheme ¶
func NewPerfScheme() *PerfScheme
func (*PerfScheme) DeleteSchemeEntry ¶
func (s *PerfScheme) DeleteSchemeEntry(e *PerfSchemeEntry) error
func (*PerfScheme) SaveScheme ¶
func (s *PerfScheme) SaveScheme(kv *k8sutil.ConfigMapKVStore, storeName string) error
Save the partition scheme to the config dir
func (*PerfScheme) String ¶
func (s *PerfScheme) String() string
func (*PerfScheme) UpdateSchemeEntry ¶
func (s *PerfScheme) UpdateSchemeEntry(e *PerfSchemeEntry) error
type PerfSchemeEntry ¶
type PerfSchemeEntry struct { ID int `json:"id"` OsdUUID uuid.UUID `json:"osdUuid"` Partitions map[PartitionType]*PerfSchemePartitionDetails `json:"partitions"` // mapping of partition name to its details StoreType string `json:"storeType,omitempty"` FSCreated bool `json:"fsCreated"` }
represents an OSD and details about all of its partitions
func NewPerfSchemeEntry ¶
func NewPerfSchemeEntry(storeType string) *PerfSchemeEntry
func (*PerfSchemeEntry) GetDataPartitionType ¶
func (e *PerfSchemeEntry) GetDataPartitionType() PartitionType
func (*PerfSchemeEntry) GetPartitionArgs ¶
func (e *PerfSchemeEntry) GetPartitionArgs() []string
func (*PerfSchemeEntry) IsCollocated ¶
func (e *PerfSchemeEntry) IsCollocated() bool
determines if the given partition scheme entry is for a collocated OSD (all partitions on 1 device)
func (*PerfSchemeEntry) String ¶
func (e *PerfSchemeEntry) String() string
type PerfSchemePartitionDetails ¶
type PerfSchemePartitionDetails struct { Device string `json:"device"` DiskUUID string `json:"diskUuid"` PartitionUUID string `json:"partitionUuid"` SizeMB int `json:"sizeMB"` OffsetMB int `json:"offsetMB"` }
details for 1 OSD partition
type StoreConfig ¶
type StoreConfig struct { StoreType string `json:"storeType,omitempty"` WalSizeMB int `json:"walSizeMB,omitempty"` DatabaseSizeMB int `json:"databaseSizeMB,omitempty"` JournalSizeMB int `json:"journalSizeMB,omitempty"` OSDsPerDevice int `json:"osdsPerDevice,omitempty"` EncryptedDevice bool `json:"encryptedDevice,omitempty"` DeviceClass string `json:"deviceClass,omitempty"` }
func ToStoreConfig ¶
func ToStoreConfig(config map[string]string) StoreConfig