SRDB ID |
|
Synopsis |
|
Date |
20907 |
|
Volume Manager - How to Repair the Private Region When 'vxdisk list' Shows "online altused" |
|
21 Mar 2002 |
This document applies to Sun Enterprise Volume Manager (SEVM) 2.x and
Veritas Volume Manager (VxVM) 3.x.
There are several scenarios where a disk under Volume Manager control can get
into an "online altused" state. Volume Manager stores the configuration of the
individual disk in the private region in two places for redundancy. If one of
these "configuration copies" gets corrupted because of a bad block on the disk,
the disk will be marked as "online altused" to notify the administrator that one
of the copies is disabled. Online altused can also be generated after moving an
A3x00 array from one host to another. The private regions are not corrupted
but have sequence numbers out of sync. In either case, the following symptoms
will be seen.
# vxdisk list
DEVICE TYPE DISK GROUP STATUS
c0t8d0s2 sliced rootdisk rootdg online
c0t9d0s2 sliced disk02 rootdg online
c1t0d0s2 sliced disk01 rootdg online
c2t4d1s2 sliced - - online altused
c2t5d0s2 sliced - - online altused
When attempting to import the disk group the following error is given:
# vxdg -C import datadg
vxvm:vxconfigd:ERROR error in disk group configuration copies.
No valid disk found containing disk group.
SOLUTION SUMMARY:
To fix the private region, the following procedure can be followed.
In some cases this procedure will not work because of an actual hardware
problem on the physical disk. If dd'ing to the private region gives errors,
or does not change the disk to an online state, it may need to be replaced.
1) From a terminal window type the following:
# vxdisk list
Below is a partial listing from vxdisk list
DEVICE TYPE DISK GROUP STATUS
c0t8d0s2 sliced rootdisk rootdg online
c0t9d0s2 sliced disk02 rootdg online
c1t0d0s2 sliced disk01 rootdg online
c2t4d1s2 sliced - - online altused
c2t5d0s2 sliced - - online altused
2) Determine which slice is being used for the private region by
doing the following;
# prtvtoc /dev/rdsk/cXtXdXs2
(Use the vxdisk list to determine which bad disk to look at, ie;
# prtvtoc /dev/rdsk/c2t4d1s2)
You will get output similar to the following;
* /dev/rdsk/c2t4d1s2 partition map
*
* Dimensions:
* 512 bytes/sector
* 16 sectors/track
* 2 tracks/cylinder
* 32 sectors/cylinder
* 63 cylinders
* 61 accessible cylinders
*
* Flags:
* 1: unmountable
* 10: read-only
*
* First Sector Last
* Partition Tag Flags Sector Count Sector Mount Directory
2 5 01 0 8907450 8907449
3 15 01 0 1290 1289
4 14 01 1290 8906160 8907449
Look at the column labeled Tag. Find the line for Tag 15 (this is the tag
for the private region) and note the partition that corresponds to it.
In this case, the private region is on partition 3.
Record this partition number for this disk for use in future steps.
3) Repeat step 2 for each corrupted disk
4) dd each disk's private region to a file (please name the file accordingly
so that you can easily refer back to that file) by performing the
following:
In this example we will be using c2t4d1s2 as our example disk and
c2t4d1s2_privreg as our filename, you will need to replace these with
the disk and correct private region slice that you are attempting
to repair. The filename can be anything that will help you remember
what file is what.
# dd if=/dev/rdsk/c2t4d1s3 of=/tmp/c2t4d1s3_privreg
5) Run the following script on the file created in step 4. (If you save
the script as fixaltused.sh, then you would run the script on the
file shown in step 4 by entering - fixaltused.sh c2t4d1s3_privreg)
------------------------------------------------------------------
#!/bin/ksh
#
# This is a script to repair a private region which has been corrupted and
# is showing up as "online altused" in the vxdisk list, but errors in a
# vxprivutil list type operation. $1 should be the path to the dd image
# of the private region.
#
cp $1 $1.good
tid=`od -c $1 | grep 2020 | awk '{print $5}'`
echo "$tid" | dd of=$1.good oseek=127507 bs=1 count=1
dd if=$1 iseek=127508 bs=1 >> $1.good
/etc/vx/diag.d/vxprivutil list ./$1.good
------------------------------------------------------------------
After running the script you should see an output similar to the below
example (you should also get this output by typing
"/etc/vx/diag.d/vxprivutil list c2t4d1s3_privreg.good" from the command
line after the script has been run, c2t4d1s3_privreg.good is the file
that is created by the above script);
diskid: 86251073.30247.cradev
group: name=ora_dg id=881621654.31353.cradev
flags: private autoimport
...
......
logs: count=1 len=167
tocblks: 0
tocs: 2/1533
Defined regions:
config priv 000017-000247[000231]: copy=01 offset=000000 enabled
config priv 000249-001119[000871]: copy=01 offset=000231 enabled
log priv 001120-001286[000167]: copy=01 offset=000000 enabled
** NOTE ** Look for the line marked flags, there should not be an
altused flag set. If the output is not good, you may also get an
error message similar to the error shown below;
vxvm:vxprivutil: ERROR: join operation failed:
Format error in disk private region
6) If the output from the script looks good, we will then dd data from the
good file back to the corresponding disk's private region. This is
accomplished by doing the following;
# dd if=/tmp/c2t4d1s3_privreg.good of=/dev/rdsk/c2t4d1s3
7) repeat steps 4 through 6 for each bad disk.
8) do a 'vxdctl enable' and then verify success;
vxdctl enable
vxdisk list
DEVICE TYPE DISK GROUP STATUS
c0t8d0s2 sliced rootdisk rootdg online
c0t9d0s2 sliced disk02 rootdg online
c1t0d0s2 sliced disk01 rootdg online
c2t4d1s2 sliced data01 datadg online
c2t5d0s2 sliced data02 datadg online
APPLIES TO: Hardware, Hardware/Disk Storage Subsystem/StorEdge Disk Array/StorEdge A3000, Hardware/Disk Storage Subsystem/StorEdge Disk Array/StorEdge A3500, Storage/Volume Manager, AFO Vertical Team Docs/Storage
ATTACHMENTS:
Copyright (c) 1997-2003 Sun Microsystems, Inc.