Unix Blog !

June 26, 2007

Veritas Volume Manager FAQ

Filed under: VCS, Veritas — sriram003 @ 7:22 pm
1) Installing Veritas Volume Manager ?

Veritas Volume Manager is also called (VVM or VxVM )

Features :
1) VVM is Available for – Windows. Linux, HP-UX, Solaris, AIX.
2) Versions (3.1, 3.2, 3.5, 4.0, 4.1, 5.0).

Installing Veritas Volume Manager

  1. Insert the Veritas volume manager software cdrom into
    the cdrom drive. If volume management is enabled, it will
    automatically mount to /cdrom/volume_manager3.5
    (depending on the precise release iteration, the exact path
    may differ in your case):

  2. Change to the directory containing the Veritas Volume Manager packages:
    # cd /cdrom/volume_manager3.5/pkgs

  3. Add the required packages.
    Note that the order specified is
    siginificant in that the VRTSvlic package must be first,
    the VRTSvxvm package must be second, and then any
    remaining packages:
    #pkgadd -d . VRTSvlic VRTSvxvm VRTSvmdoc \
    VRTSvmman VRTSob VRTSobgui VRTSvmpro \
    VRTSfspro VRTSvxfs VRTSfsdoc

Once the Installation is complete as you see below:

** IMPORTANT NOTICE ***      This machine must now be rebooted in order to ensure      sane operation.  Execute             shutdown -y -i6 -g0      and wait for the "Console Login:" prompt.# shutdown -y -i6 -g0

Give the above command as it appears in the console.Once the system reboots, apply any Veritas volume manager    patches. At the time of this writing, there are no patches    for neither volume manager or filesystem. However, future    patches (and there will be patches ;-)  can be obtained from    http://seer.support.veritas.com.    Note that the patch installation instructions may require    that a reboot be performed after the patch is installed
2) How do I initialize disks in Solaris, so that I can Add to VxVM(Veritas Volume Manager) ?
#drvconfig; devlinks; disks
Also,
try the following, :

#devfsadm

#vxdctl initdmp

#vxdctl enable

Make sure you initialize disk , only then will you be able to add to Veritas Volume Manager.
3) How do you add/remove/replace a Disk to Veritas Volume Manager Control ?
There are 13 options available to choose, from the below command, like adding/removing of devices:
#/usr/sbin/vxdiskadm
4) Steps for setting up storage – Veritas Volume Manager ?

1) It is important to create a diskgroup, so that VVM can be
moved to a different hosts.

Disk Groups includes filesystems/disks of the applcations.
Commands (vxdiskadd or vxdg).

#vxdg init diskgroup diskname=device

example:
#vxdg init ABCdg ABCdg01=c0t0d1

2) Creating Volumes with vxassist:

# vxassist -g diskgroup make vol_name size

example:

#vxassist -g ABCdg make ABC01 8g

Note: Understanding the contents of the /etc/default/vxassist file is important, especially when striping disks.

3) Creating a VXFS filesystem:

#mkfs -F vxfs -o bsize=8192,largefiles /dev/vx/rdsk/ABCdg/ABC01

4) Mounting the VXFS file system.

Creating and mounting filesystems go hand in hand. You must be certain that any special flags

set at creation time are reflected in /etc/vfstab, or on the command line if there is no entry in vfstab for your filesystem.

mount -F vxfs -o largefiles /dev/vx/dsk/ABCdg/ABC01 /u03/oradata/ABC

4) How do I view the total number of Disks added to VXVM ?
First Check if Veritas Volume Manager has seen the Disks
that you have attached :

#vxdisk -o alldgs list

if not, try the following, and then repeat the previous step:

#devfsadm

#vxdctl initdmp

#vxdctl enable

This should be able to detect disks into VVM

