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) CheckHealth(ctx context.Context) (bool, error)
- func (l *Lvm) CheckReady(ctx context.Context) (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
- func (l *Lvm) PostActivate(ctx context.Context, complete bool) (bool, error)
- func (l *Lvm) PostDeactivate(ctx context.Context, complete bool) (bool, error)
- func (l *Lvm) PreActivate(ctx context.Context, complete bool) (bool, error)
- func (l *Lvm) PreDeactivate(ctx context.Context, complete bool) (bool, error)
- func (l *Lvm) Repair(ctx context.Context) (err error)
- func (l *Lvm) RunCommands(ctx context.Context, complete bool, commands []string, phase string, ...) (bool, error)
- type LvmCommandArgs
- type LvmLvCommandArgs
- type LvmPvCommandArgs
- type LvmUserCommandArgs
- 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) CheckHealth(ctx context.Context) (bool, error)
- func (m *MockBlockDevice) CheckReady(ctx context.Context) (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
- func (m *MockBlockDevice) PostActivate(ctx context.Context, complete bool) (bool, error)
- func (m *MockBlockDevice) PostDeactivate(ctx context.Context, complete bool) (bool, error)
- func (m *MockBlockDevice) PreActivate(ctx context.Context, complete bool) (bool, error)
- func (m *MockBlockDevice) PreDeactivate(ctx context.Context, complete bool) (bool, error)
- func (m *MockBlockDevice) Repair(ctx context.Context) error
- 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) CheckHealth(ctx context.Context) (bool, error)
- func (z *Zpool) CheckReady(ctx context.Context) (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
- func (z *Zpool) PostActivate(ctx context.Context, complete bool) (bool, error)
- func (z *Zpool) PostDeactivate(ctx context.Context, complete bool) (bool, error)
- func (z *Zpool) PreActivate(ctx context.Context, complete bool) (bool, error)
- func (z *Zpool) PreDeactivate(ctx context.Context, complete bool) (bool, error)
- func (z *Zpool) Repair(ctx context.Context) error
- func (z *Zpool) RunCommands(ctx context.Context, complete bool, commands []string, phase string, ...) (bool, error)
- 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)
// Check if the block device is healthy
CheckHealth(ctx context.Context) (bool, error)
// CheckReady checks whether the block device is ready to be used
CheckReady(ctx context.Context) (bool, error)
// Check if the block device has already been formatted for a file system
CheckFormatted() (bool, error)
// Repair the device if possible
Repair(ctx context.Context) error
// Get device /dev path
GetDevice() string
// PreActivate runs any command against the OS before the block device is activated
PreActivate(ctx context.Context, complete bool) (bool, error)
// PostActivate runs any command against the OS after the block device is activated
PostActivate(ctx context.Context, complete bool) (bool, error)
// PreDeactivate runs any command against the OS before the block device is deactivated
PreDeactivate(ctx context.Context, complete bool) (bool, error)
// PostDeactivate runs any command against the OS after the block device is deactivated
PostDeactivate(ctx context.Context, complete bool) (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) CheckHealth ¶ added in v0.1.26
func (*Lvm) CheckReady ¶ added in v0.1.26
func (*Lvm) Deactivate ¶
Deactivate the LVM
func (*Lvm) PostActivate ¶ added in v0.1.29
func (*Lvm) PostDeactivate ¶ added in v0.1.29
func (*Lvm) PreActivate ¶ added in v0.1.29
func (*Lvm) PreDeactivate ¶ added in v0.1.29
type LvmCommandArgs ¶
type LvmCommandArgs struct {
PvArgs LvmPvCommandArgs
VgArgs LvmVgCommandArgs
LvArgs LvmLvCommandArgs
UserArgs LvmUserCommandArgs
Vars map[string]string
}
type LvmLvCommandArgs ¶
type LvmPvCommandArgs ¶
type LvmUserCommandArgs ¶ added in v0.1.29
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) CheckHealth ¶ added in v0.1.26
func (m *MockBlockDevice) CheckHealth(ctx context.Context) (bool, error)
func (*MockBlockDevice) CheckReady ¶ added in v0.1.26
func (m *MockBlockDevice) CheckReady(ctx context.Context) (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
func (*MockBlockDevice) PostActivate ¶ added in v0.1.29
func (*MockBlockDevice) PostDeactivate ¶ added in v0.1.29
func (*MockBlockDevice) PreActivate ¶ added in v0.1.29
func (*MockBlockDevice) PreDeactivate ¶ added in v0.1.29
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 ¶
func (*Zpool) CheckHealth ¶ added in v0.1.26
func (*Zpool) CheckReady ¶ added in v0.1.26
func (*Zpool) PostActivate ¶ added in v0.1.29
func (*Zpool) PostDeactivate ¶ added in v0.1.29
func (*Zpool) PreActivate ¶ added in v0.1.29
func (*Zpool) PreDeactivate ¶ added in v0.1.29
Click to show internal directories.
Click to hide internal directories.