Sun Microsystems, Inc.  Sun System Handbook - ISO 3.4 June 2011 Internal/Partner Edition
   Home | Current Systems | Former STK Products | EOL Systems | Components | General Info | Search | Feedback

Asset ID: 1-72-1018111.1
Update Date:2010-08-10
Keywords:

Solution Type  Problem Resolution Sure

Solution  1018111.1 :   VERITAS Volume Manager 3.x and Sun Enterprise Volume Manager[TM] 2.x: How to Repair the Private Region When "vxdisk list" Shows "online altused"  


Related Items
  • Sun Solaris Volume Manager (SVM)
  •  
  • Sun Storage A3500 SCSI Array
  •  
  • Sun Storage A3500 FC Array
  •  
Related Categories
  • GCS>Sun Microsystems>Storage - Disk>Modular Disk - Other
  •  

PreviouslyPublishedAs
229433


Symptoms
This document applies to Sun Enterprise Volume Manager[TM] 2.x and
Veritas Volume Manager (VxVM) 3.x.
There are several scenarios where a disk under the control of Volume Manager software can get into an "online altused" state. Volume Manager software 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 occur:
  # 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 produced:

  # vxdg -C import datadg
  vxvm:vxconfigd:ERROR error in disk group configuration copies.
No valid disk found containing disk group.


Resolution
To fix the private region, you can perform the following procedure. Sometimes, this procedure does not work because of an actual hardware problem on the physical disk. If dd'ing to the private region produces errors, or does not change the disk to an online state, it might need to be replaced.
1) From a terminal window enter the following:
  # vxdisk list
  The following is an excerpt from the 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) Perform the following steps:

  a) Determine which slice is being used for the private region:
     # prtvtoc /dev/rdsk/cXtXdXs2
  b) Use the vxdisk list to determine which bad disk to review, that is:
     # prtvtoc /dev/rdsk/c2t4d1s2
     Output appears that is similar to the following example:
     * /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 
  c) In the Tag column in the example output, find the line for Tag 15 (the tag
for the private region) and note the partition that corresponds to it.  In
the example output, the private region is on partition 3.  Record the
partition number for the disk for use in future steps.

3) Repeat step 2 for each corrupted disk.

4) dd each disk's private region to a file (naming the file accordingly so that
you can easily refer back to that file):

  In the following, c2t4d1s2 is used as an example disk and c2t4d1s2_privreg as
the filename.  Replace these labels with the actual labels for the disk and
and the correct private region slice that you are attempting to repair.  The
filename can be anything that will help you remember the file:
  # dd if=/dev/rdsk/c2t4d1s3 of=/tmp/c2t4d1s3_privreg

5) Run the following script on the file you created in step 4. (If you save the
script as fixaltused.sh, 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 you run the script, an output that is similar to the following should
appear. You can also get this output by entering "/etc/vx/diag.d/vxprivutil
list c2t4d1s3_privreg.good" from the command line after the script has been
run. The preceding script creates the c2t4d1s3_privreg.good file.

  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."  An altused flag set should not
appear.  If the output is not good, you might also get an error message that
is similar to the following:
  vxvm:vxprivutil: ERROR: join operation failed:
Format error in disk private region

6) If the output from the script looks good, dd data from the good file back to
the corresponding disk's private region:

  # 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

9) If the procedure does not give the expected result, the diskgroup should be deported then imported. If that is not possible, the server should be rebooted.



Product
VERITAS Volume Manager 3.2 Software
Sun Enterprise Volume Manager 2.4
Sun StorageTek A3500 FC Array
Sun StorageTek A3500 Array

vxdisk list, online altused, online, altused
Previously Published As
20907

Change History
Date: 2006-05-11
User Name: 29589
Action: Approved
Comment: One additional step added to procedure. No other changes. Reviewed. Republish.
Version: 6
Date: 2006-05-11
User Name: 29589
Action: Accept
Comment:
Version: 0
Date: 2006-05-11
User Name: 78962
Action: Approved
Comment: The update is fine. Looks good.
Version: 0

Attachments
This solution has no attachment
  Copyright © 2011 Sun Microsystems, Inc.  All rights reserved.
 Feedback