Wuhai’s Weblog

October 21, 2009

VCS import type

Filed under: Veritas — wuhai @ 9:55 pm

bash-3.00# less /etc/VRTSvcs/conf/VVRTypes.cf
// $Id$
// ident “@(#)VCS:$RCSfile$ $Revision$”
//
// Copyright (c) 1998-2004 VERITAS Software Corporation. All rights
// reserved. VERITAS, the VERITAS Logo and all other VERITAS product
// names and slogans are trademarks or registered trademarks of VERITAS
// Software Corporation. VERITAS and the VERITAS Logo Reg. U.S. Pat. &
// Tm. Off. Other product names and/or slogans mentioned herein may be
// trademarks or registered trademarks of their respective companies.
//

type RVG (
static int NumThreads = 1
static str ArgList[] = { RVG, DiskGroup }
str RVG
str DiskGroup
str StorageRVG
str StorageDG
str StorageHostIds
)

type RVGPrimary (
static keylist SupportedActions = { fbsync }
static int NumThreads = 1
static int OnlineRetryLimit = 1
static str ArgList[] = { RvgResourceName, AutoTakeover, AutoResync }
str RvgResourceName
int AutoTakeover = 1
int AutoResync = 0
)

type RVGSnapshot (
static keylist RegList = { Prefix }
static int NumThreads = 1
static str ArgList[] = { RvgResourceName, CacheObj, Prefix, DestroyOnOffline }
str RvgResourceName
str CacheObj
str Prefix
boolean DestroyOnOffline = 1
temp str FDFile
)

