• June 30, 2022

Rocket Storage Monthly: An intro to backups with HP 3Par



Within last month’s entry for Rocket Storage Monthly, I explored some of the highlights and benefits of the HP 3PAR storage arrays. Among the benefits is a simple, sensible CLI that is consistent across their lineup and gives access to all of the backup and management features. This CLI makes automation and management of backups a straightforward process. Let’s take a look at how we can leverage the 3PAR CLI to drive both snapshot and full copy backups.

Getting started with the CLI

With recent versions of the 3Par CLI, such as version 3.2, you can access the various commands offered via one of two ways. First, by using each individual command and their parameters through a shell prompt. Here’s an example of us driving the showvv command to display volumes on the system:

Id Name Prov Type CopyOf BsId Rd
1 .srdata full base — 1 RW
0 admin full base — 0 RW
270 corona_2 cpvv base — 270 RW
290 corona_2_snap2 snp vcopy corona_2 270 RW
292 corona_2_snap3 snp vcopy corona_2 270 RW
296 corona_2_snap1 snp vcopy corona_2 270 RW

The alternative is to run the “cli” command first which puts you inside of a 3Par CLI session in which you can use the same commands but don’t have to worry about logging in with your username and password for every command.

The -sys and -pwf flags here are to specify the 3Par system to be used and the password file that is for my specific username and password combination. There are other parameters for username and password but if none are entered then you will simply be prompted to enter them after attempting to run a command. In addition, I specified the -showcols flag to customize the information received. If -showcols is not used, the default columns will be shown.

Creating a simple backup

On a 3PAR, there are two types of backups you might want to create: a space-efficient, pointer-based snapshot backup called Virtual Copy, and a standard full, incremental volume clone. For Virtual Copy, there are two CLI commands that can be used, depending on the situation. createsv is used to create a Virtual Copy of a single volume or volume set, while creategroupsv can be used to create a consistent group of Virtual Copy snapshots, one for each volume listed.

We’ll use one of the volumes from the above shovv command to drive the simplest form of Virtual Copy where we want to make a single backup for a volume. Let’s create a backup named virtual_copy_1 for the volume corona_2

There are also other flags that can be used such as to create a read-only snapshot (-ro) or to expire after a certain time (-exp <time>), but in this case we have created a snapshot with default settings: a writable snapshot that will not automatically expire.

You do not have to worry about creating a target volume prior to calling creates, instead, the 3PAR will automatically create the snapshot volume for you. We can take a look at the result by using showvv again, but this time I’ve also listed the specific volumes I want to see:

You may have noticed that the CLI indents volumes that are children of a volume, so you can easily see that our virtual_copy_1 is associated with corona_2.


Working with full clones

Creating a full copy is a bit different, and there are some special attributes to note. Once again, we have a standard command, createvvcopy and its group counterpart, creategroupvvcopy. This time, before creating a backup we have one of two mandatory flags to choose from: -p to specify a parent (source) volume and denote that the backup will be a new backup, or -r to denote that the operation will be a resyncronization (incremental) backup of a previously-created full copy backup.

For those less familiar with the 3PAR, it is important to know the behavior of a full volume copy here as I found it to be a bit different than some other storage arrays. If you do not specify the -s flag, a full copy clone will be created on the target volume, and then the relationship between the source and target volume will be severed and it is my understanding that there is not a reverse clone command. You might instead issue the clone command with the source and targets switched.

On the other hand, creating a full copy with the -s flag will retain the relationship between source and target but the target volume will be put into a state with some restrictions such as the inability to export/map the volume to a host while the source-target relationship remains.

Let’s create a backup between corona_2 and corona_clone_1 where we use the -s flag to allow for later resynchronization:

To monitor this task, we can specify the flag -cpprog with showvv to view copy progress:

Notice that I included the volume named vvcp.270.272. This volume is actually a snapshot that was created automatically when I issued the command to create this backup. The 3PAR utilizes a snapshot as the parent of the target volume to assist with the data transfer. This snapshot is fully functional such that you can do any commands to it that you would do with a Virtual Copy snapshot. The snapshot is named automatically using the source and target volume IDs.

Restoring a backup

The source volume(s) used in the creation of a Virtual Copy or full copy backup can also be restored to the earlier point in time represented by the backup, but with the current version of the HP 3PAR OS and CLI, version 3.2, there is a restriction on restoring that you must pay close attention to. Before restoring any volume from either a snapshot or clone, the destination volume cannot be exported to any host. This means that the volume must be unmapped from any host group before a restore, and then replaced after the restore has been completed. Let’s use the promotesv command to restore from a Virtual Copy:

Task 7655 has been started to promote virtual copy virtual_copy_1

One of the flags you may wish to use here is -pri, with which you can set the priority of the restoration to have it complete faster. You can also monitor the restore process by using showvv as was done for the full copy backup.

Interestingly, the use of promotesv also applies to full copy backups as the vvcp snapshot created by the system at backup time is usable as an ordinary snapshot too.

Deletion, or promotion

When you no longer want the snapshot or clone that you have previously created, there are two commands that can be used: removevv and promotevvcopy. removevv is a command to delete any volume, and this includes a snapshot. So, for Virtual Copy, we can use removevv to delete virtual_copy_1 as follows:


% removevv virtual_copy_1
Removing vv virtual_copy_1
select q=quit y=yes n=no: y

And then we can confirm it has been removed:

% showvv -showcols Id,Name,Prov,Type,CopyOf,BsId,Rd \
corona_2 virtual_copy_1

Id Name Prov Type CopyOf BsId Rd
270 corona_2 cpvv base — 270 RW
1 total

In the case of a volume clone however, you probably do not want to delete the target volume since that would prevent it from being reused in the future. If you simply want to remove the relation between your source volume and the target volume that was a part of the full volume copy, then you would instead use promotevvcopy. promotevvcopy will delete the snapshot that related the source to the target, but the data from the previous copy will still exist on the target, allowing it to be used as a copy or simply kept for future use as a unique volume. Let’s promote corona_clone01 and see what happens to the snapshot vvcp.270.272.

% promotevvcopy corona_clone01
% showvv -showcols Id,Name,Prov,Type,CopyOf,BsId,Rd \
corona_2 corona_clone01 vvcp.270.272

Id Name Prov Type CopyOf BsId Rd
270 corona_2 cpvv base — 270 RW
272 corona_clone01 cpvv base — 272 RW
2 total

After promotion of the clone, you can see that not only was vvcp.270.272 removed from the system, but corona_clone01 no longer is related in any way to corona_2.

I hope that these examples give a better understanding of how to use the 3PAR CLI. There are of course more flags and commands to help customize your backups as needed as well as to manage volumes and hosts. If there is a specific area of the CLI that you would like to see covered feel free to leave a comment!

Contact us to learn more about Rocket Storage Solutions


  • Israel Reply

    January 18, 2016 at 5:34 pm

    Hello, I have a question,

    Do you can take those snapshots out of 3Par, like for example a tape library for long term backup?

    • Sean Grady Reply

      February 18, 2016 at 5:27 pm

      Yes, you can map these snapshots, or any virtual volume from the 3par to a host.
      You use the “createvlun” command, like so:

      And the LUN number can be “auto” to have the 3par find the next number to use automatically.

      So in our case, the command could be:
      createvlun virtual_copy_1 auto host_1

Leave a Comment

Your email address will not be published.