#vxprint
Disk Group rootdg (default disk group for Veritas Volume Manager).
TY | Name | Assoc | Kstate | Length
dg | rootdg | rootdg | ———– |
dm | disk01 | c2t1d0s2 | ———– | 17678493
dm | disk02 | c2t2d0s2 | ———– | 17678493
dm | disk03 | c2t6d0s2 | ———– | 17678493
We have 3 VXVM disks named disk01, disk02, disk03,
They are labelled dm which represents VM disk.
The VM disks are a member of “rootdg” which is the default disk group.
The size of the disks can be determined by dividing Length by 2, which is actual KB.
5) What are Disk Groups ?
A collection of VM disks that share common configurtion like objects,
their attributes and connections.
Default disk group is rootdg.
A diskgroup name can be 31 characters long.
Diskgroups allow you to group disks in logical collections.
It can be moved as a unit from one host machine to another.
6) How do I view the List of existing Disk Groups ?
#vxdg list
To View more detail about a particular disk group :
#vxdg list (diskgroupName)
#vxdg list rootdg
7) How do I create a Disk Group ?
#vxdg init diskgroup diskname=devicename
For eg. to create a disk group name mktdg on device c1t0d0s2
#vxdg init mktdg mktdg01=c1t0d0s2
8) How do I remove a disk from the disk Group ?
#vxdg -g [groupname ] rmdisk [diskname]
For step 7 to be removed :
#vxdg -g mktdg rmdisk c1t0d0s2
9) What is a Sub-Disk ?
A VM Disks can be divided into one or more sub-disks.
The default name for VM disk is disk ## (such as disk01)
Default name for sub-disk is disk ## – ##
for eg. disk01-01 is the first sub-disk on the VMdisk named disk01.
10) What is Plex ?
You can organise sub-disks to form a plex by using below methods :
Concatenation
Striping (RAID – 0 )
Mirroring (RAID – 1)
Striping with Parity (RAID – 5)
11) Understaning Physical Disks in Sun o/s ?
c# Specifies the Controller
t# Specifies the Target ID
d# Specifies the Disk
s# Specifies the Partition or slice
For eg. c0t0d0s2 , is the entire hardisk connected to controller number 0 in the system,
with target ID of 0, and Physical Disk number 0.

April 22, 2007

Veritas Cluster – Commands

Filed under: Veritas — sriram003 @ 7:22 am
VRTSvcs        VERITAS Cluster ServerVRTSvcswz      VERITAS Cluster Server WizardVRTScsga       VERITAS Cluster Server Graphical AdministratorVRTSgab        VERITAS Group Membership and Atomic BroadcastVRTSllt        VERITAS Low Latency TransportVRTSvcsor      VERITAS Cluster Server Oracle Enterprise ExtensionVRTSvcssy      VERITAS Cluster Server Sybase Enterprise ExtensionVRTSperl       VERITAS Perl for VRTSvcs

Cluster        Name of your HA environmentNodes          Physical systems that make up the clusterService group  Abstract container of related resourcesResource       Cluster components (i.e. NICs, IPs, disk groups,              volumes, mounts, processes, etc...)Attributes     Parameter values that define the resourcesDependencies   Links between resources or service groups

Cluster Mgr    Cluster Monitor : Log in, add clusters, change preferencesCluster Mgr    Cluster Explorer: Monitor systems, service grps,                                resources, attributes & dependenciesCluster Mgr    Log Desk        : Monitor log messages received                                from engine, view GUI commandsCluster Mgr    Command Center  : Build VCS commands and send to engineLLT            Low Latency transport provides fast kernel-kernel              comm. & monitors network connx.GAB            Grp membership & Atomic Broadcast maintains a synch.              state & monitors disk comm.

Config files   VCS etc directory                  $VCSETC=/etc/VRTSvcsConfig files   VCS configuration directories                $VCSCONF=/etc/VRTSvcs/conf/configBinary files   VCS opt directory              $VCSOPT=/opt/VRTSvcsBinary files   VCS binary path              $VCSBIN=/opt/VRTSvcs/binLog files      VCS log path              $VCSLOG=/var/VRTSvcs/logConfig files   VCS configuration file              /etc/VRTSvcs/conf/config/main.cfLLT tab file   LLT configuration file              /etc/llttabLLT hosts file LLT host name database             /etc/llthostsGAB file       Grp membership & Atomic Broadcast file              /etc/gabtab

