Less known Solaris Features: Point-in-time copy with AVS - Part 7: Starting a point-in-time copy

Okay, before using the merits of point-in-time copies, we have to configure such copies. The configuration of this copies is done with the with the iiadm command. In this part of the tutorial i will show you how to configure the different kinds of point-in-time copies.

Common prerequisite

At first we have to enable the Availability suite. This is independent from the method of doing the point-in-time copy. When you´ve used the AVS before, you don´t need this step

# dscfgadm<br />
Could not find a valid local configuration database.<br />
Initializing local configuration database...<br />
Successfully initialized local configuration database
If you would like to start using the Availability Suite immediately, you may<br />
start the SMF services now.  You may also choose to start the services later<br />
using the dscfgadm -e command.
Would you like to start the services now?  [y,n,?] y

Please answer the last question with y . By doing so, all the services of the AVS we need in the following tutorial are started (besides the remote replication service)

Create an independent copy

Now we can configure the point in time copy. This is really simple.

# iiadm -e ind /dev/rdsk/c1d0s3 /dev/rdsk/c1d1s3 /dev/rdsk/c1d1s4

That´s all. What does this command mean: Create an independent copy of the data on the slice /dev/rdsk/c1d0s3 on /dev/rdsk/c1d1s3 and use /dev/rdsk/c1d1s3 for the bitmap. As soon as you execute this command, the copy process starts. We decided to use an independent copy, thus we start a full copy of the master volume to the shadow volume. As long this fully copy hasn´t completed, the point-in-time copy behaves like an dependent copy. Now we check the configuration.

# 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: Fri Apr 25 18:16:59 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 highlighted part is interessting. The bitmap is clean. This means, that there are no changes between the master and the shadow volume.

Create an independent copy

Creating an dependent copy is quite easy. You have just alter the command a little bit, you´ve used to create independent one.

# iiadm -e dep /dev/rdsk/c1d0s3 /dev/rdsk/c1d1s3 /dev/rdsk/c1d1s4

Just subsititue the ind with the dep and you get a dependent copy.

# iiadm -i<br />
/dev/rdsk/c1d0s3: (master volume)<br />
/dev/rdsk/c1d1s3: (shadow volume)<br />
/dev/rdsk/c1d1s4: (bitmap volume)<br />
<b>Dependent copy</b><br />
Latest modified time: Sat Apr 26 23:50:19 2008<br />
Volume size:   273105<br />
Shadow chunks total: 4267 Shadow chunks used: 0<br />
Percent of bitmap set: 0<br />
        (bitmap clean)

Create an compact independent copy

How do you get a compact depedent copy? Well, there is no command to force the creation of such a copy. But it´s quite easy to get one. When the shadow volume is smaller than the master volume, the system chooses the compact independent copy automatically. We´ve created two small slices, when we formated the harddrive. One of the small slices is /dev/rdsk/c1d1s6. Let´s use it as the shadow volume. This volume has only a size 32 MB while the master volume is 256 lMB large.At first we create an dependent copy again, but with different volumes:

# iiadm -e dep /dev/rdsk/c1d0s3 /dev/rdsk/c1d1s6 /dev/rdsk/c1d1s4

Now let´s check the status of the point-in-time copy configuration:

# iiadm -i<br />
/dev/rdsk/c1d0s3: (master volume)<br />
/dev/rdsk/c1d1s6: (shadow volume)<br />
/dev/rdsk/c1d1s4: (bitmap volume)<br />
<b>Dependent copy, compacted shadow space</b><br />
Latest modified time: Sat Apr 26 23:55:05 2008<br />
Volume size:   273105<br />
Shadow chunks total: 1255 Shadow chunks used: 0<br />
Percent of bitmap set: 0<br />
        (bitmap clean)

Et volia, you´ve configured a compact depedent copy.