Documentation
¶
Index ¶
- Variables
- func Ceiling(val, unit uint64) uint64
- func Floor(val, unit uint64) uint64
- func GetPartitionKname(diskName string, num uint) string
- func GetPartitionsBlockDevice(dev string) (string, error)
- func GetSysPaths(driverSysPath string) []string
- func GetUdevInfo(kname string) (disko.UdevInfo, error)
- func IsSysPathRAID(syspath string, driverSysPath string) bool
- func NameByDiskID(driverSysPath string, id int) (string, error)
- func System() disko.System
- func VolumeManager() disko.VolumeManager
- type RAIDController
- type RAIDControllerType
Constants ¶
This section is empty.
Variables ¶
var ErrNoPartitionTable = errors.New("no Partition Table Found")
ErrNoPartitionTable is returned if there is no partition table.
Functions ¶
func Ceiling ¶
Ceiling returns the smallest integer equal to or larger than val that is evenly divisible by unit.
func Floor ¶
Floor returns the largest integer equal to or less than val that is evenly divisible by unit.
func GetPartitionKname ¶
GetPartitionKname - get the name of the num partition device on diskName
func GetPartitionsBlockDevice ¶
GetPartitionsBlockDevice - return the block device name ('sda') given input of a partition, either kname (sda1) or /dev/sda1. Can also be called on a disk and will return the disk.
func GetSysPaths ¶ added in v0.0.15
func GetUdevInfo ¶
GetUdevInfo return a UdevInfo for the device with kernel name kname.
func IsSysPathRAID ¶ added in v0.0.15
IsSysPathRAID - is this sys path (udevadm info's DEVPATH) on a scsi controller.
syspath will look something like /devices/pci0000:3a/0000:3a:02.0/0000:3c:00.0/host0/target0:2:2/0:2:2:0/block/sdc
func NameByDiskID ¶ added in v0.0.15
NameByDiskID - return the linux name (sda) for the disk with given DiskID
func VolumeManager ¶
func VolumeManager() disko.VolumeManager
VolumeManager returns the linux implementation of disko.VolumeManager interface.
Types ¶
type RAIDController ¶ added in v0.0.15
type RAIDControllerType ¶ added in v0.0.15
type RAIDControllerType string
const ( MegaRAIDControllerType RAIDControllerType = "megaraid" SmartPqiControllerType RAIDControllerType = "smartpqi" )