Less known Solaris Features: Point-in-time copy with AVS - Part 10: Administration

Okay, there are several administrative procedures with the point-in-time copy functionality. I will describe only the most important ones, as i don´t want to substitute the manal with this tutorial.

Deleting a point-in-time copy configuration

Okay, let´s assume you used the following configuration so far:

# iiadm -l<br />
dep /dev/rdsk/c1d0s3 /dev/rdsk/c1d1s6 /dev/rdsk/c1d1s4<code></blockquote>
It´s really easy to delete this config. As i mentioned before,  the name of the shadow volume cleary indicates a point-in-time copy configuration, as there can be only one configuration for any given shadow volume. So you use the name of the shadow volume to designate a configuration. Thus the command to delete the configuration is fairly simple:<br />
<blockquote><code># iiadm -d /dev/rdsk/c1d1s6<code></blockquote>
The <code>-d</code> tells iiadm to delete the config. When we recheck the current AVS configuration, the config for <code>/dev/rdsk/c1d1s6</code> is gone:<br />
<blockquote><code># iiadm -l<br />
# 

Forcing a full copy resync of a point-in-time copy

Whenever you are in doubt of the consistency of you point-in-time copy (flacky disks, you´ve swapped a disk) it may be sensible to force a full copy resync instead of coping only the changed parts. Le´ts assume the follwing config of an independent copy:

# iiadm -l<br />
ind /dev/rdsk/c1d0s3 /dev/rdsk/c1d1s3 /dev/rdsk/c1d1s4

Again you use the name of the shadow volume to designate the configuration. You force the full copy resync with a single command:

# iiadm -c s /dev/rdsk/c1d1s3

When we check the status of the dependent copy, you will see that a full copy is in progress:

<br />
# iiadm -i<br />
/dev/rdsk/c1d0s3: (master volume)<br />
/dev/rdsk/c1d1s3: (shadow volume)<br />
/dev/rdsk/c1d1s4: (bitmap volume)<br />
<b>Independent copy, copy in progress, copying master to shadow</b><br />
Latest modified time: Sun Apr 27 01:49:21 2008<br />
Volume size:   273105<br />
Shadow chunks total: 4267 Shadow chunks used: 0<br />
Percent of bitmap set: 69<br />
        <b>(bitmap dirty)</b>

Let´s wait for a few moments and check the status again:

# iiadm -i<br />
/dev/rdsk/c1d0s3: (master volume)<br />
/dev/rdsk/c1d1s3: (shadow volume)<br />
/dev/rdsk/c1d1s4: (bitmap volume)<br />
Independent copy<br />
Latest modified time: Sun Apr 27 01:49:21 2008<br />
Volume size:   273105<br />
Shadow chunks total: 4267 Shadow chunks used: 0<br />
Percent of bitmap set: 0<br />
       <b> (bitmap clean)</b>

The full copy resync has completed.

Grouping point-in-time copies

Sometimes the data of an application is distributed over several disks. For example because you application is rather old can use only volumes sized at 2 Gigabytes each. When you want to make a consistent point-in-time copy of all volumes, you have to do it at the same time. To enable the admin to do so, you can group point-in-time copies. When you use the groupname, all members of the group get the commands at the same time. Okay, let´s assume we have an independent copy so far.

# iiadm -l<br />
ind /dev/rdsk/c1d0s3 /dev/rdsk/c1d1s3 /dev/rdsk/c1d1s4

Now we want to configure another one for the volume /dev/rdsk/c1d0s5 with /dev/rdsk/c1d1s5 as the shadow volume and /dev/rdsk/c1d1s6 as the bitmap volume. At first we move the existing configuration into a group. I will name it database in my example but you could choose any other name for it.

# iiadm -g database -m /dev/rdsk/c1d1s3

With -g we designate the groupname and with -m we move the volume into the group. As usual we use the name of the shadowvolume to designate the configuration. Now we create the point-in-time copy of the second volume. But we will create it directly in the group. To do so, we need the -g switch.

# iiadm -g database -e dep /dev/rdsk/c1d0s5 /dev/rdsk/c1d1s5 /dev/rdsk/c1d1s6</blockquote>
</code>Please notice, that we used a different copy mechanism for the point-in-time copy. The don´t have to be identical in the group.
Let´s check the state of our copies:<br />
<blockquote><code># iiadm -i<br />
/dev/rdsk/c1d0s3: (master volume)<br />
/dev/rdsk/c1d1s3: (shadow volume)<br />
/dev/rdsk/c1d1s4: (bitmap volume)<br />
<b>Group name: database</b><br />
Independent copy<br />
Latest modified time: Sun Apr 27 01:49:21 2008<br />
Volume size:   273105<br />
Shadow chunks total: 4267 Shadow chunks used: 0<br />
Percent of bitmap set: 0<br />
        (bitmap clean)<br />
------------------------------------------------------------------------------<br />
/dev/rdsk/c1d0s5: (master volume)<br />
/dev/rdsk/c1d1s5: (shadow volume)<br />
/dev/rdsk/c1d1s6: (bitmap volume)<br />
<b>Group name: database</b><br />
Dependent copy<br />
Latest modified time: Sun Apr 27 02:05:09 2008<br />
Volume size:   273105<br />
Shadow chunks total: 4267 Shadow chunks used: 0<br />
Percent of bitmap set: 0<br />
        (bitmap clean)</blockquote>
</code>Now let´s initiate a full copy resync on the group <code>database</code>:<br />
<blockquote><code># iiadm -c s -g database

When you check the state of your copies again, you will recognize that you initated a full resync on both copies at the same time:

# iiadm -i<br />
/dev/rdsk/c1d0s3: (master volume)<br />
/dev/rdsk/c1d1s3: (shadow volume)<br />
/dev/rdsk/c1d1s4: (bitmap volume)<br />
Group name: database<br />
<b>Independent copy, copy in progress, copying master to shadow</b><br />
Latest modified time: Sun Apr 27 02:08:09 2008<br />
Volume size:   273105<br />
Shadow chunks total: 4267 Shadow chunks used: 0<br />
Percent of bitmap set: 42<br />
        (bitmap dirty)<br />
------------------------------------------------------------------------------<br />
/dev/rdsk/c1d0s5: (master volume)<br />
/dev/rdsk/c1d1s5: (shadow volume)<br />
/dev/rdsk/c1d1s6: (bitmap volume)<br />
Group name: database<br />
<b>Dependent copy, copy in progress, copying master to shadow</b><br />
Latest modified time: Sun Apr 27 02:08:09 2008<br />
Volume size:   273105<br />
Shadow chunks total: 4267 Shadow chunks used: 0<br />
Percent of bitmap set: 40<br />
        (bitmap dirty)