How to re-encapsulate the rootdisk that can't be used in bringing up VERITAS Volume Manager (VxVM).
Details:
There are times when an encapsulated boot disk can't be
used to bring up VxVM. In cases where the private region is corrupted the
following error message appears during boot up:
vxvm: vxconfigd: ERROR:
Cannot start rootvol volume, no valid plexes
In addition, the boot
disk is mirrored and there are other disks and volumes in rootdg. There are also
disks and volumes in disk groups other than rootdg. There are
no data volumes using the boot disk.
The following is a suggested
recovery procedure for such cases:
1. boot off of cdrom into single user
ok> boot cdrom -s
2. mount the root partition on
/a
example: # mount /dev/dsk/c0t0d0s0 /a
3.
modify the following files to manually unencapsulate the root
disk:
a. touch /a/etc/vx/reconfig.d/state.d/install-db ( This step
is not required for Volume Manager 4.0 and above)
b. modify
/a/etc/vfstab to show original Solaris partitions before Volume Manager was
installed (vfstab.prevm).
c. modify /a/etc/system so that the
following lines show as:
*rootdev:/pseudo/vxio@0:0
*set
vxio:vol_rootdev_is_volume_=1
4. reboot the system
5. zero out
the partitions with tags 14 and 15 on the root disk using format. prtvtoc will
show these tags. See below for the prtvtoc output:
5a) swede !# prtvtoc
/dev/rdsk/c0t0d0s2
* /dev/rdsk/c0t0d0s2 partition map
*
*
Dimensions:
* 512 bytes/sector
* 255
sectors/track
* 16 tracks/cylinder
* 4080
sectors/cylinder
* 57461 cylinders
* 57459 accessible
cylinders
*
* Flags:
* 1: unmountable
* 10:
read-only
*
* Unallocated space:
*
First Sector Last
*
Sector Count Sector
* 199230480
18446744073510321136 18446744073709551615
* 234432720
18446744073674349376 199230479
* 220205760 14218800
234424559
*
* First
Sector Last
*
Partition Tag Flags Sector
Count Sector Mount Directory
0 2 00 0
199230480 199230479
1 3 01 199230480 20975280
220205759
2 5 00 0
234432720 234432719
3
14 01 0 234432720
234432719
4
15 01 234424560 8160 234432719
5b)
Use format to zero out the partitions with tags 14 and 15 in the aforementioned
prtvtoc:
swede !# format
Searching for
disks...done
AVAILABLE DISK SELECTIONS:
0.
c0t0d0 <ST3120026A cyl 57459 alt 2 hd 16 sec
255>
/pci@1e,600000/ide@d/dad@0,0
5c)
Select the disk:
Specify disk (enter its number): 0
selecting
c0t0d0
[disk formatted, no defect list found]
FORMAT
MENU:
disk - select a
disk
type - select (define)
a disk type
partition - select (define) a
partition table
current - describe
the current disk
format - format
and analyze the disk
repair -
repair a defective
sector
show - translate a
disk address
label - write
label to the disk
analyze - surface
analysis
defect - defect list
management
backup - search for
backup labels
verify - read and
display labels
save - save
new disk/partition
definitions
volname - set
8-character volume
name
!<cmd> - execute
<cmd>, then return
quit
5d)
Select partition:
format> p
PARTITION
MENU:
0 - change `0'
partition
1 - change `1'
partition
2 - change `2'
partition
3 - change `3'
partition
4 - change `4'
partition
5 - change `5'
partition
6 - change `6'
partition
7 - change `7'
partition
select - select a predefined
table
modify - modify a predefined partition
table
name - name the current
table
print - display the current
table
label - write partition map and label
to the disk
!<cmd> - execute <cmd>,
then return
quit
5e) Print the
partition:
partition> p
Current partition table
(original):
Total disk cylinders available: 57459 + 2 (reserved
cylinders)
Part Tag Flag
Cylinders
Size Blocks
0
root wm 0 - 48830
95.00GB (48831/0/0) 199230480
1
swap wu 48831 - 53971
10.00GB (5141/0/0) 20975280
2
backup wm 0 -
57458 111.79GB (57459/0/0)
234432720
3 - wu
0 - 57458 111.79GB (57459/0/0)
234432720
4 - wu
57457 -
57458 3.98MB (2/0/0) 8160
5
unassigned wm
0 0
(0/0/0) 0
6
unassigned wm
0 0
(0/0/0) 0
7
unassigned wm
0 0
(0/0/0)
0
partition>
5f) Zero out partition 3 and 4 by doing the
following:
partition>
3
Part Tag Flag
Cylinders
Size Blocks
3
unassigned wm 1
- 5120 9.96GB (5120/0/0)
20889600
Enter partition id tag[unassigned]:
Enter partition
permission flags[wm]:
Enter new starting cyl[1]:
Enter partition
size[20889600b, 5120c, 5120e, 10200.00mb, 9.96gb]: 0
6. rm
/etc/vx/reconfig.d/state.d/install-db
7. run the following:
# vxiod set 10
# vxconfigd -d
#
vxdctl init <hostname>
# vxdctl enable
8.
reboot the system
9. remove the encapsulated volumes from rootdg that are
using the rootdisk (check using vxprint -ht). These volumes must be removed to
avoid duplication when the partitions become volumes during encapsulation
in Step 12.
For example:
# vxedit -rf rm
rootvol
# vxedit -rf rm swapvol
...
etc.
10. Remove the rootdisk from rootdg using vxdiskadm option 3. Make
sure that there is still at least one disk remaining in rootdg. The rootdisk
will be added back into rootdg during encapsulation in Step 12.
11.
Use vxdiskadm option 2 to encapsulate the boot disk. Interactively assign the
name 'rootdisk'.
12. reboot the system
13. After rebooting the
system, the mirror disk can be added into rootdg and use vxdiskadm option
6 to mirror the volumes.
Products Applied:
Volume Manager for UNIX/Linux 2.5 (Solaris), 2.5.1 (Solaris), 2.5.3 (Solaris), 2.5.4 (Solaris), 2.5.5 (Solaris), 2.5.6 (Solaris), 2.5.7 (Solaris), 3.0 (Solaris), 3.0.1 (Solaris), 3.0.2 (Solaris), 3.0.2.1(Solaris), 3.0.3 (Solaris), 3.0.4 (Solaris), 3.0.4+P01 (Solaris), 3.0.4+P04 (Solaris), 3.0.4+P05 (Solaris), 3.0.4.1 (Solaris), 3.1 (Solaris), 3.1+P01 (Solaris), 3.1+P02 (Solaris), 3.1+P04 (Solaris), 3.1.1 P02 (Solaris), 3.1.1 P03 (Solaris), 3.1.1 P04 (Solaris), 3.1.1 P05 (Solaris), 3.1.1(Solaris), 3.2 (Solaris), 3.2 P01(Solaris), 3.2 P02 (Solaris), 3.2 P03 (Solaris), 3.2 P04 (Solaris), 3.2P02+PP1.1 (Solaris), 3.5 (Solaris), 3.5 MP1(Solaris), 3.5 MP1+PP3.1 (Solaris), 3.5 MP2 (Solaris), 3.5 MP3 (Solaris), 3.5 MP4 (Solaris), 3.5MP1+PP2.1 (Solaris), 3.5MP1+PP4.1 (Solaris), 4.0 (Solaris), 4.0 MP1 (Solaris), 4.0 MP2 (Solaris), 4.1 (Solaris), 4.1 MP1 (Solaris), 4.1 MP1(Solaris x64), 5.0 (Solaris x64), 5.0 (Solaris)
Subjects:
Volume Manager for UNIX/Linux
Application: Configuration, Documentation, How To
Languages:
English (US)
Operating Systems:
Solaris2.5, 2.5.1, 2.6, 7.0 (32-bit), 8.0 (32-bit)