blockinfo

package
v0.0.0-...-be347a3 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DiskStates

type DiskStates struct {
	Active int
	Total  int
	Failed int
	Spare  int
	States common.MapStr
}

DiskStates summarizes the state of all the devices in the array

type MDDevice

type MDDevice struct {
	Name       string     //the name of the device
	Level      string     //The RAID level of the device
	Size       int64      //Size, as count of 512 byte blocks
	ArrayState string     //State of the Array
	DiskStates DiskStates //Disks in the Array
	SyncAction string     //The current sync action, if any
	SyncStatus SyncStatus //the current sync status, if any
}

MDDevice represents /sys/block/[device] for an md device

func ListAll

func ListAll(path string) ([]MDDevice, error)

ListAll lists all the multi-disk devices in a RAID array

type SyncStatus

type SyncStatus struct {
	Complete int64
	Total    int64
}

SyncStatus represents the status of a sync action as Complete/Total. Will be 0/0 if no sync action is going on

Jump to

Keyboard shortcuts

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