Jul 182007

Data Services in the Cluster

HAStoragePlus helps configure a local filesystem into a highly available one. It provides following capabilities:

  • additional filesystem checks
  • mounts and unmounts
  • enables Sun cluster to failover local file systems (to failover, local file system must reside on global dgs with affinity switchovers enabled)

Data Service Agent — is a specially written software that allows a data service in a cluster to operate properly.

Data Service Agent (or Agent) does the following to a standard application:

  • stop/start application
  • monitor faults
  • validate configuration
  • provides a registration information file that allows Sun Cluster to store all the info about the methods.

Sun Cluster 2.x runs Fault Monitoring components on failover node, and can initiate a takeover. On Cluster 3.x software, it is not allowed. Monitor can either monitor to restart or failover on primary (active host) node.

Failover resource groups:

Logical host resource — SUNW.Logicalhostname Data Storage Resource — SUNW.HAStoragePlus NFS resource — SUNW.nfs

Shutdown a resource group:

<span style="font-size:85%;">scswitch -F -g <rgname><br /><span class="anchor" id="line-534"></span></span>

Turn on a resourec group:

<span style="font-size:85%;">scswitch -Z -g <rgname><br /><span class="anchor" id="line-540"></span></span>

Switch a failover group over to another node:

<span style="font-size:85%;">scswitch -z -g <rgname> -h <node><br /><span class="anchor" id="line-546"></span></span>

Restart a resource group:

<span style="font-size:85%;">scswitch -R -h <node> -g <rgname><br /><span class="anchor" id="line-552"></span></span>

Evacuate all resources and rgs from a node:

<span style="font-size:85%;">scswitch -S -h node<br /><span class="anchor" id="line-558"></span></span>

Disable a res and it’s fault monitor:

<span style="font-size:85%;">scswitch -n -j <resource><br /><span class="anchor" id="line-564"></span></span>

Enable a resource and it’s fault monitor:

<span style="font-size:85%;">scswitch -e -j <res><br /><span class="anchor" id="line-570"></span></span>

Clear the STOP_FAILED flag:

<span style="font-size:85%;">scswitch -c -j <resname> -h <nodename> -f STOP_FAILED<br /><span class="anchor" id="line-576"></span></span>

How to add a diskgroup and voluem to Cluster configuration

1. Create the disk group and volume.

2. Register the local disk group with the cluster.

<span style="font-size:85%;">        root@aesnsra1:../ # scconf -a -D type=vxvm,name=patroldg2,nodelist=aesnsra2<br /><span class="anchor" id="line-585"></span>        root@aesnsra2:../ # scswitch -z -h aesnsra2 -D patroldg2<br /><span class="anchor" id="line-586"></span></span>

3. Create your file system.

4. Update /etc/vfstab to change ‘-‘ boot options

  • example:

<span style="font-size:85%;">        /dev/vx/dsk/patroldg2/patroldg02 /dev/vx/rdsk/patroldg2/patroldg02 /patrol02 vxfs 3 no suid<br /><span class="anchor" id="line-594"></span></span>

5. Set up a resource group with a HAStoragePlus resource for local filesystem:

<span style="font-size:85%;">        root@aesnsra2:../ # scrgadm -a -g aescib1-hastp-rg -h aescib1<br /><span class="anchor" id="line-599"></span>        root@aesnsra2:../ # scrgadm -a -g aescib1-hastp-rg -j sapmntdg01-rs -t SUNW.HAStoragePlus -x FilesystemMountPoints=/sapmnt<br /><span class="anchor" id="line-600"></span></span>

6. Bring the resource group online which will mount the specified filesystem:

<span style="font-size:85%;">        root@aesnsra2:../ # scswitch -Z -g hastp-aesnsra2-rg<br /><span class="anchor" id="line-605"></span></span>

7. Enable resource

<span style="font-size:85%;">        root@aesnsra2:../# scswitch -e -j osdumps-dev-rs<br /><span class="anchor" id="line-610"></span></span>

Optional step:

8. reboot and test.

Fault monitor operations

Disable the fault monitor for a resource:

<span style="font-size:85%;">scswitch -n -M -j <resname><br /><span class="anchor" id="line-621"></span></span>

Enable the Fault monitor for a resource:

<span style="font-size:85%;">scswitch -e  -M -j <resname><br /><span class="anchor" id="line-627"></span></span>

<span style="font-size:85%;">scstat -g       #shows status of all resource groups<br /><span class="anchor" id="line-631"></span></span>

Using scrgadm to register and configure Data service software


<span style="font-size:85%;">scrgadm -a -t SUNW.nfs<br /><span class="anchor" id="line-639"></span><br /><span class="anchor" id="line-640"></span>scrgadm -a -t SUNW.HAStoragePlus<br /><span class="anchor" id="line-641"></span>scrgadm -p<br /><span class="anchor" id="line-642"></span></span>

Create a fail over res:

<span style="font-size:85%;">scrgadm -a -f nfs-rg -h node1,node2 \<br /><span class="anchor" id="line-648"></span>-y Pathprefix=/global/nfs/admin<br /><span class="anchor" id="line-649"></span></span>

Add logical host name res to rg:

