Detac-Attach Veritas Volume Manager mirror disk on a solaris machine

wakamaru's picture

Hi Everyone,

Does anyone experience doing this scenario before..

I have a solaris machine (Solaris 9) running an in-house application and used Veritas Volume Manager 4.0.

Now, we have to apply a critical security patch on the solaris machine. Doing this activity, they require to detach veritas volume manager mirror disk from the OS. This is to protect the volume from any conflict or overwrite activity to the volume use by Veritas Volume Manager during the OS patch. And Re-attach the mirror disk/volume after the activity(security patch).

The challenge now is, the root volume is mirror using veritas volume manager, and veritas volume manager must be detach before the OS patch installation that makes it complicated scenario. I have read several forums regarding or almost the same scenario and returns them a system failure....There are some, they were successful in detaching the disk but when they try to re-attach the disk, it fails.

Any reply for this is highly appreciated..

Thanks..

g_lee's picture

The scenario you describe is

The scenario you describe is a common procedure - see the following technotes for steps:

TN 275374 : How to preserve the root mirror disk before applying patches or upgrading
http://support.veritas.com/docs/275374

(slightly more complicated, if you're just planning on reattaching mirrors after patching you may not wish to take this approach since it's a temporary split only, but it's useful if you want longer-term dual boot)
TN 266847: Starting with VERITAS Volume Manager (tm) 4.0, there is now the ability to create separate bootable disk groups
http://support.veritas.com/docs/266847

Also see the response(s) to followiing forum post - which reiterate the steps mentioned in the technotes above:
http://www.symantec.com/connect/forums/how-separat...

Hope that helps,
Grace

sunshine 2's picture

OS patching on encaplulated/mirrored boot drives using veritas.

#########################################################
### Breaking the correct "mirror" steps
### The mirror is the disk that does NOT match bootpath
#### this is "usually" the rootmirror disk
##########################################################

# verify what disk you are booted off of

prtconf -vp|grep bootpath

#####
#verify if bootpath and either rootdisk and rootmirror are the same
#####

prtconf -vp|grep rootdisk
prtconf -vp|grep rootmirror

# Break the mirror(ie the disk that does NOT match the bootpath disk)
# so the new environment can be created.
# Verify that the 0# plexes are really the non-bootpath plexes
# Make sure you remove the plexes that are associated to the non-bootpath plexes
# Replace ## with the number associated to the non-bootpath plex
# Example:
# v rootvol
# pl rootvol-01 (Remove pl associated with "sd" rootmirror)
# sd rootmirror-02 (In this example you would remove plex "rootvol-01")

vxprint -htg rootdg

# Disassociate the plex from the volumes rootvol,swapvol and var

vxplex -g rootdg dis rootvol-##
vxplex -g rootdg dis swapvol-##
vxplex -g rootdg dis var-##

# remove the plexes rootvol-##,swapvol-##,var-##

vxedit -rf rm rootvol-##
vxedit -rf rm swapvol-##
vxedit -rf rm var-##

# Double check and make sure the plexes were removed.

vxprint -htg rootdg

# Now remove the rootmirror/non-bootpath from the disk goup and unset it up.
# Replace c#t#d# with the rootmirror/non-bootpath disk number

vxdg rmdisk rootmirror
vxdiskunsetup -C c#t#d#

############################
###Disable Veritas on the rootmirror disk
############################

Mount the disk (rootmirror in this case)

mount /dev/dsk/c#t#d#s# /mnt

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

rm /mnt/etc/vx/reconfig.d/state.d/root-done

make appropriate changes to the /etc/vfstab file( there should not be anything like /dev/vx)

# Double-check the /mnt/etc/system and comment out the rootdev entries
# if they are there

vi /mnt/etc/system

# Only comment out the following entries

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

umount /mnt

reboot --- -s

and proceed with patching, if something goes wrong and you need to backout you can boot off the rootmirror and run vxinstall to enable veritas again and then encapsulate..

wakamaru's picture

RE:Detach-Attach Veritas Volume Manager mirror disk on a solaris

######################################################
##Unmirror and Unencapsulating Boot Disk With VxVM ##
######################################################

- Use the vxplex command to remove all the plexes of the volumes rootvol, swapvol, usr, var, opt and home on the disks other than the root disk. For example, the following command removes the plexes rootvol-02, swapvol-02, and home-02 that are configured on the boot disk mirror:

example
# vxplex -o rm dis rootvol-02 swapvol-02 home-02

- Use the vxprint –th to see that the rootvol and the swapvol having only a plex in their volume and ensure that the subdisks of both plexes come from the same disk.

- Use the vxunroot command to unencapsulate the boot disk.
# vxunroot
This would make changes to the /etc/vfstab and the /etc/system files.

- Make sure that the /etc/vx/reconfig.d/state.d/install-db is created.
# touch /etc/vx/reconfig.d/state.d/install-db

- Reboot the system.

##################################################################
##Encapsulating and Mirroring Boot Disk With VxVM after OS Patch##
##################################################################

- Make sure that the /etc/vx/reconfig.d/state.d/install-db is removed.

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

- Ensure that the use-nvramrc? is set to true.

# eeprom use-nvramrc?=true

- Reboot the system.

# init 6

- Use the vxdiskadm utility to have the boot disk encapsulate.

# vxdiskadm

a. Choose option 2.
b. List the disks.
c. Select the boot disk; example c0t0d0
d. When ask for a diskgroup type in rootdg.
e. When ask to create this diskgroup type “yes”
f. When ask for the use of a default disk name type “no”.
g. When ask to continue press “enter”.
h. When ask for the disk name type “rootdisk”

- Reboot the system.

# init 6

- Use the vxdiskadm utility to add the alterate boot disk into the diskgroup containing the boot disk.

# vxdiskadm

a. Choose option 1.
b. List the disks.
c. Select a alternate disk; example c0t1d0
d. When ask for a diskgroup type in rootdg.
e. When ask for the use of a default disk name type “no”.
f. When ask to continue press “enter”.
g. When ask for the disk name type “rootmirror”
h. When ask for cds or sliced format, choose “sliced”.

- Use the vxdiskadm utility to mirror all the volumes on the boot disk to the alternate boot disk.

# vxdiskadm

a. Choose option 6.
b. List the disks.
c. Select “rootdisk”
d. List the disks.
e. Select “rootmirror”

#####################
### vxprint output###
#####################

-bash-3.00# vxdisk list
DEVICE TYPE DISK GROUP STATUS
c1t0d0s2 auto:sliced rootdisk rootdg online
c1t1d0s2 auto:sliced rootmirror rootdg online

-bash-3.00# vxprint -v -g rootdg
TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0
v rootvol root ENABLED 253138176 - ACTIVE - -
v swapvol swap ENABLED 33519744 - ACTIVE - -

-bash-3.00# vxprint -ht
Disk group: rootdg

dm rootdisk c1t0d0s2 auto 40703 286657920 -
dm rootmirror c1t1d0s2 auto 40703 286657920 -

v rootvol - ENABLED ACTIVE 253138176 ROUND - root
pl rootvol-01 rootvol ENABLED ACTIVE 253138176 CONCAT - RW
sd rootdisk-02 rootvol-01 rootdisk 33519744 253138176 0 c1t0d0 ENA
pl rootvol-02 rootvol ENABLED ACTIVE 253138176 CONCAT - RW
sd rootmirror-02 rootvol-02 rootmirror 33519744 253138176 0 c1t1d0 ENA

v swapvol - ENABLED ACTIVE 33519744 ROUND - swap
pl swapvol-01 swapvol ENABLED ACTIVE 33519744 CONCAT - RW
sd rootdisk-01 swapvol-01 rootdisk 0 33519744 0 c1t0d0 ENA
pl swapvol-02 swapvol ENABLED ACTIVE 33519744 CONCAT - RW
sd rootmirror-01 swapvol-02 rootmirror 0 33519744 0 c1t1d0 ENA

prax@unix's picture

Hi wakamaru, r u looking for

Hi wakamaru,

r u looking for assistance on this issue. Incase yes, let me know i can let u know a simpler way to break a mirror and patch OS and reattach.

Cheers,
prax

xiazhen's picture

have a try

hi, wakamaru:

    i am think so . you disable  VXVM  at first .

    then into OK mode , boot OS with one of  the disk.  install patch.

   if it is fine .

    you can boot  OS with anothe disk for install patch

    at last  you  enable VXVM .

   best regards