How to preserve the root mirror disk before applying patches or upgrading
Details:
This procedure is designed to preserve the root mirror disk
before applying patches or upgrading. It provides an efficient path for recovery
if the upgrade or patch installation is unsuccessful
1. Check that the
boot disk has a valid mirror
The volumes associated with the root disk
should have a single subdisk for each of the root disk and root mirror
plexes.
Note: The root disk-B0 subdisk is a special case, its impact can be
investigated via
TechNote
http://support.veritas.com/docs/231259
Disks:
rootdisk is c1t0d0s2root mirror disk is
c1t1d0s2
#
vxprint -htqg rootdg
Disk group: rootdg
dg rootdg
default default 29000 1089252062.20.avsmsnss11
dm rootdisk
c1t0d0s2 auto 5777 71127179 -
dm rootmirror
c1t1d0s2 auto 5777 71121402 -
sd rootdiskPriv
- rootdisk 10487070
5777 PRIVATE c1t0d0 ENA
v rootvol - ENABLED ACTIVE
10487070 ROUND - root
pl rootvol-01
rootvol ENABLED ACTIVE 10487070
CONCAT - RW
sd
rootdisk-B0 rootvol-01 rootdisk 10487069
1 0 c1t0d0 ENA
sd
rootdisk-02 rootvol-01 rootdisk
0 10487069 1
c1t0d0 ENA
pl
rootvol-02 rootvol ENABLED ACTIVE
10487070 CONCAT - RW
sd rootmirror-01 rootvol-02
rootmirror 0 10487070 0
c1t1d0 ENA
v swapvol - ENABLED ACTIVE
16773534 ROUND - swap
pl swapvol-01
swapvol ENABLED ACTIVE 16773534
CONCAT - RW
sd
rootdisk-01 swapvol-01 rootdisk 10492847 16773534
0 c1t0d0 ENA
pl swapvol-02
swapvol ENABLED ACTIVE 16773534
CONCAT - RW
sd rootmirror-02
swapvol-02 rootmirror 10487070 16773534 0
c1t1d0 ENA
v usr - ENABLED ACTIVE
8389656 ROUND - gen
pl usr-01
usr ENABLED ACTIVE
8389656 CONCAT - RW
sd
rootdisk-04 usr-01 rootdisk 27445499
8389656 0 c1t0d0 ENA
pl usr-02
usr ENABLED ACTIVE
8389656 CONCAT - RW
sd rootmirror-03
usr-02 rootmirror 27260604
8389656 0 c1t1d0 ENA
v var - ENABLED ACTIVE
1733400 ROUND - gen
pl var-01
var ENABLED ACTIVE
1733400 CONCAT - RW
sd
rootdisk-03 var-01 rootdisk 69390890
1733400 0 c1t0d0 ENA
pl var-02
var ENABLED ACTIVE
1733400 CONCAT - RW
sd rootmirror-04
var-02 rootmirror 35650260
1733400 0 c1t1d0 ENA
2. Install
the Solaris boot block on the mirror disk:
#
/usr/lib/vxvm/bin/vxbootsetup -g rootdg rootmirror
Note: If you
have separate volumes for opt, export,
home on the root disk, it is required to define the partitions for
those volumes using vxmksdpart:
#
/usr/lib/vxvm/bin/vxmksdpart
Usage:
vxmksdpart [-f] [-g diskgroup] subdisk sliceno [tag flags]
e.g. In
following example, the opt volume subdisk is on rootmirror-05, and slice 7 is
free on the mirror disk:
#
vxmksdpart -g rootdg rootmirror-05 7 0x00 0x00
3. Disassociate the mirror plex:
#
vxplex -g rootdg dis rootvol-02
#
vxplex -g rootdg dis swapvol-02
#
vxplex -g rootdg dis usr-02
#
vxplex -g rootdg dis var-02
#
vxplex -g rootdg dis opt-02 -------------------- if any
#
vxplex -g rootdg dis home-02 -------------------- if any
4. Edit the following files to make the root mirror
disk bootable without VERITAS Volume Manager (tm):
#
mount /dev/dsk/c1t1d0s0 /mnt
# cd
/mnt/etc
# cp
-p system system.orig
# cp
-p vfstab vfstab.orig
# cp
-p vfstab.prevm vfstab
Change the
c#t#d# number in above file to ensure
the correct partitions will be referenced in the vfstab file:
#
touch /mnt/etc/vx/reconfig.d/state.d/install-db
Edit /mnt/etc/system and comment out following
lines using the "*" character:
Before changes:
rootdev
..
set
vxio ..
After changes:
*
rootdev ..
*
set vxio ..
5. Unmount the root mirror's / partition
#
umount /mnt
6. Apply patches or upgrade system per Installation
Guide
7. Determine if the upgrade was successful
If the upgrade
or patching was successful, attach back mirror plex to root disk:
#
vxplex -g rootdg att rootvol rootvol-02
#
vxplex -g rootdg att swapvol swapvol-02
#
vxplex -g rootdg att var var-02
#
vxplex -g rootdg att usr usr-02
or
If the upgrade or patching was not
successful and want to go back to mirror disk, then follow this
procedure:
1. Boot from mirror disk
- Bring down the system to the
OK prompt
- Change the default boot
device to c1t1d0 rootmirror
disk
- Boot system
Remove the partition having tag 14 and 15 from
mirror disk using format completely. Do not just change tag type, zero out these
partitions and labels before exiting from
format.
2. Determine which version of VERITAS Volume Manager
is installed:
The procedure if you are running VERITAS Volume Manager 3.5
and below:
# vxinstall => custom
installation => choose to encapsulate current bootdisk (eg. c1t1d0) =>
leave other disk alone.
It will ask whether you want to preserve
Volume Manager information on another disk, answer yes to this question
a. Reboot is required after running vxinstall:
#
vxdisk -f init c1t0d0
#
vxdg -g rootdg adddisk rootdisk=c1t0d0
b. Mirror root mirror disk with original rootdisk:
#
/etc/vx/bin/vxrootmir rootdisk
#
/etc/vx/bin/vxmirror rootmirror rootdisk
The procedure if you are running VERITAS Volume Manager 4.0
and above:
a. Manually start up vxconfigd to allow for the encapsulation
of the root mirror:
#
vxiod set 10
#
vxdconfigd -m disable
#
vxdctl init
#
vxdisk -f init c1t0d0
#
vxdctl enable
# rm
/etc/vx/reconfig.d/state.d/install-db
#
vxdiskadm => option 2 Encapsulate one or more disks => choose c1t1d0 (old
rootmirror) => put under rootdg
#
shutdown -i6 -g0 -y
b. Mirror root mirror disk with original root disk:
#
/etc/vx/bin/vxrootmir -g rootdg rootdisk
#
/etc/vx/bin/vxmirror -g rootdg rootmirror rootdisk
Final vxprint will look as follows:
#
vxprint -htqg rootdg
Disk group: rootdg
dg rootdg
default default 29000 1089252062.20.avsmsnss11
dm rootdisk
c1t0d0s2 auto 5777 71127179 -
dm rootmirror
c1t1d0s2 auto 5777 71121402 -
sd rootdiskPriv
- rootdisk 10487070
5777 PRIVATE c1t0d0 ENA
v rootvol - ENABLED ACTIVE
10487070 ROUND - root
pl rootvol-01
rootvol ENABLED ACTIVE 10487070
CONCAT - RW
sd
rootdisk-B0 rootvol-01 rootdisk 10487069
1 0 c1t0d0 ENA
sd
rootdisk-02 rootvol-01 rootdisk
0 10487069 1
c1t0d0 ENA
pl
rootvol-02 rootvol ENABLED ACTIVE
10487070 CONCAT - RW
sd rootmirror-01 rootvol-02
rootmirror 0 10487070 0
c1t1d0 ENA
v swapvol - ENABLED ACTIVE
16773534 ROUND - swap
pl swapvol-01
swapvol ENABLED ACTIVE 16773534
CONCAT - RW
sd
rootdisk-01 swapvol-01 rootdisk 10492847 16773534
0 c1t0d0 ENA
pl swapvol-02
swapvol ENABLED ACTIVE 16773534
CONCAT - RW
sd rootmirror-02
swapvol-02 rootmirror 10487070 16773534 0
c1t1d0 ENA
v usr - ENABLED ACTIVE
8389656 ROUND - gen
pl usr-01
usr ENABLED ACTIVE
8389656 CONCAT - RW
sd
rootdisk-04 usr-01 rootdisk 27445499
8389656 0 c1t0d0 ENA
pl usr-02
usr ENABLED ACTIVE
8389656 CONCAT - RW
sd rootmirror-03
usr-02 rootmirror 27260604
8389656 0 c1t1d0 ENA
v var - ENABLED ACTIVE
1733400 ROUND - gen
pl var-01
var ENABLED ACTIVE
1733400 CONCAT - RW
sd
rootdisk-03 var-01 rootdisk 69390890
1733400 0 c1t0d0 ENA
pl var-02
var ENABLED ACTIVE
1733400 CONCAT - RW
sd rootmirror-04
var-02 rootmirror 35650260
1733400 0 c1t1d0 ENA
Products Applied:
Volume Manager for UNIX/Linux 3.5 (Solaris), 3.5 MP1(Solaris), 3.5 MP1+PP3.1 (Solaris), 3.5 MP2 (Solaris), 3.5 MP3 (Solaris), 4.0 (Solaris), 4.0 MP1 (Solaris), 4.1 (Solaris)
Subjects:
Solaris
Application: Faq, How To, Installation, Upgrade
Volume Manager for UNIX/Linux
Application: Faq, How To, Installation, Upgrade
Languages:
English (US)
Operating Systems:
Solaris2.6, 7.0, 7.0 (32-bit), 7.0 (64-bit), 8.0, 8.0 (32-bit), 8.0 (64-bit), 9.0, 9.0 (32-bit), 9.0 (64-bit)