quick-start    VCS Quick-start wizard              # $VCS_HOME/wizards/config/quick_startquick-NFS      VCS Quick-NFS wizard              # $VCS_HOME/wizards/services/quick_nfsllt            Verify LLT                                          # /sbin/llstat -nllt            Get interface MAC Address              # /opt/VRTSllt/getmac device_namellt            Check network connectivity              # /opt/VRTSllt/dlpiping -s|-c -v device_namegab            Verify GAB              # /sbin/gabconfig -a ; /sbin/gabconfig -lhasys          List systems in cluster              # /opt/VRTSvcs/bin/hasys -listhasys          Detailed info on each cluster node              # /opt/VRTSvcs/bin/hasys -display (sysname)hasys          Increase system count in gabtab startup              # /opt/VRTSvcs/bin/hasys -add (sysname)hasys          Delete a system              # /opt/VRTSvcs/bin/hasys -delete (sysname)hastart        Start VCS cluster              # /opt/VRTSvcs/bin/hastarthastart        Force start a stale VCS cluster                # /opt/VRTSvcs/bin/hastart -force -stalehastop         Stop VCS on all systems               # /opt/VRTSvcs/bin/hastop -allhastop         Stop VCS had, keep srvc-groups running              # /opt/VRTSvcs/bin/hastop -local -forcehastop         Stop VCS, migrate srvc-groups to sysname              # /opt/VRTSvcs/bin/hastop -sys (sysname) -evacuatehastatus       Provide continual status of service grps              # /opt/VRTSvcs/bin/hastatushastatus       Verify status of service groups              # /opt/VRTSvcs/bin/hastatus -summaryhacf           Check for syntax errors in main.cf         # /opt/VRTSvcs/bin/hacf -verify /etc/VRTSvcs/conf/config/main.cfhacf           Generate dependency tree in main.cf         # /opt/VRTSvcs/bin/hacf -generate /etc/VRTSvcs/conf/config/main.cf

hares          List all resources                # /opt/VRTSvcs/bin/hares -listhares          List a resource's dependencies              # /opt/VRTSvcs/bin/hares -dep (resource_name)hares          Get detailed info on a resource              # /opt/VRTSvcs/bin/hares -display (resource)hares          Add a resource         # /opt/VRTSvcs/bin/hares -add (resource_name (resource_type (service_group)hares          Modify attributes of the new resource           # /opt/VRTSvcs/bin/hares -modify (resource_name (attribute_name (value)hares          Delete a resource              # /opt/VRTSvcs/bin/hares -delete (resource_name)hares          Online a resource              # /opt/VRTSvcs/bin/hares -online (resource_name) -sys (system_name)hares          Offline a resource              # /opt/VRTSvcs/bin/hares -offline (resource_name) -sys (system_name)hares          Monitor resource on a system              # /opt/VRTSvcs/bin/hares -probe (resource_name) -sys (system_name)hares          Clear a faulted resource              # /opt/VRTSvcs/bin/hares -clear (resource_name) [-sys system_name]hares          Make a resource's attribute value local              # /opt/VRTSvcs/bin/hares -local (resource_name) (attribute_name) value)hares          Make a resource's attribute value global              # /opt/VRTSvcs/bin/hares -global (resource_name) (attribute_name) value)hares          Specify a dependency between 2 resources              # /opt/VRTSvcs/bin/hares -link (parent_res) (child_res)hares          Remove dependency between 2 resources              # /opt/VRTSvcs/bin/hares -unlink (parent_res) (child_res)hares          Modify a Share res. by adding options         # /opt/VRTSvcs/bin/hares Share_cicgt-as4-p_apps Options "%-o rw,root=dcsa-cln1"

hagrp          List all service groups                # /opt/VRTSvcs/bin/hagrp -listhagrp          List a service group's resources               # /opt/VRTSvcs/bin/hagrp -resources [service_group]hagrp          List a service group's dependencies              # /opt/VRTSvcs/bin/hagrp -dep [service_group]hagrp          Detailed info about a service group              # /opt/VRTSvcs/bin/hagrp -display [service_group]hagrp          Start service group, bring res. online              # /opt/VRTSvcs/bin/hagrp -online (service_group) -sys (system_name)hagrp          Stop service group, bring res. offline              # /opt/VRTSvcs/bin/hagrp -offline (service_group) -sys (system_name)

