arrayhds

package
v3.0.0-rc45 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package arrayhds drives a Hitachi array through the HiCommand Device Manager command line interface.

It is a port of the v2 agent driver, and answers to the same commands with the same options, because the collector drives an array by running them. The collector calls this driver for its hds, hm700 and r700 models alike: they are one array type, named three ways.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDriver

func NewDriver() array.Driver

NewDriver returns a Hitachi array driver.

Types

type Array

type Array struct {
	array.Array
}

Array is one Hitachi array, as the node or cluster configuration declares it.

func New

func New() *Array

New returns a Hitachi array.

func (*Array) Actions

func (t *Array) Actions() []array.Action

Actions returns what this array answers to.

func (*Array) AddDisk

func (t *Array) AddDisk(ctx context.Context, opt OptAddDisk) (any, error)

AddDisk creates a volume in a pool, names it, and exports it.

func (*Array) AddMap

func (t *Array) AddMap(ctx context.Context, opt OptAddMap) (any, error)

AddMap exports a volume to the domains the named initiators reach it through.

func (*Array) DelDisk

func (t *Array) DelDisk(ctx context.Context, devNum string) (any, error)

DelDisk unexports a volume and deletes it.

func (*Array) DelMap

func (t *Array) DelMap(ctx context.Context, devNum string, mappings []string) (any, error)

DelMap unexports a volume.

Naming the mappings unexports those. Naming none unexports every path to the volume, which is what deleting it does on the way.

func (*Array) ListLogicalUnits

func (t *Array) ListLogicalUnits(ctx context.Context, devNum string) (any, error)

ListLogicalUnits returns the volumes of the array.

func (*Array) RenameDisk

func (t *Array) RenameDisk(ctx context.Context, devNum, name string) (any, error)

RenameDisk gives a volume a label.

func (*Array) Reports

func (t *Array) Reports() []array.Report

Reports returns the sections of its configuration this array pushes to the collector.

The section names are the ones v2 pushes for an hds array, because the collector reads them to know what it was handed.

func (*Array) ResizeDisk

func (t *Array) ResizeDisk(ctx context.Context, devNum, size string) (any, error)

ResizeDisk grows a volume. A size beginning with a plus is added to the size the volume has.

func (*Array) Run

func (t *Array) Run(args []string) error

Run builds the command tree of this array and runs the arguments through it. What the tree holds is declared in Actions.

type OptAddDisk

type OptAddDisk struct {
	Name     string
	Pool     string
	Size     string
	LUN      int
	Mappings []string
}

OptAddDisk is what "add disk" was asked for.

type OptAddMap

type OptAddMap struct {
	DevNum   string
	Mappings []string
	LUN      int
}

OptAddMap is what "add map" was asked for.

Jump to

Keyboard shortcuts

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