Hello,
Thanks to everybody's help. Especially to James
Slater, Darren Dunham, Victor Engle and Robert Tinoau.
Yes, just like James, Darren and Victor said before,
"vxencap" won't work if the script is still in the Jumpstart environment.
Per their suggestions, I modified my script by copying the following steps to a
new jumpstart client's /etc/rc3.d directory and let the "vxencap" to be run
after the system was rebooted.
Please notice that I am using Solaris 8 with Veritas
5.0, some "vxdctl" option are changed in version 5.0, therefore, "vxdctl add
disk" is no longer working, however, I believe it should work with version lower
than 5.0.
Also, for Veritas version 5.0, you can use "vxlicinst
-k license-key" to install the license key.
Here is my script which is working in my
situation:
#########################################
#!/bin/ksh
echo "Preparing for encapsulation of root disk c0t0d0
...\n"
echo "Step 1: Installing Veritas License
...\n"
#
# Install Veritas software license first, otherwise
# the rest
of process won't work
#
/opt/VRTSvlic/sbin/vxlicinst -k
your-license-key-here
echo "So far, this is the end of step 1
...\n"
#
# Second, to run vxinstall
# This is the
process of "vxinstall"
#
echo "Step 2: run vxconfigd vxdctl vxdg process
...\n"
echo "removing /etc/vx/reconfig.d/state.d/install-db
... \n\n"
rm /etc/vx/reconfig.d/state.d/*
echo "disable vxconfigd ...
\n\n"
vxconfigd -k -m disable
echo "initialize vxdctl ... \n\n"
vxdctl
init
echo "initialize vxdctl dmp ... \n\n"
vxdctl initdmp
vxdctl
enable
echo "So far, this is the end of step 2
...\n"
#
# Third, to run vxencap
# This is the final
step
#
echo "Step 3: run vxencap ..."
/etc/vx/bin/vxencap -c -g rootdg
rootdisk=c0t0d0s0
echo "So far, this is the end of step 3
...\n"
mv /etc/rc3.d/S90vx_install
/etc/rc3.d/s90vx_install
echo "Rebooting the server 10 minutes later ...
\n"
sleep 600
/sbin/init
6
##############################################
Sunny
Hello,
Thanks for everyone's input. Unfortunately, after
I modified my script to run for encapsulate with Jumpstart, the script is still
not working.
This time, I take difference approach by reading the
error messages I saw on the console:
Step 2: run vxinstall process …
Ld.so.1: /a/usr/sbin/vxconfigd: fatal:
libvxdiscovery.so:open failed: No such file or directory
/tmp/install_config/Finish/VxEncap.ksh: 14012
Killed
VxVM vxdctl ERROR V-5-1-11110 Please execute this operation
in global zone
VxVM vxdctl ERROR V-5-1-11110 Please execute this operation
in global zone
Step 3: run vxencap …
/a/usr/lib/vxvm/bin/vxencap: /usr/lib/vxvm/lib/vxcommon:
not found
( I login to the new server and vxcommon does exist
)
INIT: New run level: 6
VxVM sysboot INFO V-5-2-3390 Starting restore daemon
…
VxVM sysboot INFO V-5-2-3409 starting in boot mode
…
Vxvm:vxconfigd: V-5-1-7840 cannot open /dev/vx/config: No
such file or directory
VxVM vxvm-startup2 INFO V-5-2-503 VxVM general
startup…
V-5-1-0 vxvm:vxconfigd: WARNING: File /etc/vx/array.info
does not exist.
This file will be generated when switching to ENABLED
mode.
NOTICE: VxVM vxdmp V-5-0-34 added disk array DISKS, datype
= Disk
NOTICE: VxVM vxdmp V-5-3-1700 dmpnode 271/0x0 has migrated
from enclosure FAKE_ENCLR_SNO to enclosure DISKS
V-5-1-0 vxvm:vxconfigd: NOTICE: Generating
/etc/vx/array.info
VxVM vxconfigd ERROR V-5-1-1589 enable failed: Volboot file
not loaded transactions are disabled.
VxVM vxvm-startup2 ERROR V-5-2-3656 Vold is not enabled for
transactions
No volumes started
Hello,
I am working on my
Jumpstart project and running into the following problem:
All OS image and
Veritas packages can be installed perfectly while using Jumpstart, until the
last script to encapsulate the rootdisk. I finally able to figure out that
I just need to run three Veritas commands, then everything's
done.
1.
vxlicinst
2.
vxinstall
3.
vxencap
Now, I can pass the
license key to "vxlicinst" to finish step 1, but running into the next
issue:
I kept seeing
"vxdctl needs to run in global environment" messages and encapsulate process was
aborted. Seems like my script for "vxinstall" part is not working.
Since "vxinstall" is binary script, I couldn't debug what "vxinstall" really
does.
Here is my script to
run step 1 to 3. Does anyone know what "vxinstall" really does (
which vx commands it will call )?
#############################################################
#!/bin/ksh
JPBASEDIR=/a
echo "Step 1:
Installing Veritas License ..."
#
# Install Veritas software license
first, otherwise
# the rest of process won't work
#
echo
"3JPG-WOZI-ROF2-S7KY-RPO3-PRR" > ${JPBASEDIR}/opt/VRTSvlic/sbin/vxlicinst
#
# Second, to
run vxinstall
# This is the process of "vxinstall"
#
echo "Step 2: run
vxinstall process ..."
${JPBASEDIR}/usr/sbin/vxconfigd -k -m
disable
${JPBASEDIR}/usr/sbin/vxdctl init
${JPBASEDIR}/usr/sbin/vxdg init
rootdg
rm ${JPBASEDIR}/etc/vx/reconfig.d/state.d/*
touch
${JPBASEDIR}/etc/vx/reconfig.d/state.d/install-db
${JPBASEDIR}/usr/sbin/vxdisk
init c0t0d0s7 type=simple
${JPBASEDIR}/usr/sbin/vxdg adddisk
rootdisk=c0t0d0s7
${JPBASEDIR}/usr/sbin/vxdctl
enable
${JPBASEDIR}/usr/sbin/vxedit set nconfig=all
rootdg
${JPBASEDIR}/usr/sbin/vxdctl add disk c0t0d0s7
#
# Third, to run
vxencap
# This is the final step
#
echo "Step 3: run
vxencap ..."
${JPBASEDIR}/usr/lib/vxvm/bin/vxencap -c -g rootdg rootdisk=c0t0d0
touch ${JPBASEDIR}/etc/vx/reconfig.d/state.d/reconfig
/sbin/init
6
#############################################################
Thanks,
Sunny
**************************
** Sunny Chen
**
**
UNSM
**
**************************