Documentation
¶
Index ¶
- func ZpoolImportAll(log logr.Logger) (bool, error)
- type BlockDevice
- type Lvm
- func (l *Lvm) Activate(ctx context.Context) (bool, error)
- func (l *Lvm) CheckExists(ctx context.Context) (bool, error)
- func (l *Lvm) CheckFormatted() (bool, error)
- func (l *Lvm) Create(ctx context.Context, complete bool) (bool, error)
- func (l *Lvm) Deactivate(ctx context.Context, full bool) (bool, error)
- func (l *Lvm) Destroy(ctx context.Context) (bool, error)
- func (l *Lvm) GetDevice() string
- type LvmCommandArgs
- type LvmLvCommandArgs
- type LvmPvCommandArgs
- type LvmVgCommandArgs
- type MockBlockDevice
- func (m *MockBlockDevice) Activate(ctx context.Context) (bool, error)
- func (m *MockBlockDevice) CheckExists(ctx context.Context) (bool, error)
- func (m *MockBlockDevice) CheckFormatted() (bool, error)
- func (m *MockBlockDevice) Create(ctx context.Context, complete bool) (bool, error)
- func (m *MockBlockDevice) Deactivate(ctx context.Context, full bool) (bool, error)
- func (m *MockBlockDevice) Destroy(ctx context.Context) (bool, error)
- func (m *MockBlockDevice) GetDevice() string
- type Zpool
- func (z *Zpool) Activate(ctx context.Context) (bool, error)
- func (z *Zpool) CheckExists(ctx context.Context) (bool, error)
- func (z *Zpool) CheckFormatted() (bool, error)
- func (z *Zpool) Create(ctx context.Context, complete bool) (bool, error)
- func (z *Zpool) Deactivate(ctx context.Context, full bool) (bool, error)
- func (z *Zpool) Destroy(ctx context.Context) (bool, error)
- func (z *Zpool) GetDevice() string
- type ZpoolCommandArgs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BlockDevice ¶
type BlockDevice interface {
// Create the block device (e.g., LVM pvcreate, vgcreate, and lvcreate)
Create(ctx context.Context, complete bool) (bool, error)
// Destroy the block device (e.g., LVM pvremove, vgremove, and lvremove)
Destroy(ctx context.Context) (bool, error)
// Activate the block device (e.g., LVM lockstart and lvchange --activate y)
Activate(ctx context.Context) (bool, error)
// Deactivate the block device (e.g., LVM lockstop and lvchange --activate n)
Deactivate(ctx context.Context, full bool) (bool, error)
// Check if the block device exists
CheckExists(ctx context.Context) (bool, error)
// Get device /dev path
GetDevice() string
// Check if the block device has already been formatted for a file system
CheckFormatted() (bool, error)
}
type Lvm ¶
type Lvm struct {
Log logr.Logger
CommandArgs LvmCommandArgs
PhysicalVolumes []*lvm.PhysicalVolume
VolumeGroup *lvm.VolumeGroup
LogicalVolume *lvm.LogicalVolume
}
func (*Lvm) CheckExists ¶ added in v0.1.16
func (*Lvm) CheckFormatted ¶
CheckFormatted checks the LVM to determine if a filesystem has been created there.
func (*Lvm) Deactivate ¶
Deactivate the LVM
type LvmCommandArgs ¶
type LvmCommandArgs struct {
PvArgs LvmPvCommandArgs
VgArgs LvmVgCommandArgs
LvArgs LvmLvCommandArgs
}
type LvmLvCommandArgs ¶
type LvmPvCommandArgs ¶
type LvmVgCommandArgs ¶
type MockBlockDevice ¶
func (*MockBlockDevice) Activate ¶
func (m *MockBlockDevice) Activate(ctx context.Context) (bool, error)
func (*MockBlockDevice) CheckExists ¶ added in v0.1.16
func (m *MockBlockDevice) CheckExists(ctx context.Context) (bool, error)
func (*MockBlockDevice) CheckFormatted ¶
func (m *MockBlockDevice) CheckFormatted() (bool, error)
func (*MockBlockDevice) Deactivate ¶
func (*MockBlockDevice) Destroy ¶
func (m *MockBlockDevice) Destroy(ctx context.Context) (bool, error)
func (*MockBlockDevice) GetDevice ¶
func (m *MockBlockDevice) GetDevice() string
type Zpool ¶
type Zpool struct {
Log logr.Logger
CommandArgs ZpoolCommandArgs
Devices []string
Name string
DataSet string
}
func (*Zpool) CheckExists ¶ added in v0.1.16
func (*Zpool) CheckFormatted ¶
type ZpoolCommandArgs ¶
Click to show internal directories.
Click to hide internal directories.