Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/HewlettPackard/POSH-HPEOneView/llms.txt

Use this file to discover all available pages before exploring further.

Synopsis

Retrieves storage volumes managed by HPE OneView.

Syntax

Default

Get-OVStorageVolume
    [-Name <String>]
    [-StorageVolumeTemplate <Object>]
    [-Available]
    [-Label <String>]
    [-Scope <Object>]
    [-ApplianceConnection <Object>]
    [<CommonParameters>]

From server profile or template

Get-OVStorageVolume
    -InputObject <Object>
    [-ApplianceConnection <Object>]
    [<CommonParameters>]

Description

Get-OVStorageVolume returns volume objects from HPE OneView’s storage inventory. Volumes may be privately assigned to a server profile, shared across multiple profiles, or available (unattached). Pass a server profile or server profile template object via -InputObject to return only the volumes attached to that resource. Use -Available to list volumes that are not currently attached to any server profile. Returned objects carry the HPEOneView.Storage.Volume type and can be piped to Get-OVProfileAttachVolume, Set-OVStorageVolume, or Remove-OVStorageVolume.

Parameters

Name
String
Name of the storage volume. Supports wildcard matching. Aliased as VolumeName.
InputObject
Object
A server profile or server profile template object. When provided, returns only the volumes attached to that resource. Accepts pipeline input. Aliased as ServerProfile and ServerProfileTemplate.
StorageVolumeTemplate
Object
Filters volumes to those created from the specified volume template. Accepts a template name or an HPEOneView.Storage.VolumeTemplate object. Aliased as SVT.
Available
SwitchParameter
Returns only volumes that are not currently attached to any server profile (available for assignment).
Label
String
Filter results to resources that have this label assigned.
Scope
Object
Filter by HPE OneView scope. Defaults to AllResourcesInScope.
ApplianceConnection
Object
HPE OneView appliance connection. Defaults to the default connected session. Aliased as Appliance.

Examples

List all storage volumes

Get-OVStorageVolume

Get a volume by name

$volume1 = Get-OVStorageVolume -Name Volume1

Get a shared volume by name

$volume2 = Get-OVStorageVolume -Name SharedVolume1

Get volumes and attach them to a server profile

# From Server_Multiconnection_SAN_Storage_Sample.ps1
$volume1 = Get-OVStorageVolume -Name Volume1 | Get-OVProfileAttachVolume -volumeid 1
$volume2 = Get-OVStorageVolume -Name SharedVolume1 | Get-OVProfileAttachVolume -volumeid 2
$attachVolumes = @($volume1, $volume2)

$task = New-OVProfile -name $profileName -server $server -connections $conList `
    -SANStorage -HostOsType VMware -StorageVolume $attachVolumes -Async

List volumes not attached to any server profile

Get-OVStorageVolume -Available

Get volumes created from a specific template

$svt = Get-OVStorageVolumeTemplate -Name "Gold-Tier-Template"
Get-OVStorageVolume -StorageVolumeTemplate $svt

Output

HPEOneView.Storage.Volume Each object includes the volume name, storage pool, provisioned capacity, provisioning type (Thin/Full), sharing state, and attached server profiles.

Build docs developers (and LLMs) love