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) Repair(ctx context.Context) (err error)
- 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) 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) 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) Repair(ctx context.Context) 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
}
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
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) 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
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
Click to show internal directories.
Click to hide internal directories.