Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

storcfg volume -add

&pagelevel(5)&pagelevel

Adds one or more logical volumes to a specified pool of the StorMan repository. The pool must already exist in the repository. The logical volumes must be part of the same storage system as the pool.

The function supports the addition of single logical volumes to a list of logical volumes, or a mass operation adding all logical volumes of a storage system not yet contained in the StorMan repository.

Syntax

storcfg volume –add [ –storid storid,[...] ] –poolid poolid
                    [–system system] [–prefix prefix]
                    [-startnumber startnumber] –deviceid devid,[...] –connectparam ...

Parameters

–storid storid

Default: Parameter not specified.

If the parameter is not specified (or no value is specified), there are two cases:

      • A storID is assigned automatically by StorMan if the logical volume is already attached to a server.

      • No storID is assigned if the logical volume is currently not attached to any server. It is considered as a free volume in the pool.

If the parameter is specified with a storID, the value storid specifies the unique identifier to be assigned to the logical volume for further management by StorMan which is selectable by the caller.

It is possible to specify a list of storIDs separated by comma. The number of storIDs must equal the number of deviceIDs specified.

      • For naming conventions related to storIDs, refer to the common description of ”storid” in chapter "Common supported value ranges".

      • If the storID already exists, the command is rejected.

      • If specified by caller, the storID is assigned regardless of the attachment of the logical volume to a server.

If the value #auto is specified, StorMan automatically generates a storID for all logical volumes regardless of any attachment to a server.

If the value #byrule is specified, StorMan automatically generates a storID for logical volumes (list of deviceids supported as defined by parameters –prefix and –startnumber regardless of any attachment to a server. If –deviceid #all is specified, all deviceIDs not yet assigned to a pool are added. Parameter –prefix must be specified.

–poolid poolid

Specifies the ID of the pool the logical volume should be added to. This parameter is mandatory. If the pool ID does not exist in the repository, the command is rejected. 

–system system

Specifies the name of the storage system.

This parameter is optional. It can be specified to uniquely define the volume in combination with –deviceid devid. If not specified the storage system defined by parameter –poolid is used.

–prefix prefix

This parameter is only supported for  –storid #byrule. 

–prefix defines a common prefix for the automatically generated storIDs of the deviceids specified in the call. The prefix must be conform with the naming conventions for the storID. 

If the parameter -startnumber is not specified the storIDs are automatically generated from the specified prefix and the complete deviceid used as suffix.

e.g. call with:


-prefix ABC_ creates storIDs: ABC_devid1, ABC_devid2,...., ABC_devidn


–startnumber startnumber

This parameter is only supported for  –storid #byrule and –prefix prefix.

If specified the automatically generated storIDs are built by the prefix specified with –prefix and an incremented number as suffix starting with the number specified with –startnumber (with leading zeros) for all deviceids specified in the call.

e.g. call with:


-prefix ABC_ -startnumber 0022 creates storIDs: ABC_0022, ABC_0023,...., ABC_00nm


The specified startnumber is a decimal number greater or equal 0.

If the assigned number exceeds the size of the number of digits specified with–startnumber, including leading zeroes, the number of digits incremented for the numbers exceeding this size.

 

–deviceid devid

Specifies the device ID(s) of the logical volume. This parameter is mandatory. Possible values:

      • The value is interpreted as a string (representing a number without leading zeros; e.g. 234 not 00234) and must be equal to the value shown by StorMan via storcfg volume –show –system system –storid. Otherwise STORMAN_NOT_FOUND is returned.

      • It is possible to specify a list of deviceIDs separated by comma. If storIDs are specified the number of deviceIDs must be equal to the number of storIDs specified.

      • If the value #all is specified, all logical volumes of the storage system not yet contained in the StorMan repository are added. In this case the parameter –storid #auto or –storid #byrule must be specified to automatically assign storIDs to the volumes. It is not possible to specify storIDs directly or by list in this case.

connectparam

Refer to the description of the "Connection parameters"

Return codes

Error Code

Name                                                          

Error Type

0

STORMAN_OK

Function successful

3

STORMAN_VER_NOT_SUPP

Version not supported

7

STORMAN_INV_PARAMETERS

Specified parameters invalid

9

STORMAN_STORID_IN_USE

StorID already used otherwise

13

STORMAN_COMMUNIC_ERROR

Error in StorMan communication between client and server

14

STORMAN_STORAGE_LOCKED

Storage unit to be modified currently locked

16

STORMAN_FAULT

Unexpected error in function

18

STORMAN_NOT_FOUND

Matching object could not be provided

20

STORMAN_ALREADY_EXISTS

Object already exists in the repository

36

STORMAN_AUTH_FAILED

User / password for StorMan not valid