Monday, August 24, 2009

Solaris Patches on Veritas Encapsulated Root disk

How to apply Solaris Patches on Encapsulated Root disk..
--------------------------------------------------------------------------------
Details:
Note: the following are used in the following procedures.

a) Root Disk - c1t0d0s2
b) Root Mirror Disk - c1t0d1s2



Procedure :

1) Make sure that you also have full system backup either on tape or other disk. The VRTSexplorer can also be run before installing the patch.

2) If the rootdisk is mirrored, break and remove the mirror and plexes from 'rootdg' disk group using following steps. In steps below, c1t0d1 device is the mirror disk.



#vxplex -g rootdg dis var-02

#vxplex -g rootdg dis usr-02

#vxplex -g rootdg dis swapvol-02

#vxplex -g rootdg dis rootvol-02

#vxplex -g rootdg dis opt-02



To remove these plexes as follows..


#vxedit -g rootdg rm var-02

#vxedit -g rootdg rm usr-02

#vxedit -g rootdg rm swapvol-02

#vxedit -g rootdg rm rootvol-02

#vxedit -g rootdg rm opt-02


Verify that the root disk is not mirrored from "vxprint -htg rootdg", and that the root-mirror disk and sub-sequent plexes/subdisks are removed from configuration.


3) Manually unencapsulate the root device and boot it on standard Solaris slices.


Boot the system now using CDROM (#boot cdrom -s)

a) mount /dev/dsk/c1t0d0s0 /a (rootdisk)
b) cp -p /a/etc/vfstab.prevm /a/etc/vfstab

Make a backup of /a/etc/system and then edit it:
c) cp -p /a/etc/system /a/etc/system.orig
d) vi /a/etc/system and remove the two VxVM lines "rootdev:/pseudo/vxio@0:0" & "set vxio:vol_rootdev_is_volume=1"


Note: You may put a "*" in front of the VXFS related entries as well in "/etc/system" file.

e) Now make sure Volume Manager does not start on the next boot.

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

f) # umount /a

g) Reboot (Make sure here you boot without any error and can mount all the OS partitions like /opt, /var, /usr etc as per VFSTAB.




4) Install/upgrade Solaris patches as per procedure given by SUN.



5) After successful installation and once the system is rebooted in multi-user mode using root partitions/slices, undo changes made in step #3 to start Volume Manager.



#rm /etc/vx/reconfig.d/state.d/install-db

# vxiod set 10

# vxconfigd -m disable

# vxdctl enable


6) Note that one can also re-encapsulate the boot drive. The prtvtoc for root disk must be verified to make sure the "private region" (tag 14 and 15) do not exist. Note that you may have to get rid of the old rootdg by using the
following:


# vxdg destroy rootdg



7) Encapsulate the root disk(c1t0d0) using #vxdiskadm option 2 System will reboot 2 times in this process.

8) Once system is up, check #vxprint -htg rootdg (you should view the volumes for partitions like rootvol, opt, var etc..

9) #/etc/vx/bin/vxdisksetup -i c1t1d0 format=sliced (Initializing the disk for mirror)

10) #vxdiskadm - option 6 - to mirror the volumes on disk.
( in the above, select/enter source disk(root disk) first and then the destination (root-mirror)




11) Once the mirror is completed, you may check the reboot of the server using both the devices.

Reference: http://support.veritas.com/docs/317858

No comments:

Post a Comment