bash-3.00# /opt/VRTSvcs/bin/hacf -typetocmd /etc/VRTSvcs/conf/VVRTypes.cf -display
hatype -add RVG
hatype -modify RVG SourceFile “./VVRTypes.cf”
hatype -modify RVG NumThreads 1
hatype -modify RVG ArgList RVG DiskGroup
haattr -add RVG RVG -string
haattr -add RVG DiskGroup -string
haattr -add RVG StorageRVG -string
haattr -add RVG StorageDG -string
haattr -add RVG StorageHostIds -string
hatype -modify RVG AttrChangedTimeout 60
hatype -modify RVG CloseTimeout 60
hatype -modify RVG CleanTimeout 60
hatype -modify RVG ConfInterval 600
hatype -modify RVG MonitorInterval 60
hatype -modify RVG MonitorTimeout 60
hatype -modify RVG AgentPriority 0
hatype -modify RVG AgentClass TS
hatype -modify RVG ScriptPriority 0
hatype -modify RVG ScriptClass TS
hatype -modify RVG LogFileSize 33554432
hatype -modify RVG OfflineMonitorInterval 300
hatype -modify RVG OfflineProcScanInterval 60
hatype -modify RVG OfflineTimeout 300
hatype -modify RVG OnlineRetryLimit 0
hatype -modify RVG OnlineTimeout 300
hatype -modify RVG OnlineWaitLimit 2
hatype -modify RVG OpenTimeout 60
hatype -modify RVG ProcScanInterval 60
hatype -modify RVG ProcScanStatus 0
hatype -modify RVG RestartLimit 0
hatype -modify RVG ToleranceLimit 0
hatype -modify RVG AgentStartTimeout 60
hatype -modify RVG AgentReplyTimeout 130
hatype -modify RVG Operations OnOff
hatype -modify RVG FaultOnMonitorTimeouts 4
hatype -modify RVG InfoInterval 0
hatype -modify RVG InfoTimeout 30
hatype -modify RVG SupportedActions -delete -keys
hatype -modify RVG ActionTimeout 30
hatype -modify RVG AgentDirectory “”
hatype -modify RVG AgentFile “”
hatype -modify RVG FireDrill 0
hatype -modify RVG Migratable 0
hatype -modify RVG ExternalStateChange -delete -keys
haattr -default RVG AutoStart 1
haattr -default RVG Critical 1
haattr -default RVG TriggerEvent 0
haattr -default RVG ResourceOwner unknown
hatype -modify RVG MonitorStatsParam Frequency 0 ExpectedValue 100 ValueThreshold 100 AvgThreshold 40
hatype -modify RVG AMF Mode 3 MonitorInterval 60 OfflineMonitorInterval 300 RegisterRetryLimit 3
hatype -modify RVG LogDbg -delete -keys
haattr -default RVG ComputeStats 0
hatype -add RVGPrimary
hatype -modify RVGPrimary SourceFile “./VVRTypes.cf”
hatype -modify RVGPrimary SupportedActions fbsync
hatype -modify RVGPrimary NumThreads 1
hatype -modify RVGPrimary OnlineRetryLimit 1
hatype -modify RVGPrimary ArgList RvgResourceName AutoTakeover AutoResync
haattr -add RVGPrimary RvgResourceName -string
haattr -add RVGPrimary AutoTakeover -integer 1
haattr -add RVGPrimary AutoResync -integer 0
hatype -modify RVGPrimary AttrChangedTimeout 60
hatype -modify RVGPrimary CloseTimeout 60
hatype -modify RVGPrimary CleanTimeout 60
hatype -modify RVGPrimary ConfInterval 600
hatype -modify RVGPrimary MonitorInterval 60
hatype -modify RVGPrimary MonitorTimeout 60
hatype -modify RVGPrimary AgentPriority 0
hatype -modify RVGPrimary AgentClass TS
hatype -modify RVGPrimary ScriptPriority 0
hatype -modify RVGPrimary ScriptClass TS
hatype -modify RVGPrimary LogFileSize 33554432
hatype -modify RVGPrimary OfflineMonitorInterval 300
hatype -modify RVGPrimary OfflineProcScanInterval 60
hatype -modify RVGPrimary OfflineTimeout 300
hatype -modify RVGPrimary OnlineTimeout 300
hatype -modify RVGPrimary OnlineWaitLimit 2
hatype -modify RVGPrimary OpenTimeout 60
hatype -modify RVGPrimary ProcScanInterval 60
hatype -modify RVGPrimary ProcScanStatus 0
hatype -modify RVGPrimary RestartLimit 0
hatype -modify RVGPrimary ToleranceLimit 0
hatype -modify RVGPrimary AgentStartTimeout 60
hatype -modify RVGPrimary AgentReplyTimeout 130
hatype -modify RVGPrimary Operations OnOff
hatype -modify RVGPrimary FaultOnMonitorTimeouts 4
hatype -modify RVGPrimary InfoInterval 0
hatype -modify RVGPrimary InfoTimeout 30
hatype -modify RVGPrimary ActionTimeout 30
hatype -modify RVGPrimary AgentDirectory “”
hatype -modify RVGPrimary AgentFile “”
hatype -modify RVGPrimary FireDrill 0
hatype -modify RVGPrimary Migratable 0
hatype -modify RVGPrimary ExternalStateChange -delete -keys
haattr -default RVGPrimary AutoStart 1
haattr -default RVGPrimary Critical 1
haattr -default RVGPrimary TriggerEvent 0
haattr -default RVGPrimary ResourceOwner unknown
hatype -modify RVGPrimary MonitorStatsParam Frequency 0 ExpectedValue 100 ValueThreshold 100 AvgThreshold 40
hatype -modify RVGPrimary AMF Mode 3 MonitorInterval 60 OfflineMonitorInterval 300 RegisterRetryLimit 3
hatype -modify RVGPrimary LogDbg -delete -keys
haattr -default RVGPrimary ComputeStats 0
hatype -add RVGSnapshot
hatype -modify RVGSnapshot SourceFile “./VVRTypes.cf”
haattr -add -static RVGSnapshot RegList -keylist Prefix
hatype -modify RVGSnapshot NumThreads 1
hatype -modify RVGSnapshot ArgList RvgResourceName CacheObj Prefix DestroyOnOffline
haattr -add RVGSnapshot RvgResourceName -string
haattr -add RVGSnapshot CacheObj -string
haattr -add RVGSnapshot Prefix -string
haattr -add RVGSnapshot DestroyOnOffline -boolean 1
haattr -add -temp RVGSnapshot FDFile -string
hatype -modify RVGSnapshot AttrChangedTimeout 60
hatype -modify RVGSnapshot CloseTimeout 60
hatype -modify RVGSnapshot CleanTimeout 60
hatype -modify RVGSnapshot ConfInterval 600
hatype -modify RVGSnapshot MonitorInterval 60
hatype -modify RVGSnapshot MonitorTimeout 60
hatype -modify RVGSnapshot AgentPriority 0
hatype -modify RVGSnapshot AgentClass TS
hatype -modify RVGSnapshot ScriptPriority 0
hatype -modify RVGSnapshot ScriptClass TS
hatype -modify RVGSnapshot LogFileSize 33554432
hatype -modify RVGSnapshot OfflineMonitorInterval 300
hatype -modify RVGSnapshot OfflineProcScanInterval 60
hatype -modify RVGSnapshot OfflineTimeout 300
hatype -modify RVGSnapshot OnlineRetryLimit 0
hatype -modify RVGSnapshot OnlineTimeout 300
hatype -modify RVGSnapshot OnlineWaitLimit 2
hatype -modify RVGSnapshot OpenTimeout 60
hatype -modify RVGSnapshot ProcScanInterval 60
hatype -modify RVGSnapshot ProcScanStatus 0
hatype -modify RVGSnapshot RestartLimit 0
hatype -modify RVGSnapshot ToleranceLimit 0
hatype -modify RVGSnapshot AgentStartTimeout 60
hatype -modify RVGSnapshot AgentReplyTimeout 130
hatype -modify RVGSnapshot Operations OnOff
hatype -modify RVGSnapshot FaultOnMonitorTimeouts 4
hatype -modify RVGSnapshot InfoInterval 0
hatype -modify RVGSnapshot InfoTimeout 30
hatype -modify RVGSnapshot SupportedActions -delete -keys
hatype -modify RVGSnapshot ActionTimeout 30
hatype -modify RVGSnapshot AgentDirectory “”
hatype -modify RVGSnapshot AgentFile “”
hatype -modify RVGSnapshot FireDrill 0
hatype -modify RVGSnapshot Migratable 0
hatype -modify RVGSnapshot ExternalStateChange -delete -keys
haattr -default RVGSnapshot AutoStart 1
haattr -default RVGSnapshot Critical 1
haattr -default RVGSnapshot TriggerEvent 0
haattr -default RVGSnapshot ResourceOwner unknown
hatype -modify RVGSnapshot MonitorStatsParam Frequency 0 ExpectedValue 100 ValueThreshold 100 AvgThreshold 40
hatype -modify RVGSnapshot AMF Mode 3 MonitorInterval 60 OfflineMonitorInterval 300 RegisterRetryLimit 3
hatype -modify RVGSnapshot LogDbg -delete -keys
haattr -default RVGSnapshot ComputeStats 0
bash-3.00#

