Thursday, December 30, 2010

Removing encapsulation/volume manager temporarily, for troubleshooting boot issues

Problem

Removing encapsulation/volume manager temporarily, for troubleshooting boot issues.

Solution

There are certain situations where Sun or other vendor may need you to un-encapsulate to allow for further troubleshooting of the boot process.
It is likely that in this situation, we are not able to boot from the primary hard disk, so we will need to have some other boot media available(net, cd).

Boot from your alternate media, and mount the root slice (usually slice 0)

# mount /dev/dsk/c0t0d0s0 /mnt

Now we will need to modify several files. First we will touch a file called "install-db" into the /etc/vx/reconfig.d/state.d directory of our mounted root slice.
This will keep volume manager from starting at boot.

# touch /mnt/etc/vx/reconfig.d/state.d/install-db

Next we will need see if we have the files "vfstab.prevm" and "system.prevm"
These are files that are created when volume manager is installed, and the rootdisk is encapsulated. They are copies of the originals, before VM modifies them.

For the vfstab.prevm, we will want to check to make sure that the paths that we are booting to are slices (/dev/dsk/c0t0d0s0...) , and not volume manager paths  (/dev/vx/dmp...)

**If you do not have a vfstab.prevm, then you will need to change all of the Volume manager paths to OS device paths manually in the vfstab. If you feel comfortable with doing this, you can proceed.
Otherwise you should contact support for assistance.***

It should look similar to the following:
#device         device          mount           FS      fsck    mount   mount
#to mount       to fsck         point           type    pass    at boot options
#
fd      -       /dev/fd fd      -       no      -
/proc   -       /proc   proc    -       no      -
/dev/dsk/c0t0d0s1       -       -       swap    -       no      -
/dev/dsk/c0t0d0s0       /dev/rdsk/c0t0d0s0      /       ufs     1       no
-
/devices        -       /devices        devfs   -       no      -
sharefs -       /etc/dfs/sharetab       sharefs -       no      -
ctfs    -       /system/contract        ctfs    -       no      -
objfs   -       /system/object  objfs   -       no      -
swap    -       /tmp    tmpfs   -       yes     -
We will want to save the current vfstab to roll back to if we fix the boot issues(and they are not VM related)

# cp /mnt/etc/vfstab /mnt/etc/vfstab.bak

Now we will rename the vfstab.prevm to vfstab:

# mv /mnt/etc/vfstab.prevm /mnt/etc/vfstab

We will do the same to the system file. If you do not have a system.prevm, you can comment out the following lines with a asterisk:
rootdev:/pseudo/vxio@0:0
set vxio:vol_rootdev_is_volume=1

they should look like this once commented out:

*rootdev:/pseudo/vxio@0:0
*set vxio:vol_rootdev_is_volume=1

Make a backup of the system file, and rename system.prevm:

# cp /mnt/etc/system /mnt/etc/system.bak
# mv /mnt/etc/system.prevm /mnt/etc/system


Once the system.prevm is renamed to "system", we are ready to reboot with out volume manager involvement.

In the event that the boot issues are resolved, we can restore the backups that we made of the /etc/system, and /etc/vfstab.
The we can remove the /etc/vx/reconfig.d/state.d/install-db file, and reboot.

The system will boot encapsulated, as before, and start volume manager at boot time.

No comments:

Post a Comment