Documentation
¶
Index ¶
- Constants
- func PolicyHDDOnly(s *Module) []filesystem.Pool
- func PolicySSDFirst(s *Module) []filesystem.Pool
- func PolicySSDOnly(s *Module) []filesystem.Pool
- 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) Metrics() ([]pkg.PoolMetrics, 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) VolumeExists(name string) (bool, 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
- type Policy
- type TypeCache
Constants ¶
const ( // SSDOverProvisionFactor over provision factor for SSDs SSDOverProvisionFactor = 1 // CacheTarget is the path where the cache disk is mounted CacheTarget = "/var/cache" )
Variables ¶
This section is empty.
Functions ¶
func PolicyHDDOnly ¶
func PolicyHDDOnly(s *Module) []filesystem.Pool
func PolicySSDFirst ¶
func PolicySSDFirst(s *Module) []filesystem.Pool
func PolicySSDOnly ¶
func PolicySSDOnly(s *Module) []filesystem.Pool
Types ¶
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
Module implements functionality for pkg.StorageModule
func (*Module) BrokenDevices ¶
func (s *Module) BrokenDevices() []pkg.BrokenDevice
BrokenDevices lists the broken devices that have been detected
func (*Module) BrokenPools ¶
func (s *Module) BrokenPools() []pkg.BrokenPool
BrokenPools lists the broken storage pools that have been detected
func (*Module) Cache ¶
Cache return the special filesystem used by 0-OS to store internal state and flist cache
func (*Module) DeviceAllocate ¶
DeviceAllocate allocates a new free device, allocation is done by creation a zdb subvolume
func (*Module) DeviceLookup ¶
DeviceLookup looks up device by name
func (*Module) DiskCreate ¶
DiskCreate with given size, return path to virtual disk (size in MB)
func (*Module) DiskDelete ¶
DiskDelete removes a virtual disk
func (*Module) DiskExists ¶
DiskExists checks if a disk exists
func (*Module) DiskFormat ¶
DiskFormat ensures that the virtual disk has a valid filesystem currently the fs is btrfs
func (*Module) DiskLookup ¶
DiskLookup return info about the disk
func (*Module) DiskResize ¶
DiskCreate with given size, return path to virtual disk (size in MB)
func (*Module) DiskWrite ¶
DiskWrite writes image to disk. Disk will not be changed if it already has a filesystem or partition table.
func (*Module) Monitor ¶
func (s *Module) Monitor(ctx context.Context) <-chan pkg.PoolsStats
Monitor implements monitor method
func (*Module) Total ¶
func (s *Module) Total(kind pkg.DeviceType) (uint64, error)
Total gives the total amount of storage available for a device type
func (*Module) VolumeCreate ¶
VolumeCreate with the given size in a storage pool.
func (*Module) VolumeDelete ¶
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) VolumeExists ¶
VolumeExists returns an error if the lookup failed and a bool describing if the volume exists
func (*Module) VolumeList ¶
VolumeList return all the filesystem managed by storeaged present on the nodes
func (*Module) VolumeLookup ¶
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