Mirroring the operating system in VXVM:
In the steps below, I'm using Veritas volume manager (VxVM) to mirror the active root disk (c0t0d0) to a mirror (c0t1d0).
Introduction
First, we start with a filesystem layout that looks as follows:
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0t0d0s0 6607349 826881 5714395 13% /
/proc 0 0 0 0% /proc
fd 0 0 0 0% /dev/fd
mnttab 0 0 0 0% /etc/mnttab
/dev/dsk/c0t0d0s4 1016863 8106 947746 1% /var
swap 1443064 8 1443056 1% /var/run
swap 1443080 24 1443056 1% /tmp
The following steps guide the reader through the process of encapsulating and mirroring the operating system using vxinstall as per Veritas' recommendations. Though easy to install and fully supported by the vendor, it is difficult to maintain. Consequently, there is some debate as to the merits of this approach,
The following alternative approaches are more difficult to install, but are easier to maintain:
• Rather than encapsulating the boot disk, initialize it. The process was originally presented in the August 2000 Sun Blueprint article Toward a Reference Configuration for VxVM Managed Boot Disks, by Gene Trantham and John S. Howard.
• Use Solstice DiskSuite to mirror the operating system and use VxVM for everything else (one can create a single-slice rootdg on unused slices of the root disk and its mirror).
No matter which of the three approaches is selected, the most important consideration is that the administrative staff understands how to maintain it. For the sake of consistency, all servers at a site should use the same approach to mirror the operating system. Unless the site is willing to pay for VxVM for every server, we recommend the use of Solstice DiskSuite to mirror the operating system, making use of a single-slice rootdg on those servers that also have Veritas volume manager installed.Create two unused slices for Veritas volume manager
We're going to be mirroring from c0t0d0 to c0t1d0. When the operating system was installed, we created unassigned slices five, six, and seven of roughly 10 MB each. VxVM requires a minimum of two unused disk slices to store the Veritas private and public region on the disk. Prior to placing the operating system under the control of VxVM, we'll free up those 10MB slices so that Veritas can use the reserved space. Now we "zero out" slices five, six, and seven so that VxVM sees disk space available.
# format c0t0d0
selecting c0t0d0
[disk formatted]
...
partition> print
Current partition table (original):
Total disk cylinders available: 5266 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 root wm 0 - 3994 6.40GB (3995/0/0) 13423200
1 swap wu 3995 - 4619 1.00GB (625/0/0) 2100000
2 backup wm 0 - 5265 8.44GB (5266/0/0) 17693760
3 unassigned wu 0 0 (0/0/0) 0
4 var wm 4620 - 5244 1.00GB (625/0/0) 2100000
5 unassigned wm 5245 - 5251 11.48MB (7/0/0) 23520
6 unassigned wm 5252 - 5258 11.48MB (7/0/0) 23520
7 unassigned wm 5259 - 5265 11.48MB (7/0/0) 23520
partition> 5
Part Tag Flag Cylinders Size Blocks
5 unassigned wm 5245 - 5251 11.48MB (7/0/0) 23520
Enter partition id tag[unassigned]:
Enter partition permission flags[wm]:
Enter new starting cyl[5245]: 0
Enter partition size[23520b, 7c, 11.48mb, 0.01gb]: 0
partition> 6
Part Tag Flag Cylinders Size Blocks
6 unassigned wm 5252 - 5258 11.48MB (7/0/0) 23520
Enter partition id tag[unassigned]:
Enter partition permission flags[wm]:
Enter new starting cyl[5252]: 0
Enter partition size[23520b, 7c, 11.48mb, 0.01gb]: 0
partition> 7
Part Tag Flag Cylinders Size Blocks
7 unassigned wm 5259 - 5265 11.48MB (7/0/0) 23520
Enter partition id tag[unassigned]:
Enter partition permission flags[wm]:
Enter new starting cyl[5259]: 0
Enter partition size[23520b, 7c, 11.48mb, 0.01gb]: 0
partition> print
Current partition table (unnamed):
Total disk cylinders available: 5266 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 root wm 0 - 3994 6.40GB (3995/0/0) 13423200
1 swap wu 3995 - 4619 1.00GB (625/0/0) 2100000
2 backup wm 0 - 5265 8.44GB (5266/0/0) 17693760
3 unassigned wu 0 0 (0/0/0) 0
4 var wm 4620 - 5244 1.00GB (625/0/0) 2100000
5 unassigned wm 0 0 (0/0/0) 0
6 unassigned wm 0 0 (0/0/0) 0
7 unassigned wm 0 0 (0/0/0) 0
partition> label
Ready to label disk, continue? y
partition> quit
At this point, slices three, five, six and seven are available, as are cylinders 5245 to 5265. We'll see what Veritas does with these once the disk c0t0d0 is encapsulated.