arrayhds

package
v3.0.0-rc47 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: Apache-2.0 Imports: 18 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
	// contains filtered or unexported fields
}

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.

What is returned is what v2 returned, which a collector form stores: the disk id, the display name as the disk devid, the volume as the manager lists it, the paths to it, and the log of the commands run.

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.

Every initiator and target pair must resolve to a port and to a domain of that port knowing the initiator: a pair that does not is a path the host would be missing, and is an error rather than skipped.

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, or the one of a device number.

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, opt OptResizeDisk) (any, error)

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

The volume is read first in every case: its capacity is what a size to add to is added to, and what a new size is checked against, as a size below it drops the end of the volume and is done only when truncating is allowed.

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.

type OptResizeDisk

type OptResizeDisk struct {
	DevNum   string
	Size     string
	Truncate bool
}

OptResizeDisk is what "resize disk" was asked for.

Jump to

Keyboard shortcuts

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