refer to: http://haidong.wordpress.com/2009/03/06/veritas-cluster-server-tip-to-manually-import-typeagent/

July 31, 2009

Change Solaris local zone zonename – Veritas Cluster

Filed under: Veritas — wuhai @ 12:39 am

First change solaris local zone name on all the nodes in VCS servers, first shutdown the local zone:
zlogin oldzonename shutdown -i 0
zonecfg -z oldzonename
> set zonename=newzonename
> commit
> exit

/opt/VRTSvcs/bin/hagrp -offline servicegroupname

/opt/VRTSvcs/bin/hares -display zone_resource_name

/opt/VRTSvcs/bin/haconf -makerw
/opt/VRTSvcs/bin/hares -modify zone_resource_name ZoneName newzonename
/opt/VRTSvcs/bin/haconf -dump -makero

/opt/VRTSvcs/bin/hagrp -online servicegroupname -sys sysname

July 22, 2009

Veritas Cluster 5.0 MP3 for Solaris x86 (64) issue

Filed under: Veritas — wuhai @ 8:22 am

This is a test Veritas Cluster 5.0 MP3 for 2 Solaris x86 (64) VMware ESX guests:

Error Message: LLT not configured

After installing VCS 5.0 MP3, it mistakenly created the following configuration file “/etc/llttab”:

