How to re-initialize a disk with format type=cdsdisk

book

Article ID: 100021249

calendar_today

Updated On:

Description

Description

On occasion, attempts to add a failed disk back to the disk group will fail. For example:
 
# vxdg -g dggroup -k adddisk emc1=c2t3d50s2
VxVm vxdg ERROR V-5-1-10127 associating disk-media emc1 with c2t3d50s2"
Disk public region to small
 
This may be because the private/public region may have been changed and do not match the original configuration or its the wrong disk and size is smaller.
 
Solution:
1. Check prtvtoc  with a  good disc ( already part of the disk group)  and the bad disk to be replaced are the same size
# prtvtoc -h /dev/rdsk/c2t3d4s2 ....good configuration
2 5 01 0 35351010 35351039
7 15 01 0 35351010 35351039
 
# prtvtoc -h /dev/rdsk/c2t3d50s2 ....bad configuration
2 5 01 0 35351010 35351039
7 15 01 0 35351010 35351039
 
Note: Do not proceed further if the disk sizes do not match, it is possible you may have the wrong disk
 
2. Compare public/private region of both disks ( or from backup config if it is exist in file /etc/vx/cbr/bk/dggroup.xxxx/*disk.info.* )
 
Good Configuration Disk - where size= 35348736 + 2304 = 35351040 as per prtvtoc
# vxdisk list c2t3d4s2 |egrep "public:|private:"
public: slice=2 offset=2304 len=35348736 disk_offset=0
private: slice=0 offset=256 len=2048 disk_offset=0
 
Bad Configuration Disk - where size 35285248 + 65792 = 35351040 as per prtvtoc but public region is smaller by the amount 65792 - 2304 = 63488
# vxdisk list c2t3d50s2 |egrep "public:|private:"
public: slice=2 offset=65792 len=35285248 disk_offset=0
private: slice=2 offset=256 len=65536 disk_offset=0
 
3 Re-initialize the disk with correct configuration using the config from good disk ( c2t3d4s2 )
-----------------------------------------------------------------------------------------------------------------------
Option for vxdisksetup are :
 
# /etc/vx/bin/vxdisksetup -h
 
Usage: vxdisksetup [-if] disk-device-address [ attribute ... ]
Options:
-i Initialize the private region
-f force
 
Attributes:
publen= Length of public region (used to contain subdisks).
privlen= Length of private region (used for VM private data).
puboffset= Block # of the beginning of the public region.
privoffset= Block # of the beginning of the private region.
( available for cdsdisk format only and
block # should be 8K aligned )
format=sliced|cdsdisk
Create the specified disk format.
------------------------------------------------------------------------------------------------------------------------
 
# /etc/vx/bin/vxdisksetup -i  c2t3d50 format=cdsdisk publen=35348736 privlen=2048 puboffset=230 privoffset=256
 
# vxdisk list c2t3d50s2 |egrep "public:|private:"
public: slice=2 offset=2304 len=35348736 disk_offset=0
private: slice=0 offset=256 len=2048 disk_offset=0
 
4. add disk back to disk group and start the volume
# vxdg -g dggroup -k adddisk emc1=c2t3d50s2
# vxvol -g dggroup start vol1
 
5. fsck and mount the filesystem
# fsck -F vxfs /dev/vx/rdsk/dggroup/vol1  
( if full fsck is required , please contact Veritas for assistance)
# mount -F vxfs /dev/vx/dsk/dggroup/vol1 /tmnt
 
 

 

Issue/Introduction

How to re-initialize a disk with format type=cdsdisk