Documentation ¶
Index ¶
- Constants
- func NewVDiskModule(module *Module) (pkg.VDiskModule, error)
- type Module
- func (s *Module) Allocate(nsID string, diskType pkg.DeviceType, size uint64, mode pkg.ZDBMode) (allocation pkg.Allocation, err error)
- func (s *Module) BrokenDevices() []pkg.BrokenDevice
- func (s *Module) BrokenPools() []pkg.BrokenPool
- func (s *Module) CreateFilesystem(name string, size uint64, poolType pkg.DeviceType) (pkg.Filesystem, error)
- func (s *Module) Find(nsID string) (allocation pkg.Allocation, err error)
- func (s *Module) GetCacheFS() (pkg.Filesystem, error)
- func (s *Module) ListFilesystems() ([]pkg.Filesystem, error)
- func (s *Module) Monitor(ctx context.Context) <-chan pkg.PoolsStats
- func (s *Module) Path(name string) (pkg.Filesystem, error)
- func (s *Module) ReleaseFilesystem(name string) error
- func (s *Module) Total(kind pkg.DeviceType) (uint64, error)
- func (s *Module) VDiskFindCandidate(size uint64) (path string, err error)
- func (s *Module) VDiskPools() ([]string, error)
Constants ¶
const (
// CacheTarget is the path where the cache disk is mounted
CacheTarget = "/var/cache"
)
const ZDBPoolPrefix = "zdb"
ZDBPoolPrefix is the prefix used for the subvolume create for 0-DB containers
Variables ¶
This section is empty.
Functions ¶
func NewVDiskModule ¶
func NewVDiskModule(module *Module) (pkg.VDiskModule, error)
NewVDiskModule creates a new disk allocator
Types ¶
type Module ¶ added in v0.4.9
type Module struct {
// contains filtered or unexported fields
}
Module implements functionality for pkg.StorageModule
func (*Module) Allocate ¶ added in v0.4.9
func (s *Module) Allocate(nsID string, diskType pkg.DeviceType, size uint64, mode pkg.ZDBMode) (allocation pkg.Allocation, err error)
Allocate is responsible to make sure the subvolume used by a 0-db as enough storage capacity of specified size, type and mode it returns the volume ID and its path or an error if it couldn't allocate enough storage
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) CreateFilesystem ¶ added in v0.4.9
func (s *Module) CreateFilesystem(name string, size uint64, poolType pkg.DeviceType) (pkg.Filesystem, error)
CreateFilesystem with the given size in a storage pool.
func (*Module) Find ¶ added in v0.4.9
func (s *Module) Find(nsID string) (allocation pkg.Allocation, err error)
Find finds a zdb namespace allocation
func (*Module) GetCacheFS ¶ added in v0.4.9
func (s *Module) GetCacheFS() (pkg.Filesystem, error)
GetCacheFS return the special filesystem used by 0-OS to store internal state and flist cache
func (*Module) ListFilesystems ¶ added in v0.4.9
func (s *Module) ListFilesystems() ([]pkg.Filesystem, error)
ListFilesystems return all the filesystem managed by storeaged present on the nodes
func (*Module) Monitor ¶ added in v0.4.9
func (s *Module) Monitor(ctx context.Context) <-chan pkg.PoolsStats
Monitor implements monitor method
func (*Module) Path ¶ added in v0.4.9
func (s *Module) Path(name string) (pkg.Filesystem, error)
Path return the path of the mountpoint of the named filesystem if no volume with name exists, an empty path and an error is returned
func (*Module) ReleaseFilesystem ¶ added in v0.4.9
ReleaseFilesystem 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) 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) VDiskFindCandidate ¶ added in v0.4.9
VDiskFindCandidate find a suitbale location for creating a vdisk of the given size
func (*Module) VDiskPools ¶ added in v0.4.9
VDiskPools return a list of all vdisk pools