set-node cluster_node_name
set-cluster 1
link e1000g2 /dev/e1000g:2 – ether – -
link e1000g3 /dev/e1000g:3 – ether – -
link-lowpri e1000g1 /dev/e1000g:1 – ether – -

It should be:
set-node cluster_node_name
set-cluster 1
link e1000g2 /dev/e1000g2 – ether – -
link e1000g3 /dev/e1000g2 – ether – -
link-lowpri e1000g1 /dev/e1000g1 – ether – -

/etc/init.d/llt start

July 21, 2009

Veritas Cluster license registration

Filed under: Veritas — wuhai @ 11:58 pm

-bash-3.00# /sbin/vxlicinst

Symantec License Manager vxlicinst utility version 3.02.16.0
Copyright (C) 1996-2006 Symantec Corporation. All rights reserved.

Enter your license key : some valid license key, shown up right above (Product Name = VERITAS Storage Foundation Standard HA)

License key successfully installed for VERITAS Storage Foundation Standard HA
License key successfully installed for VERITAS Volume Manager
License key successfully installed for VERITAS File System
License key successfully installed for VERITAS Cluster Server

To remove a demo key, go to:
cd /etc/vx/licenses/lic/
and simply remove the file named “license_key.vxlic”

June 20, 2009

Centos, Veritas vxfs, largefiles flag

Filed under: Veritas — wuhai @ 7:55 pm

[root@vxvmtest01p ~]# df -kh | grep -A 1 wuhai
/dev/vx/dsk/ch3dg/wuhaivol2
1.1G 100M 961M 10% /root/wuhaivol2
[root@vxvmtest01p ~]#

[root@vxvmtest01p ~]# /opt/VRTS/bin/fsadm -t vxfs /root/wuhaivol2
largefiles

[root@vxvmtest01p ~]# /opt/VRTS/bin/fsadm -t vxfs -o nolargefiles /root/wuhaivol2

[root@vxvmtest01p ~]# /opt/VRTS/bin/fsadm -t vxfs /root/wuhaivol2
nolargefiles

Note: It seems mkfs.vxfs does not work as expected, no matter whether the file system has largefiles or nolargefiles flag, it always displays largefiles as shown below.

[root@vxvmtest01p ~]# /sbin/mkfs.vxfs -t vxfs -m /dev/vx/dsk/ch3dg/wuhaivol2
mkfs -t vxfs -o bsize=1024,version=7,inosize=256,logsize=1024,largefiles /dev/vx/dsk/ch3dg/wuhaivol2 2301952

For unmounted file system:

[root@vxvmtest01p ~]# umount /root/wuhaivol2
[root@vxvmtest01p ~]# /opt/VRTS/bin/fsadm -t vxfs /root/wuhaivol2
UX:vxfs fsadm: ERROR: V-3-20279: /root/wuhaivol2 is not the root inode of a vxfs file system
[root@vxvmtest01p ~]# /opt/VRTS/bin/fsadm -t vxfs -o nolargefiles /dev/vx/dsk/ch3dg/wuhaivol2
[root@vxvmtest01p ~]# /opt/VRTS/bin/fsadm -t vxfs /dev/vx/dsk/ch3dg/wuhaivol2
nolargefiles
[root@vxvmtest01p ~]# /opt/VRTS/bin/fsadm -t vxfs -o largefiles /dev/vx/dsk/ch3dg/wuhaivol2
[root@vxvmtest01p ~]# /opt/VRTS/bin/fsadm -t vxfs /dev/vx/dsk/ch3dg/wuhaivol2
largefiles
[root@vxvmtest01p ~]# mount /root/wuhaivol2
[root@vxvmtest01p ~]# /opt/VRTS/bin/fsadm -t vxfs /dev/vx/dsk/ch3dg/wuhaivol2
largefiles
[root@vxvmtest01p ~]# /opt/VRTS/bin/fsadm -t vxfs /root/wuhaivol2
largefiles
[root@vxvmtest01p ~]#

