Showing posts with label veritas. Show all posts
Showing posts with label veritas. Show all posts

Wednesday, May 29, 2013

How to scan and detect new luns in Linux (Veritas and EMC)

When new luns are become available for the server they are not being picked up automatically.
Simplest way - reboot the box.
More elegant way - scan for new luns and add them to existing configuration online.

On most of the distributions you may find rescan-scsi-bus.sh script which is responsible for triggering rescan.

Next - verify the current config - check how many luns are currently configured:
# powermt display
Symmetrix logical device count=121
CLARiiON logical device count=0
HP xp logical device count=0
Ess logical device count=0
Invista logical device count=0
=====================================================================
---- Host Bus Adapters ---- ---- I/O Paths -----  ------ Stats -----
###  HW Path               Summary   Total   Dead  IO/Sec Q-IOs Errors
=====================================================================
   2 lpfc                  optimal     242      0       -     0      0

   3 lpfc                  optimal     242      0       -     1      0

For more detailed output you may run:
# powermt display dev=all

To detect new luns and add them to the configuration run:
# powermt config
# powermt save
# powermt display
You should now see a more luns in the output.

Additionally if you're using Veritas Storage Foundation you may scan for new disk devices by triggering:
# vxdisk scandisks new
New devices will be visible and in "error" state (you will need to initialize them later):
# vxdisk -o alldgs list
DEVICE       TYPE            DISK         GROUP        STATUS
cciss/c0d0   auto:none       -            -            online invalid
emcpowera   auto:cdsdisk    -            (datadg)  online
emcpowerb    auto:cdsdisk    -            (datadg)  online
emcpowerc   auto:cdsdisk    -            (datadg)  online
emcpowerd   auto:cdsdisk    -            (datadg)  online
emcpowere   auto:cdsdisk    -            (datadg)  online
emcpowerf   auto            -            -            error
emcpowerg   auto            -            -            error
emcpowerh   auto            -            -            error
emcpoweri   auto            -            -            error

Sunday, May 12, 2013

How to rename VCS resource or service group name

Recently I had to rename some service groups in my Veritas Cluster without restarting services running under its control.
I was little nervous because there was a huge database import ongoing I couldn't interrupt it.
Both hagrp and hares commands do not have built-in functionality to rename group/resource.
However there is an easy way of changing names without having cluster resources impacted.

First you need to stop the cluster using:
hastop -all -force
Important part is the "-force" option which allows cluster-controlled resources to stay online.
Now you can modify /etc/VRTSvcs/conf/config/main.cf file and change the name of group/resource.
Make sure it's changed everywhere (so if you have some dependencies or huge main.cf file it's best to search for every occurance of the original group/resource name).

Check if the modified config is still valid:
hacf -verify /etc/VRTSvcs/conf/config

If it's fine distribute new main.cf file to the other cluster nodes and start up cluster:
hastart

Finally verify if the new names are visible under running cluster:
hastatus -summary