Documentation
¶
Index ¶
- Constants
- type Module
- func (s *Module) BrokenDevices() []pkg.BrokenDevice
- func (s *Module) BrokenPools() []pkg.BrokenPool
- func (s *Module) Cache() (pkg.Volume, error)
- func (m *Module) DeviceAllocate(min gridtypes.Unit) (pkg.Device, error)
- func (m *Module) DeviceLookup(name string) (pkg.Device, error)
- func (m *Module) Devices() ([]pkg.Device, error)
- func (s *Module) DiskCreate(name string, size gridtypes.Unit) (disk pkg.VDisk, err error)
- func (s *Module) DiskDelete(name string) error
- func (s *Module) DiskExists(id string) bool
- func (s *Module) DiskFormat(name string) error
- func (s *Module) DiskList() ([]pkg.VDisk, error)
- func (s *Module) DiskLookup(id string) (disk pkg.VDisk, err error)
- func (s *Module) DiskResize(name string, size gridtypes.Unit) (disk pkg.VDisk, err error)
- func (s *Module) DiskWrite(name string, image string) error
- func (s *Module) Monitor(ctx context.Context) <-chan pkg.PoolsStats
- func (s *Module) Total(kind pkg.DeviceType) (uint64, error)
- func (s *Module) VolumeCreate(name string, size gridtypes.Unit) (pkg.Volume, error)
- func (s *Module) VolumeDelete(name string) error
- func (s *Module) VolumeList() ([]pkg.Volume, error)
- func (s *Module) VolumeLookup(name string) (pkg.Volume, error)
- func (s *Module) VolumeUpdate(name string, size gridtypes.Unit) error
Constants ¶
const ( // SSDOverProvisionFactor over provision factor for SSDs SSDOverProvisionFactor = 2 // CacheTarget is the path where the cache disk is mounted CacheTarget = "/var/cache" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Module ¶ added in v0.4.9
type Module struct {
// contains filtered or unexported fields
}
Module implements functionality for pkg.StorageModule
func (*Module) BrokenDevices ¶ added in v0.4.9
func (s *Module) BrokenDevices() []pkg.BrokenDevice
BrokenDevices lists the broken devices that have been detected
func (*Module) BrokenPools ¶ added in v0.4.9
func (s *Module) BrokenPools() []pkg.BrokenPool
BrokenPools lists the broken storage pools that have been detected
func (*Module) Cache ¶ added in v0.5.5
Cache return the special filesystem used by 0-OS to store internal state and flist cache
func (*Module) DeviceAllocate ¶ added in v0.5.5
DeviceAllocate allocates a new free device, allocation is done by creation a zdb subvolume
func (*Module) DeviceLookup ¶ added in v0.5.5
DeviceLookup looks up device by name
func (*Module) DiskCreate ¶ added in v0.5.5
DiskCreate with given size, return path to virtual disk (size in MB)
func (*Module) DiskDelete ¶ added in v0.5.5
DiskDelete removes a virtual disk
func (*Module) DiskExists ¶ added in v0.5.5
DiskExists checks if a disk exists
func (*Module) DiskFormat ¶ added in v0.5.5
DiskFormat ensures that the virtual disk has a valid filesystem currently the fs is btrfs
func (*Module) DiskLookup ¶ added in v0.5.5
DiskLookup return info about the disk
func (*Module) DiskResize ¶ added in v0.5.5
DiskCreate with given size, return path to virtual disk (size in MB)
func (*Module) Monitor ¶ added in v0.4.9
func (s *Module) Monitor(ctx context.Context) <-chan pkg.PoolsStats
Monitor implements monitor method
func (*Module) Total ¶ added in v0.4.9
func (s *Module) Total(kind pkg.DeviceType) (uint64, error)
Total gives the total amount of storage available for a device type
func (*Module) VolumeCreate ¶ added in v0.5.5
VolumeCreate with the given size in a storage pool.
func (*Module) VolumeDelete ¶ added in v0.5.5
VolumeDelete with the given name, this will unmount and then delete the filesystem. After this call, the caller must not perform any more actions on this filesystem
func (*Module) VolumeList ¶ added in v0.5.5
VolumeList return all the filesystem managed by storeaged present on the nodes
func (*Module) VolumeLookup ¶ added in v0.5.5
VolumeLookup return the path of the mountpoint of the named filesystem if no volume with name exists, an empty path and an error is returned