April 17, 2009

RHEL5 – Veritas

Filed under: Veritas — wuhai @ 12:10 am

After ‘vxdisk scandisk’, I can see ’sdb’ showing up:

[root@vxvmtest01p ~]# vxdisk list
DEVICE TYPE DISK GROUP STATUS
sda auto:none – – online invalid
sdb auto – – error

[root@vxvmtest01p ~]# /etc/vx/bin/vxdisksetup -i sdb
parted: invalid token: Yes

[root@vxvmtest01p ~]# /usr/lib/vxvm/diag.d/vxscsi -g sdb
geometry of sdb: nhead=64 nsect=256 ncyl=64 sectsz=512 rpm=15000 cap=1048576

[root@vxvmtest01p ~]# /etc/vx/bin/vxdisksetup -i sdb format=cdsdisk
[root@vxvmtest01p ~]# /usr/lib/vxvm/diag.d/vxscsi -g sdb
geometry of sdb: nhead=64 nsect=256 ncyl=64 sectsz=512 rpm=15000 cap=1048576

[root@vxvmtest01p ~]# vxdisk list sdb
Device: sdb
devicetag: sdb
type: auto
hostid:
disk: name= id=1239908571.11.vxvmtest01p.ch3.test.i.com
group: name= id=
info: format=cdsdisk,privoffset=256,pubslice=3,privslice=3
flags: online ready private autoconfig autoimport
pubpaths: block=/dev/vx/dmp/sdb3 char=/dev/vx/rdmp/sdb3
guid: {2f06b812-1dd2-11b2-b29d-6aabd4213448}
udid: OPNFILER%5FVIRTUAL-DISK%5FDISKS%5F4F504E46494C45003935776F474E2D716C73342D76536864
site: -
version: 3.1
iosize: min=512 (bytes) max=1024 (blocks)
public: slice=3 offset=65792 len=950016 disk_offset=0
private: slice=3 offset=256 len=65536 disk_offset=0
update: time=1239908572 seqno=0.2
ssb: actual_seqno=0.0
headers: 0 240
configs: count=1 len=51360
logs: count=1 len=4096
Defined regions:
config priv 000048-000239[000192]: copy=01 offset=000000 disabled
config priv 000256-051423[051168]: copy=01 offset=000192 disabled
log priv 051424-055519[004096]: copy=01 offset=000000 disabled
lockrgn priv 055520-055663[000144]: part=00 offset=000000
Multipathing information:
numpaths: 1
sdb state=enabled
[root@vxvmtest01p ~]# vxdisk list sdb | grep cds
info: format=cdsdisk,privoffset=256,pubslice=3,privslice=3
[root@vxvmtest01p ~]#

vxdiskadm to add the above disk to disk group

[root@vxvmtest01p ~]# vxdg list
NAME STATE ID
ch3dg enabled,cds 1239912830.19.vxvmtest01p.ch3.test.i.com
[root@vxvmtest01p ~]#

[root@vxvmtest01p ~]# vxdg list ch3dg
Group: ch3dg
dgid: 1239912830.19.vxvmtest01p.ch3.test.i.com
import-id: 1024.18
flags: cds
version: 140
alignment: 8192 (bytes)
ssb: on
autotagging: on
detach-policy: global
dg-fail-policy: dgdisable
copies: nconfig=default nlog=default
config: seqno=0.1027 permlen=51360 free=51357 templen=2 loglen=4096
config disk sdb copy 1 len=51360 state=clean online
log disk sdb copy 1 len=4096
[root@vxvmtest01p ~]#

Blog at WordPress.com.