hagrp          Switch service group between nodes               # /opt/VRTSvcs/bin/hagrp -switch (service_group) -to (system_name)hagrp          Freeze svcgroup, (disable onl. & offl.)              # /opt/VRTSvcs/bin/hagrp -freeze (service_group) [-persistent]hagrp          Thaw a svcgroup, (enable onl. & offl.)              # /opt/VRTSvcs/bin/hagrp -unfreeze (service_group) [-persistent]hagrp          Enable a service group              # /opt/VRTSvcs/bin/hagrp -enable (service_group) [-sys system_name]hagrp          Disable a service group              # /opt/VRTSvcs/bin/hagrp -disable (service_group) [-sys system_name]hagrp          Enable all resources in a service group               # /opt/VRTSvcs/bin/hagrp -enableresources (service_group)hagrp          Disable all resources in a service group              # /opt/VRTSvcs/bin/hagrp -disableresources (service_group)hagrp          Specify dependenciy between 2 svc groups          # /opt/VRTSvcs/bin/hagrp -link (parent_group) (child_group) (relationship)hagrp          Remove dependenciy between 2 svc groups          # /opt/VRTSvcs/bin/hagrp -unlink (parent_group) (child_group)hagrp          Auto-Enable a servicegroup marked          # /opt/VRTSvcs/bin/hagrp -autoenable (service_group) [-sys system_name]            disabled due to prob with system_name.

hatype         List resource types              # /opt/VRTSvcs/bin/hatype -listhatype         Detailed info on a resource type              # /opt/VRTSvcs/bin/hatype -display (resource_type)hatype         List all resources of a part. type              # /opt/VRTSvcs/bin/hatype -resources (resource_type)hatype         Add a resource type              # /opt/VRTSvcs/bin/hatype -add (resource_type)hatype         Set static attribute values              # /opt/VRTSvcs/bin/hatype -modify ...hatype         Delete a resource type              # /opt/VRTSvcs/bin/hatype -delete (resource_type)haattr         Add Attribute to a Type definition              # /opt/VRTSvcs/bin/haattr -add (resource_type) (attribute_name) /              (attribute_type -integer, -string, -vector)haattr         Delete a Entry in a Type definition              # /opt/VRTSvcs/bin/haattr -delete (resource_type) (attribute_name)haconf         Set VCS configuration file to r/w mode              # /opt/VRTSvcs/bin/haconf -makerwhaconf         Set VCS configuration file to read mode               # /opt/VRTSvcs/bin/haconf -dump -makerohauser         Add a user with r/w access to VCS              # /opt/VRTSvcs/bin/hauser -add (user_name)hauser         Add a user with read access only to VCS               # /opt/VRTSvcs/bin/hauser -add VCSGuesthauser         Update a user               # /opt/VRTSvcs/bin/hauser -update (user_name)hauser         Delete a user                # /opt/VRTSvcs/bin/hauser -delete (user_name)hauser         Display all users               # /opt/VRTSvcs/bin/hauser -displayhaagent        Start agents manually              # haagent -start (agent_name) -sys (system_name)haagent        Stop agents manually              # haagent -stop (agent_name) -sys (system_name)hagui          Start Cluster Manager                  # /opt/VRTSvcs/bin/haguihagui          Start Cluster Manager in debug mode               # /opt/VRTSvcs/bin/hagui -D

Product Terminology comparisonsSun SC 2.2   Veritas VCS 1.1------------------------------------------------------cluster name                    cluster nameadmin workstation               -physical node A                 local systemphysical node B                 remote systemphysical node IP address        maintenance IP addresslogical host                    service grouplogical host IP address         service group IP address-                               resourcesdisk group                      disk groupprivate heartbeats              communication channels-                               GAB disk (disk heartbeat)Quorum disk                     -Admin filesystem                -scinstall                       Quick-Start wizard split-brain                     network partition

