partition

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2016 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

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.

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

View Source
const (
	WalPartitionName      = "wal"
	DatabasePartitionName = "db"
	BlockPartitionName    = "block"

	UseRemainingSpace = -1
	SimpleVersion     = 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Scheme

type Scheme struct {
	Version        int               `json:"version"`
	SizeMB         int               `json:"sizeMb"`
	DiskUUID       string            `json:"diskUuid"`
	PartitionUUIDs map[string]string `json:"partitionUuids"`
}

func GetSimpleScheme

func GetSimpleScheme(sizeMB int) (*Scheme, error)

This is a simple scheme to create the wal and db each of size 10% of the disk, with the remainder of the disk being allocated for the raw data.

func LoadScheme

func LoadScheme(configDir string) (*Scheme, error)

Load the persistent partition info from the config directory.

func (*Scheme) GetArgs

func (s *Scheme) GetArgs(name string) []string

Turn the scheme into arguments for sgdisk. The result will be three partitions:

  1. WAL: Write ahead log (10%)
  2. DB: The bluestore database (10%)
  3. Block: The raw storage for the data being written to the OSD. (80%) Uses the remainder of the storage space after small partitions for the wal and db.

func (*Scheme) Save

func (s *Scheme) Save(configDir string) error

Save the partition scheme to the config dir

Jump to

Keyboard shortcuts

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