HPE 3PAR CLI: createvv, createhost and VLUNs - 夜莺博客

HPE 3PAR CLI: createvv, createhost and VLUNs

HPE 3PAR and Primera arrays are provisioned from an SSH CLI where the object names are literal: you create a CPG, carve thin volumes from it, create hosts from WWNs with a persona, and present VLUNs to those hosts. The commands are short, the parameters are not forgiving, and the persona/journal mistakes produce failures that look like SAN problems. This is a working provisioning sequence plus the checks that catch problems before the host sees them.

Preflight on the array

cli% showversion
cli% shownet
cli% showport
cli% showcpg
cli% showspace -p -devtype FC

Confirm the ports you intend to use are online, an existing CPG has space (or create one), and the host HBA WWNs are what you think they are. Discovering a WWN typo after masking storage wastes an outage window.

Create a CPG and a thin volume

cli% createcpg -t r6 -ha cage -ssz 6 mcs_glance
cli% createvv -tpvv -pol zero_detect mcs_glance glance_vv1 1000G
cli% showvv
cli% showvv -d glance_vv1
cli% showvv -host Backup_Host

-t r6 sets RAID 6, -ha cage spreads across cages for availability, and -ssz sets the set size. For the volume, -tpvv makes it thin, and -pol zero_detect avoids allocating for writes of zeros. Fully provisioned volumes (createvv cpg1 vv_test 1G) are the exception, used when you need deterministic capacity or latency.

For a multi-volume rollout, createvv -cnt 3 cpg vvname 1G creates a numbered set in one go, which is easier to script than looping over repeated calls.

Create the host and present the LUN

cli% createhost -persona 11 ESX_4 20000025b501ac0c 20000025b501ac0d
cli% createhost -add ESX_4 20000025b501ad0e
cli% showhost -desc ESX_4
cli% createvlun glance_vv1 15 ESX_4
cli% showvlun -host ESX_4 -pathsum
  • Persona numbers map to host OS families; using an ESXi persona (11) on a Windows host, or vice versa, causes reservation/failover errors that are hard to diagnose from the host side.
  • Pick the LUN ID explicitly. Auto-assignment starts low, and low IDs are frequently reserved or already used by other hardware – a fixed, documented ID per volume avoids conflicts.
  • -port can be added to create Smart SAN zoned hosts automatically where the fabric supports it.

Verify on the host

# Linux
rescan-scsi-bus.sh
multipath -ll | grep -A6 glance
ls -l /dev/mapper/ | grep 360002ac

# confirm the array serial appears in multipath output, then format and mount

The multipath output should show the device with all expected paths in active ready state. A device that appears with only one path usually means the zoning or host persona covers only one HBA, not a volume problem.

Cleanup and common commands

cli% removevlun glance_vv1 15 ESX_4
cli% removehost -f Windows_A
cli% removevv -f -pat test*
cli% setvv -name newname oldname
cli% tunevv usr_cpg cpg_r6_nl -tpvv hp3
cli% checkhealth

removevv refuses to run without -f when volumes are exported, which is a safety feature rather than an obstacle – unexport first, then remove. tunevv converts volume provisioning types (for example fully provisioned to thin) without re-presenting to the host.

Pitfalls worth writing into the runbook

  • Never present the same volume to both a cluster and a standalone host; the resulting SCSI reservation fights look like random I/O errors.
  • Host persona/journal mismatch is the top cause of "works on node A, fails over on node B" in Windows/VMware clusters.
  • Keep showvlun -pathsum output in the change record – it is the fastest proof of what was presented when something breaks later.
  • Check checkhealth and shownet before and after any change window.

Related: HPE 3PAR Peer Persistence, 3PAR disk replacement workflow, and Linux iSCSI targets with targetcli.

原文链接:https://cognoz.github.io/3par-linux