<span style="font-size:85%;">scrgadm -a -L -g nfs-rg -l clustername-nfs<br /><span class="anchor" id="line-655"></span></span>

Create a HAStoragePlus res:

<span style="font-size:85%;">scrgadm -a -j nfs-stor -g nfs-rg \<br /><span class="anchor" id="line-661"></span>-t SUNW.HAStoragePlus \<br /><span class="anchor" id="line-662"></span>-x FilesystemMountpoints=/global/nfs -x AffinityOn=True<br /><span class="anchor" id="line-663"></span></span>

Create SUNW.nfs resource:

<span style="font-size:85%;">scrgadm -a -j nfs-res -g nfs-rg \<br /><span class="anchor" id="line-669"></span>-t SUNW.nfs -y Resource_dependencies=nfs-stor<br /><span class="anchor" id="line-670"></span></span>

Print the various resource/resource group dependencies via scrgadm:

<span style="font-size:85%;">scrgadm -pvv|grep -i depend     #And then parse this output<br /><span class="anchor" id="line-676"></span></span>

Enable res and res monitors, manage rg and switch rg to online state:

<span style="font-size:85%;">scswitch -Z -f nfs-rg<br /><span class="anchor" id="line-682"></span><br /><span class="anchor" id="line-683"></span>scstat -g<br /><span class="anchor" id="line-684"></span></span>

Show current RG configuration:

<span style="font-size:85%;">scrgadm -p[v[v]] [ -t resource_type_name ] [ -g resgrpname ] \<br /><span class="anchor" id="line-690"></span>[ -j resname ]<br /><span class="anchor" id="line-691"></span></span>

Resizing a VxVM/VxfS vol/fs under sun cluster

<span style="font-size:85%;"># vxassist -g aesnfsp growby saptrans 5g<br /><span class="anchor" id="line-698"></span><br /><span class="anchor" id="line-699"></span># scconf -c -D name=aesnfsp,sync<br /><span class="anchor" id="line-700"></span><br /><span class="anchor" id="line-701"></span>root@aesrva1:../ # vxprint -g aesnfsp -v saptrans<br /><span class="anchor" id="line-702"></span>TY NAME         ASSOC        KSTATE   LENGTH   PLOFFS   STATE    TUTIL0  PUTIL0<br /><span class="anchor" id="line-703"></span>v  saptrans     fsgen        ENABLED  188743680 -       ACTIVE   -       -<br /><span class="anchor" id="line-704"></span><br /><span class="anchor" id="line-705"></span>root@aesrva1:../ # fsadm -F vxfs -b 188743680 /saptrans<br /><span class="anchor" id="line-706"></span>UX:vxfs fsadm: INFO: /dev/vx/rdsk/aesnfsp/saptrans is currently 178257920 sector<br /><span class="anchor" id="line-707"></span>s - size will be increased<br /><span class="anchor" id="line-708"></span><br /><span class="anchor" id="line-709"></span># root@aesrva1:../ # scconf -c -D name=aesnfsp,sync<br /><span class="anchor" id="line-710"></span></span>

Command Quick Reference

<span style="font-size:85%;">scstat<br /><span class="anchor" id="line-717"></span><br /><span class="anchor" id="line-718"></span>scconf<br /><span class="anchor" id="line-719"></span><br /><span class="anchor" id="line-720"></span>scrgadm<br /><span class="anchor" id="line-721"></span><br /><span class="anchor" id="line-722"></span>scha_<resource><br /><span class="anchor" id="line-723"></span><br /><span class="anchor" id="line-724"></span>scdidadm<br /><span class="anchor" id="line-725"></span></span>

Sun Terminal Concentrator (Annex NTS)

Enable setup mode by pressing TC test button until TC power indicator starts to blink rapidly, then release the button and press it briefly.

On entering the Setup mode, a “monitor:” prompt is displayed.

Set up IP address using:

<span style="font-size:85%;">monitor::addr<br /><span class="anchor" id="line-737"></span></span>

Setting up Load source:

<span style="font-size:85%;">monitor::seq<br /><span class="anchor" id="line-743"></span></span>

Specifying image:

<span style="font-size:85%;">monitor::image<br /><span class="anchor" id="line-749"></span></span>

<span style="font-size:85%;">Telnet into the TC IP address:<br /><span class="anchor" id="line-753"></span><br /><span class="anchor" id="line-754"></span>enter "cli"<br /><span class="anchor" id="line-755"></span><br /><span class="anchor" id="line-756"></span>Elevate to privileged acct using "su"<br /><span class="anchor" id="line-757"></span><br /><span class="anchor" id="line-758"></span>Run "admin" at the TC OS prompt:<br /><span class="anchor" id="line-759"></span><br /><span class="anchor" id="line-760"></span>get admin: subprompt:<br /><span class="anchor" id="line-761"></span><br /><span class="anchor" id="line-762"></span>show port=1 type mode<br /><span class="anchor" id="line-763"></span>set port=<num> type <hardwired> mode <cli> #Choose various options<br /><span class="anchor" id="line-764"></span>quit (to exit the boot prompt)<br /><span class="anchor" id="line-765"></span>boot</span><br />

 Posted by at 8:53 pm

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>