configuration files:                             /etc/llthosts                             /etc/llttab                             /etc/gabtab                             /etc/VRTSvcs/conf/config/main.cf                             /etc/VRTSvcs/conf/config/sysname

April 20, 2007

Veritas Volume Manager – Setup

Filed under: VCS, Veritas — sriram003 @ 5:06 pm

Veritas Volume Manager allows you to add more disk
space to existing servers.

It could be by way of storage device like EMC
or an additional Hardisk.

Assuming that we need to create filesystems intended for
an Application and:

We have 9 disks, c0t0d1 through ………………..c0t0d9.

First Check if Veritas Volume Manager has seen the Disks
that you have attached :
#vxdisk -o alldgs list

if not, try the following, and then repeat the previous step:

#devfsadm

#vxdctl initdmp

#vxdctl enable

This should be able to detect disks into VVM.

Steps for setting up storage – Veritas Volume Manager

1) It is important to create a diskgroup, so that VVM can be
moved to a different hosts.

Disk Groups includes filesystems/disks of the applcations.
Commands (vxdiskadd or vxdg).

#vxdg init diskgroup diskname=device

example:
#vxdg init ABCdg ABCdg01=c0t0d1

2) Creating Volumes with vxassist:

# vxassist -g diskgroup make vol_name size

example:

#vxassist -g ABCdg make ABC01 8g

Note: Understanding the contents of the /etc/default/vxassist file is important, especially when striping disks.

3) Creating a VXFS filesystem:

#mkfs -F vxfs -o bsize=8192,largefiles /dev/vx/rdsk/ABCdg/ABC01

4) Mounting the VXFS file system.

Creating and mounting filesystems go hand in hand. You must be certain that any special flags set at creation time are reflected in /etc/vfstab, or on the command line if there is no entry in vfstab for your filesystem.

mount -F vxfs -o largefiles /dev/vx/dsk/ABCdg/ABC01 /u03/oradata/ABC

Please check this link for more reference …
http://www.blight.com/~rick/veritas/cheat.html

Note : In Case of emergency if you need to move your entire VVM to a
different host then vxdg ‘deport’ and ‘import‘ commands to
migrate an entire vxvm disk group to another host.

PS : I have VVM pdf , complete summary of commands ,
let me know if interested, I can send it across.

Veritas Volume Manager – Installation Guide

Filed under: VCS, Veritas — sriram003 @ 4:16 pm

Veritas Volume Manager is also called (VVM or VxVM )

Features :
1) VVM is Available for – Windows. Linux, HP-UX, Solaris, AIX.
2) Versions (3.1, 3.2, 3.5, 4.0, 4.1, 5.0).

Installing Veritas Volume Manager

  1. Insert the Veritas volume manager software cdrom into
    the cdrom drive. If volume management is enabled, it will
    automatically mount to /cdrom/volume_manager3.5
    (depending on the precise release iteration, the exact path
    may differ in your case):

  2. Change to the directory containing the Veritas Volume Manager packages:
    # cd /cdrom/volume_manager3.5/pkgs

  3. Add the required packages.
    Note that the order specified is
    siginificant in that the VRTSvlic package must be first,
    the VRTSvxvm package must be second, and then any
    remaining packages:
    #pkgadd -d . VRTSvlic VRTSvxvm VRTSvmdoc \
    VRTSvmman VRTSob VRTSobgui VRTSvmpro \
    VRTSfspro VRTSvxfs VRTSfsdoc

Once the Installation is complete as you see below:

** IMPORTANT NOTICE ***      This machine must now be rebooted in order to ensure      sane operation.  Execute             shutdown -y -i6 -g0      and wait for the "Console Login:" prompt.# shutdown -y -i6 -g0

Give the above command as it appears in the console.Once the system reboots, apply any Veritas volume manager    patches. At the time of this writing, there are no patches    for neither volume manager or filesystem. However, future    patches (and there will be patches ;-)  can be obtained from    http://seer.support.veritas.com.    Note that the patch installation instructions may require    that a reboot be performed after the patch is installed

Blog at WordPress.com.