Here I want to tell you most important HPE 3PAR CLI commands which will help you to do your storage related work.
Create
The createvv command
creates volumes that are provisioned from one or more common provisioning
groups. Volumes can be fully provisioned from a CPG or can be thinly
provisioned. Users can optionally specify a CPG for snapshot space for fully provisioned
volumes and thinly provisioned volumes.
Create a 1 GB fully
provisioned volume named vv_test whose user space is
allocated from CPG cpg1.
|
cli% createvv cpg1 vv_test 1G
|
Create a 64 TB TPVV
named tpvv1 whose user space is allocated from CPG cpg1,
with an allocation warning of 80% and an allocation limit
of 90%.
|
cli% createvv –tpvv –usr_aw 80
-usr_al 90 cpg1 tpvv1 64T
|
Create three TPVVs: vv1.0, vv1.1,
and vv1.2 (zero-detect enabled*).
|
cli% createvv –tpvv -cnt 3 cpg1 vv1
1G
|
Create a TPVV with the restrict export
to one host attribute set using the CPG SSD_cpg1 with
a size of 64TB and the name vv4.
|
cli% createvv –tpvv –pol one_host
SSD_cpg1 vv4 64T
|
Create a TPVV named tpvv1 using
the template temp2.
|
cli% createvv -tpvv -templ temp2
tpvv1
|
Change
attributes
Change the name from test to newtest.
|
cli% setvv -name newtest test
|
Set the allocation warning of 85% for
a thin or thin deduped volume named vv5.
|
cli% setvv -usr_aw 85 vv5
|
Set the WWN for the
virtual volume named vv6.
|
cli% setvv -wwn 60002AC001A32457 vv6
|
Grow
Increase the size of virtual
volume vv1 by 2 TB.
|
cli% growvv vv1 2t
|
Delete
Remove virtual volume vv1.
|
cli% removevv –f vv1
|
Remove all virtual volumes that start
with test using the –f (force) option.
|
cli% removevv –f –pat test*
|
Show
Show all VVs in the
system.
|
cli% showvv
|
Show VVs with starting with VV*.
|
cli% showvv VV*
|
Show all VVs exported to the host Backup_Host.
|
cli% showvv -host Backup_Host
|
Show policy information about the
VVs.
|
cli% showvv -pol
|
Tune
Tune the VV and convert the fully
provisioned or thin deduped volume hp3 to a thinly
provisioned VV using the same user space CPG (or a different one).
|
cli% tunevv usr_cpg cpg_r6_nl -tpvv
hp3
|
Tune the VV and convert the fully
provisioned or thinly deduped volume hp5 to a thinly
provisioned VV using the same user space CPG (or a different
one). Keep the original fully provisioned VV with the
name hp5.orig.
|
cli% tunevv usr_cpg cpg_r6_nl -keepvv
hp5.orig -tpvv hp5
|
Tune the VV and convert the thinly provisioned
or thin deduped volume hp6 to a fully provisioned VV
using the same user space CPG (or a different one).
|
cli% tunevv usr_cpg cpg_r6_nl -full
hp6
|
Create
template
Create a RAID 1 VV
called vvr1 with -pol option (policy) set
to disable invalid (stale) snapshots.
|
cli% createtemplate vv -ha mag -rw -t
r1 -ro -pol no_stale_ss vvr1
|
NOTE: The RAID type can be changed (-t r1 -rw)
when the volume is created, but the policy cannot (-ro -pol).
Create
VV set
Create an empty VV set called oradb_1.
|
cli% createvvset oradb_1
|
Add a VV called oravol1 to
the VV set.
|
cli% createvvset –add oradb_1 oravol1
|
Create a VV set called oravvs with
a comment, and add 10 sequentially named VVs
starting with the VV called oravl.0 through oravl.9.
|
cli% createvvset -comment “Our Oracle
VVs” -cnt 10 oravvs oravl.0
|
Change
attributes
Change the name from test to newtest.
|
cli% setvv -name newtest test
|
Set the allocation warning of 85% for
a thin or thin deduped volume named vv5.
|
cli% setvv -usr_aw 85 vv5
|
Set the WWN for the
virtual volume named vv6.
|
cli% setvv -wwn 60002AC001A32457 vv6
|
Delete
Delete the VV set oradb_1.
|
cli% removevvset oradb_1
|
Remove VVs starting with "test"
from the oradb_1 VV set.
|
cli% removevvset oradb_1 test*
|
Show
VV set
Show all VV sets.
|
cli% showvvset
|
Show VV sets containing VVs matching
the pattern test*.
|
cli% showvvset –vv test*
|
Use case for
|
Use case
|
Benefit
|
VV set
|
Oracle Database or set of volumes to
export to a cluster.
|
Comprises several volumes that
together, serve all the data that is needed by that database or cluster.
|
Host set
|
VMware or other clustering solution.
|
Nodes in a cluster that share the
same storage for application failover can be logically grouped together for
ease of provisioning.
|
Managing
Hosts using CLI
Create
Create the host named ESX_4 using
persona number 11 (ESX) using the host’s two WWNs.
|
cli% createhost –persona 11 ESX_4
20000025b501ac0c 20000025b501ac0d
|
Add an additional WWN to the host
named ESX_4.
|
cli% createhost –add ESX_4
20000025b501ad0e
|
Create the Smart SAN enabled host
named ESX_23 using persona number 11 (ESX),
and establish the zoning for port 4:1:1.
|
cli% createhost -persona 11 –port
4:1:1 ESX_23 200000A0B4BC1C68
|
Edit
Edit the host named Windows_A, adding
an IP address and a contact.
|
cli% sethost –ip 192.168.153.43
–contact “Joe Smith” Windows_A
|
Remove
Remove the WWN 1000A0B3CC1C68BE for
the host named Windows_X with the TDPZ for port
1:2:1. This does not remove the WWN from the host.
|
cli% removehost –port 1:2:1 Windows_X
1000A0B3CC1C68BE
|
Remove the host named Windows_A using
the –f (force) option.
|
cli% removehost –f Windows_A
|
Create
Create an empty host set called hostset1.
|
cli% createhostset hostset1
|
Add a host called host1 to
the host set hostset1.
|
cli% createhostset –add hostset1
host1
|
Create a host set called orahostset with
a comment and containing one host called ora1.
|
cli% createhostset -comment “My
Domain Set” orahostset ora1
|
Increase the default size of .srdata
The controlsr grow command can be used to increase
the size of the .srdata file.
The command will accept a growth size, or the –pct option can be used to increase the size using a percentage.
NOTE: This command cannot be used to decrease
the default size of .srdata.
Backup
and restore .srdata
The .srdata file
can have copy space defined in order to make a snapshot or clone of .srdata. The promotesv command could then be used to restore. The database
must be stopped before the promotion/restore.
cli% setvv -snp_cpg cpg1
.srdata
cli% createsv -ro srdata_backup .srdata
cli% createsv -ro srdata_backup .srdata
Now, if the primary .srdata VV
became corrupt or had a database problem, the snapshot can be restored.
cli% stopsr -f
cli% promotesv srdata_backup
Task 1089 has been started to promote virtual copy srdata_backup
cli% waittask 1089
Task 1089 done
cli% startsr -f
cli% promotesv srdata_backup
Task 1089 has been started to promote virtual copy srdata_backup
cli% waittask 1089
Task 1089 done
cli% startsr -f
Command
|
Functionality
|
Details
|
statcache
|
Cache performance.
|
-
|
statcmp
|
Displays cache statistics. This
command allows you to see whether I/O flow is evenly distributed across the
nodes. statcmp can also be used to see the number of delayed
acknowledgements.
|
-
|
statcpu
|
Displays the node CPU usage.
|
|
statiscsi
|
Displays iSCSI port performance.
|
-
|
statiscsisession
|
Displays iSCSI session performance.
|
-
|
statpd
|
Displays Physical Disks stats.
|
|
statld
|
Displays Logical Disks stats.
|
-
|
statch
|
Chunklet stats.
|
-
|
statvv
|
Displays the internal system response
to the I/O. By comparing statvlun to statvv, you can determine whether the array is having a performance issue.
|
|
statvlun
|
Measures the round trip time of an I/O
as seen by the system. IOPS, bandwidth, and service times can all be viewed.
|
|
statvlun -host
|
Shows only VLUNs exported to the
specified hosts or patterns. Multiple host names or patterns can be repeated
using a comma-delimited list.
|
|
statport
|
Displays port statistics for
host-facing ports.
|
|
statport –disk
|
Displays port statistics for
disk-facing ports.
|
Dedup
can be disabled
By default, dedup is
allowed on a system but can be disabled and enabled using the CLI
command: cli%
setsys DisableDedup {yes|no}
To disable dedup: cli% setsys DisableDedup yes
To enable dedup
(default): cli%
setsys DisableDedup no
Creating VVs with data reduction
Create
Create a 1G fully provisioned volume
named vv_test whose user space is allocated from CPG cpg1.
|
cli% createvv cpg1 vv_test 1G
|
Create
thin provisioned VV
Create a 64 TB TPVV named tpvv1 whose
user space is allocated from CPG cpg1, with an allocation warning
of 80% and an allocation limit of 90%.
|
cli% createvv –tpvv –usr_aw 80
-usr_al 90 cpg1 tpvv1 64T
|
Create a TPVV with the restrict
export to one host attribute set using the CPG SSD_cpg1 with
a size of 64TB and the name vv4.
|
cli% createvv –tpvv –pol one_host
SSD_cpg1 vv4 64T
|
Create a TPVV named tpvv1 using
the template temp2.
|
cli% createvv -tpvv -templ temp2
tpvv1
|
Create
a TPVV with deduplication
Create a 20G dedup-enabled VV (TDVV)
named tdvv1 whose user space is allocated from the SSD
CPG cpg1, with an allocation warning of 80% and
an allocation limit of 90% (no compression).
|
cli% createvv –tdvv –usr_aw 80
-usr_al 90 cpg1 tdvv1 20G
cli% createvv –dedup –usr_aw 80 -usr_al 90 cpg1 tdvv1 20G |
Create
a TPVV with deduplication
Create a 20G dedup-enabled VV (TDVV)
named tdvv1 whose user space is allocated from the SSD
CPG cpg1, with an allocation warning of 80% and
an allocation limit of 90% (no compression).
|
cli% createvv –tdvv –usr_aw 80
-usr_al 90 cpg1 tdvv1 20G
cli% createvv –dedup –usr_aw 80 -usr_al 90 cpg1 tdvv1 20G |
Create
a TPVV with compression
Create a compressed VV with the restrict
export to one host attribute set using the CPG SSD_cpg1 with
a size of 16TB and the name vv4 (no dedup).
|
cli% createvv –tdvv –usr_aw 80
-usr_al 90 cpg1 tdvv1 20G
cli% createvv –dedup –usr_aw 80 -usr_al 90 cpg1 tdvv1 20G |
Create
TPVV with deduplication and compression
Create a deduped/compressed (DECO) VV
named vv6 using the CPG cpg1 with a size
of 2TB.
|
cli% createvv –tdvv -compr cpg1 vv6
2T cli% createvv –dedup –compr cpg1 vv6 2T
|
The –compr option can only be used on a
dedup-enabled volume (TDVV), not a thin or fully provisioned virtual volume.
To convert a TDVV to just a
thin/compressed VV, the volumes would need to be converted from TDVV to thin
first, then converted to thin/compressed using tunevv –compr. With the usr_cpg option, a new or current CPG can
be used.
Tune the VV and convert the
volume hp4 to
a thinly deduped VV using an SSD CPG:
cli% tunevv
usr_cpg SSD_r5de -tdvv hp4
cli% tunevv usr_cpg SSD_r5de -dedup hp4
cli% tunevv usr_cpg SSD_r5de -dedup hp4
Tune the VV and convert the TDVV
hp4 to a compressed VV using an SSD CPG:
cli% tunevv
usr_cpg SSD_r5de -compr hp4
No comments:
Post a Comment