Documentation ¶
Overview ¶
Package lvm provides an interface to work with LVM2.
Index ¶
- Constants
- func CreateVolume(r runners.Runner, vg, lv, name, mountDir string) error
- func RemoveVolume(r runners.Runner, vg, _, name, mountDir string) error
- type LVManager
- func (m *LVManager) CleanupSnapshots(_ int) ([]string, error)
- func (m *LVManager) CreateClone(name, _ string) error
- func (m *LVManager) CreateSnapshot(_, _ string) (string, error)
- func (m *LVManager) DestroyClone(name string) error
- func (m *LVManager) DestroySnapshot(_ string) error
- func (m *LVManager) GetFilesystemState() (models.FileSystem, error)
- func (m *LVManager) GetSessionState(_ string) (*resources.SessionState, error)
- func (m *LVManager) GetSnapshots() ([]resources.Snapshot, error)
- func (m *LVManager) ListClonesNames() ([]string, error)
- func (m *LVManager) Pool() *resources.Pool
- type ListEntry
- type LvsOutput
- type ReportEntry
Constants ¶
const (
// PoolMode defines the lvm filesystem name.
PoolMode = "lvm"
)
Variables ¶
This section is empty.
Functions ¶
func CreateVolume ¶
CreateVolume creates LVM volume.
Types ¶
type LVManager ¶
type LVManager struct {
// contains filtered or unexported fields
}
LVManager describes an LVM2 filesystem manager.
func NewFSManager ¶
NewFSManager creates a new Manager instance for LVM.
func (*LVManager) CleanupSnapshots ¶
CleanupSnapshots is not supported in LVM mode.
func (*LVManager) CreateClone ¶
CreateClone creates a new volume.
func (*LVManager) CreateSnapshot ¶
CreateSnapshot is not supported in LVM mode.
func (*LVManager) DestroyClone ¶
DestroyClone destroys volumes.
func (*LVManager) DestroySnapshot ¶
DestroySnapshot is not supported in LVM mode.
func (*LVManager) GetFilesystemState ¶
func (m *LVManager) GetFilesystemState() (models.FileSystem, error)
GetFilesystemState is not implemented.
func (*LVManager) GetSessionState ¶
func (m *LVManager) GetSessionState(_ string) (*resources.SessionState, error)
GetSessionState is not implemented.
func (*LVManager) GetSnapshots ¶
GetSnapshots is not implemented.
func (*LVManager) ListClonesNames ¶
ListClonesNames returns a list of clone names.
type ListEntry ¶
type ListEntry struct { Name string `json:"lv_name"` GroupName string `json:"vg_name"` Attr string `json:"lv_attr"` Size string `json:"lv_size"` Pool string `json:"pool_lv"` Origin string `json:"origin"` DataPercent string `json:"data_percent"` // TODO(anatoly): Float64. }
ListEntry defines logical volume entry in "lvs" command response.
type LvsOutput ¶
type LvsOutput struct {
Reports []ReportEntry `json:"report"`
}
LvsOutput defines "lvs" command response.
type ReportEntry ¶
type ReportEntry struct {
Volumes []ListEntry `json:"lv"`
}
ReportEntry defines report in "lvs" command response.