The following examples show some tasks you can perform on the
inactive system image.
 |
 |  |
 |
 | TIP: If you have made many changes to the active system image since
using drd clone and you want to apply those same
changes to the inactive system image, it is more efficient and robust
to start fresh with a new drd clone command than
to manually apply changes to the inactive system image. |
 |
 |  |
 |
Example 4-3 Checking a Warning Message
You verify software on the inactive system image with drd runcmd swverify and see a warning message.
Task: Find additional information about the message.
To see detailed information about the warning message supplied
by the swagent log, execute the following command:
# /opt/drd/bin/drd runcmd view /var/adm/sw/swagent.log
|
Example 4-4 Creating a Patch Install File
Task: Create a file containing a list of patches to be applied to
the inactive system image. You want to use the file as the argument
of a -f option in a swinstall command
run by drd runcmd. Follow this procedure:
Example 4-5 Looking for Changes to cron Jobs
Task: Find out if any cron jobs have changed
after cloning.
Use the following commands to determine if any cron jobs used by root have changed since the
inactive system image was created:
# /usr/bin/ls -l var/spool/crontab/crontab.root \
/var/opt/drd/mnts/sysimage_001/var/spool/crontab.root
|
# /usr/bin/diff /var/spool/crontab/crontab.root \
/var/opt/drd/mnts/sysimage_001/var/spool/crontab/crontab.root
|
The following is an example output of the diff command:
6,7c6,7 <
# log kernel diagnostic messages every 20 minutes
< 05,25 45 * * * * /usr/sbin/dmesg- >>/var/adm messages
---
> # log kernel diagnostic messages every 10 minutes
> 05,15,25,35,45,55 * * * * /usr/sbin/dmesg - >>/var/adm/messages |
This output shows that the booted system was updated to run
kernel diagnostics every 20 minutes. If you decide that when the clone
is booted, diagnostics should run every 20 minutes, as they are on
the booted system, you can:
Copy the crontab file from the
booted system to the clone:
# /usr/bin/cp /var/spool/crontab/crontab.root \
/var/opt/drd/mnts/sysimage_001/var/spool/crontab/crontab.root
|
Unmount the inactive system image:
# /opt/drd/bin/drd umount
|
Example 4-6 Editing symlinked Files
Task: You changed the value of NUM_BK in /opt/VRTS/bin/vxconfigbackup from 5 to 10 by editing the file. You want the change
applied to the clone as well.
Execute the following commands:
Mount the inactive system image:
Compare vxconfigbackup with the
clone copy:
# /usr/bin/diff /opt/VRTS/bin/vxconfigbackup \
/var/opt/drd/mnts/sysimage_000/opt/VRTS/bin/vxconfigbackup
|
Surprisingly, the files are equal! What
happened?
A long listing shows that the files are symlinks:
# /usr/bin/ll /opt/VRTS/bin/vxconfigbackup \
/var/opt/drd/mnts/sysimage_000/opt/VRTS/bin/vxconfigbackup
|
The listing shows:
lrwxr-xr-x l bin bin 32 Apr 3 17:34
/opt/VRTS/bin/vxconfigbackup -> /usr/lib/vxvm/bin/vxconfigbackup
lrwxr-xr-x 1 bin bin 32 Nov 16 12:45
/var/opt/drd/mnts/sysimage_000/opt/VRTS.bin/vxconfigbackup
-> /usr/lib/vxvm/bin/vxconfigbackup |
When the clone is booted, the target of the symlink on the clone
resides on the clone. However, when the clone is mounted under the
booted system, the target of the symlink resides on the booted system.
To change the data on the clone, edit the file that will be
the target of the symlink when the clone is booted:
# /usr/bin/vi /var/opt/drd/mnts/sysimage_001/usr/lib/vxvm/vxconfigbackup
|
and change the value of NUM_BK to 10.
 |
 |  |
 |
 | CAUTION: Attempting to edit a path on the clone that is an absolute symlink
results in changes on the booted system! |
 |
 |  |
 |