embiggen

package module
v0.0.0-...-4e0113f Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2021 License: Apache-2.0 Imports: 18 Imported by: 1

README

embiggen-disk

The embiggen-disk tool live-resizes a filesystem after first live-resizing any necessary layers below it: an optional LVM LV and PV, and an MBR or GPT partition table.

Example

# embiggen-disk /
Changes made:
  * partition /dev/sda3: before: 8442546176 sectors, after: 8444643328 sectors
  * LVM PV /dev/sda3: before: sectors=8442544128, after: sectors=8444641280
  * LVM LV /dev/mapper/debvg-root: before: sectors=8442544128, after: sectors=8444641280
  * ext4 filesystem at /: before: 1038833256 blocks, after: 1039091312 blocks

Then again:

# embiggen-disk /
No changes made.

Installing

$ go get github.com/google/embiggen-disk

Requirements

It's only been tested on 64-bit x86 Linux ("amd64"). It should work on other Linux architectures.

Disclaimer

This is not an officially supported Google product.

Audit the code and/or snapshot your disk before use if you're worried about losing data.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Dry     bool
	Verbose bool
)

Functions

func Embiggen

func Embiggen(mnt string) error

func Resize

func Resize(e Resizer) (changes []string, err error)

Resize resizes e's dependencies and then resizes e.

Types

type Resizer

type Resizer interface {
	String() string                       // "ext4 filesystem at /", "LVM PV foo"
	State() (string, error)               // "534 blocks"
	Resize() error                        // both may be non-zero
	DepResizer() (dep Resizer, err error) // can return (nil, nil) for none
}

An Resizer is anything that can enlarge something and describe its state. An Resizer can depend on another Resizer to run first.

Directories

Path Synopsis
The embiggen-disk command live resizes a filesystem and LVM objects and partition tables as needed.
The embiggen-disk command live resizes a filesystem and LVM objects and partition tables as needed.

Jump to

Keyboard shortcuts

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