ios

package
v1.3.25 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2024 License: MIT Imports: 23 Imported by: 6

Documentation

Overview

Package ios is a collection of interfaces to the local storage subsystem; the package includes OS-dependent implementations for those interfaces.

  • Copyright (c) 2018-2024, NVIDIA CORPORATION. All rights reserved.

Package ios is a collection of interfaces to the local storage subsystem; the package includes OS-dependent implementations for those interfaces.

  • Copyright (c) 2018-2023, NVIDIA CORPORATION. All rights reserved.

Package ios is a collection of interfaces to the local storage subsystem; the package includes OS-dependent implementations for those interfaces.

  • Copyright (c) 2018-2024, NVIDIA CORPORATION. All rights reserved.

Package ios is a collection of interfaces to the local storage subsystem; the package includes OS-dependent implementations for those interfaces.

  • Copyright (c) 2018-2024, NVIDIA CORPORATION. All rights reserved.

Package ios is a collection of interfaces to the local storage subsystem; the package includes OS-dependent implementations for those interfaces.

  • Copyright (c) 2018-2024, NVIDIA CORPORATION. All rights reserved.

Package ios is a collection of interfaces to the local storage subsystem; the package includes OS-dependent implementations for those interfaces.

  • Copyright (c) 2018-2024, NVIDIA CORPORATION. All rights reserved.

Package ios is a collection of interfaces to the local storage subsystem; the package includes OS-dependent implementations for those interfaces.

  • Copyright (c) 2024, NVIDIA CORPORATION. All rights reserved.

Package ios is a collection of interfaces to the local storage subsystem; the package includes OS-dependent implementations for those interfaces.

  • Copyright (c) 2018-2024, NVIDIA CORPORATION. All rights reserved.

Index

Constants

View Source
const TestLabel = Label("test-label")

Variables

This section is empty.

Functions

func DirSizeOnDisk

func DirSizeOnDisk(dirPath string, withNonDirPrefix bool) (size uint64, err error)

DirSizeOnDisk calculates the total size of a directory on disk, including its subdirectories. TODO: We should also calculate and include `xattr` size.

func GetATime

func GetATime(osfi os.FileInfo) time.Time

func GetFSStats

func GetFSStats(path string) (blocks, bavail uint64, bsize int64, err error)

func GetFSUsedPercentage

func GetFSUsedPercentage(path string) (usedPercentage int64, ok bool)

func New

func New(num int) (IOS, BlockDevices)

Types

type AllDiskStats

type AllDiskStats map[string]DiskStats

type BlockDevices added in v1.3.24

type BlockDevices []*blockDev

type DiskStats

type DiskStats struct {
	RBps, Ravg, WBps, Wavg, Util int64
}

type FsDisks

type FsDisks map[string]int64 // disk name => sector size

public

func (FsDisks) ToSlice added in v1.3.24

func (fsdisks FsDisks) ToSlice() (disks []string)

type IOS added in v1.3.16

type IOS interface {
	GetAllMpathUtils() *MpathUtil
	GetMpathUtil(mpath string) int64
	AddMpath(mpath, fs string, label Label, config *cmn.Config, blockDevs BlockDevices) (FsDisks, error)
	RescanDisks(mpath, fs string, disks []string) RescanDisksResult
	RemoveMpath(mpath string, testingEnv bool)
	DiskStats(m AllDiskStats)
}

public

type Label added in v1.3.23

type Label string

Introduced in v3.23, mountpath labels are used to deliver extended (mountpath usage related) functionality that includes:

  • mapping of the mountpath to its underlying disk(s), if any (potentially useful in highly virtualized/containerized environments);
  • disk sharing between multiple mountpaths;
  • storage classes (as in: "different storages - for different buckets");
  • user-defined grouping of the mountpaths (e.g., to reflect different non-overlapping storage capacities and/or storage classes)

In v3.23, user-assigned `ios.Label` simply implies that user takes a full responsibility for filesystem sharing (or not sharing) across mountpaths

func (Label) IsNil added in v1.3.23

func (label Label) IsNil() bool

func (Label) ToLog added in v1.3.23

func (label Label) ToLog() string

type MpathUtil

type MpathUtil sync.Map

public

func (*MpathUtil) Get

func (x *MpathUtil) Get(mpath string) int64

func (*MpathUtil) Set

func (x *MpathUtil) Set(mpath string, util int64)

type RescanDisksResult added in v1.3.24

type RescanDisksResult struct {
	FsDisks  FsDisks
	Fatal    error
	Lost     []error
	Attached []error
}

public

Jump to

Keyboard shortcuts

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