Less known Solaris Features: Point-in-time copy with AVS - Part 6: Preparation of the test environment

After all this theory, i will go into more practical stuff. In the follwing parts of this tutorial i will give you an introcution to point-in-time copies with AVS. But at first we have to prepare some things.
At first: We need only one system for this example, so we don´t need any networking configuration. Furthermore you need to assume the root role to do the configuration in this example. Okay, i will use two harddisks in my example: /dev/dsk/c1d0 and /dev/dsk/c1d1. I´ve choosen the following layout for the disk.

.                         First     Sector    Last
. Partition  Tag  Flags    Sector     Count    Sector  Mount Directory
       2      5    01          0  65480940  65480939
       3      0    00      48195    273105    321299
       4      0    00     321300     80325    401624
       5      0    00     401625    273105    674729
       6      0    00     674730     80325    755054
       8      1    01          0     16065     16064
       9      9    00      16065     32130     48194

With this configuration i have two 128 mb sized slices. I will use them for data in my example. Additionally i´ve create two 32 mb small slices for the bitmaps. 32 mb for the bitmaps is too large, but i didn´t wanted to calculate the exact size. You will find the exact math behind the size of the bitmap in the manuals. It´s important to have exactly the same layout on the second disk, at least, when you you use independent or non-compact dependent copies. Okay, to be more precise, the slices under the control of the point-in-time copy functionality has to have the same size. To simplify the fulfillment of this requirement, i copy the layout from my master disk to the shadow disk.

# prtvtoc /dev/dsk/c1d0s2 | fmthard -s - /dev/rdsk/c1d1s2<br />
fmthard:  New volume table of contents now in place.

Okay, now let´s create a file system for testing purposes on the master disk.

# newfs /dev/dsk/c1d0s3<br />
newfs: construct a new file system /dev/rdsk/c1d0s3: (y/n)? y<br />
Warning: 3376 sector(s) in last cylinder unallocated<br />
/dev/rdsk/c1d0s3:       273104 sectors in 45 cylinders of 48 tracks, 128 sectors<br />
        133.4MB in 4 cyl groups (13 c/g, 39.00MB/g, 18624 i/g)<br />
super-block backups (for fsck -F ufs -o b=#) at:<br />
 32, 80032, 160032, 240032</blockquote>
</code>Okay, as an empty filesystem is a boring target for point-in-time copies, we play around a little bit and create some files in our new filesystem.<br />
<blockquote><code># mount /dev/dsk/c1d0s3 /mnt<br />
# cd /mnt<br />
# mkfile 1k test1<br />
# mkfile 1k test2<br />
# mkfile 1k test3<br />
# mkfile 1k test4<br />
# mkfile 1k testindex1<br />
# ls -l<br />
total 26<br />
drwx------   2 root     root        8192 Apr 25 18:10 lost+found<br />
-rw------T   1 root     root        1024 Apr 25 18:10 test1<br />
-rw------T   1 root     root        1024 Apr 25 18:11 test2<br />
-rw------T   1 root     root        1024 Apr 25 18:11 test3<br />
-rw------T   1 root     root        1024 Apr 25 18:11 test4<br />
-rw------T   1 root     root        1024 Apr 25 18:11 testindex1

Okay, that´s all … now let´s try point-in-time copies.