Monday, November 17, 2008

VCS / SFRAC

VCS

Veritas Cluster

LLT and GRAB

VCS uses two components, LLT and GAB to share data over the private networks among systems.
These components provide the performance and reliability required by VCS.
LLT LLT (Low Latency Transport) provides fast, kernel-to-kernel comms and monitors network connections. The system admin configures the LLT by creating a configuration file (llttab) that describes the systems in the cluster and private network links among them. The LLT runs in layer 2 of the network stack
GAB GAB (Group membership and Atomic Broadcast) provides the global message order required to maintain a synchronised state among the systems, and monitors disk comms such as that required by the VCS heartbeat utility. The system admin configures GAB driver by creating a configuration file ( gabtab).

LLT and GAB files

/etc/llthosts


The file is a database, containing one entry per system, that links the LLT system ID with the hosts name. The file is identical on each server in the cluster.

/etc/llttab


The file contains information that is derived during installation and is used by the utility lltconfig.

/etc/gabtab


The file contains the information needed to configure the GAB driver. This file is used by the gabconfig utility.

/etc/VRTSvcs/conf/config/main.cf


The VCS configuration file. The file contains the information that defines the cluster and its systems.

Gabtab Entries

/sbin/gabdiskconf - i /dev/dsk/c1t2d0s2 -s 16 -S 1123
/sbin/gabdiskconf - i /dev/dsk/c1t2d0s2 -s 144 -S 1124
/sbin/gabdiskhb -a /dev/dsk/c1t2d0s2 -s 16 -p a -s 1123
/sbin/gabdiskhb -a /dev/dsk/c1t2d0s2 -s 144 -p h -s 1124
/sbin/gabconfig -c -n2

gabdiskconf


-i Initialises the disk region
-s Start Block
-S Signature
gabdiskhb (heartbeat disks)


-a Add a gab disk heartbeat resource
-s Start Block
-p Port
-S Signature
gabconfig


-c Configure the driver for use
-n Number of systems in the cluster.

LLT and GAB Commands
Verifying that links are active for LLT lltstat -n
verbose output of the lltstat command lltstat -nvv | more
open ports for LLT lltstat -p
display the values of LLT configuration directives lltstat -c
lists information about each configured LLT link lltstat -l
List all MAC addresses in the cluster lltconfig -a list
stop the LLT running lltconfig -U
start the LLT lltconfig -c
verify that GAB is operating

gabconfig -a

Note: port a indicates that GAB is communicating, port h indicates that VCS is started
stop GAB running gabconfig -U
start the GAB gabconfig -c -n
override the seed values in the gabtab file gabconfig -c -x

GAB Port Memberbership
List Membership

gabconfig -a
Unregister port f /opt/VRTS/bin/fsclustadm cfsdeinit
Port Function a gab driver
b I/O fencing (designed to guarantee data integrity)
d ODM (Oracle Disk Manager)
f CFS (Cluster File System)
h VCS (VERITAS Cluster Server: high availability daemon)
o VCSMM driver (kernel module needed for Oracle and VCS interface)
q QuickLog daemon
v CVM (Cluster Volume Manager)
w vxconfigd (module for cvm)

Cluster daemons
High Availability Daemon had
Companion Daemon hashadow
Resource Agent daemon Agent
Web Console cluster managerment daemon CmdServer

Cluster Log Files
Log Directory /var/VRTSvcs/log
primary log file (engine log file) /var/VRTSvcs/log/engine_A.log

Starting and Stopping the cluster

"-stale" instructs the engine to treat the local config as stale
"-force" instructs the engine to treat a stale config as a valid one
hastart [-stale|-force]

Bring the cluster into running mode from a stale state using the configuration file from a particular server
hasys -force
stop the cluster on the local server but leave the application/s running, do not failover the application/s hastop -local
stop cluster on local server but evacuate (failover) the application/s to another node within the cluster hastop -local -evacuate

stop the cluster on all nodes but leave the application/s running
hastop -all -force

Cluster Status
display cluster summary hastatus -summary
continually monitor cluster hastatus
verify the cluster is operating hasys -display

Cluster Details
information about a cluster haclus -display
value for a specific cluster attribute haclus -value
modify a cluster attribute haclus -modify
Enable LinkMonitoring haclus -enable LinkMonitoring
Disable LinkMonitoring haclus -disable LinkMonitoring

Users
add a user hauser -add
modify a user hauser -update
delete a user hauser -delete
display all users hauser -display

System Operations
add a system to the cluster hasys -add
delete a system from the cluster hasys -delete
Modify a system attributes hasys -modify
list a system state hasys -state
Force a system to start hasys -force
Display the systems attributes hasys -display [-sys]
List all the systems in the cluster hasys -list
Change the load attribute of a system hasys -load
Display the value of a systems nodeid (/etc/llthosts) hasys -nodeid
Freeze a system (No offlining system, No groups onlining)

hasys -freeze [-persistent][-evacuate]

Note: main.cf must be in write mode
Unfreeze a system ( reenable groups and resource back online)

hasys -unfreeze [-persistent]

Note: main.cf must be in write mode

Dynamic Configuration

The VCS configuration must be in read/write mode in order to make changes. When in read/write mode the
configuration becomes stale, a .stale file is created in $VCS_CONF/conf/config. When the configuration is put
back into read only mode the .stale file is removed.
Change configuration to read/write mode haconf -makerw
Change configuration to read-only mode haconf -dump -makero
Check what mode cluster is running in

haclus -display |grep -i 'readonly'

0 = write mode
1 = read only mode
Check the configuration file

hacf -verify /etc/VRTS/conf/config

Note: you can point to any directory as long as it has main.cf and types.cf
convert a main.cf file into cluster commands hacf -cftocmd /etc/VRTS/conf/config -dest /tmp
convert a command file into a main.cf file

hacf -cmdtocf /tmp -dest /etc/VRTS/conf/config

Service Groups
add a service group haconf -makerw
hagrp -add groupw
hagrp -modify groupw SystemList sun1 1 sun2 2
hagrp -autoenable groupw -sys sun1
haconf -dump -makero
delete a service group haconf -makerw
hagrp -delete groupw
haconf -dump -makero
change a service group

haconf -makerw
hagrp -modify groupw SystemList sun1 1 sun2 2 sun3 3
haconf -dump -makero

Note: use the "hagrp -display " to list attributes
list the service groups hagrp -list
list the groups dependencies hagrp -dep
list the parameters of a group hagrp -display
display a service group's resource hagrp -resources
display the current state of the service group hagrp -state
clear a faulted non-persistent resource in a specific grp hagrp -clear [-sys]
Change the system list in a cluster

# remove the host
hagrp -modify grp_zlnrssd SystemList -delete

# add the new host (don't forget to state its position)
hagrp -modify grp_zlnrssd SystemList -add 1

# update the autostart list
hagrp -modify grp_zlnrssd AutoStartList

Service Group Operations
Start a service group and bring its resources online hagrp -online -sys
Stop a service group and takes its resources offline hagrp -offline -sys
Switch a service group from system to another hagrp -switch to
Enable all the resources in a group hagrp -enableresources
Disable all the resources in a group hagrp -disableresources
Freeze a service group (disable onlining and offlining)

hagrp -freeze [-persistent]

note: use the following to check "hagrp -display | grep TFrozen"
Unfreeze a service group (enable onlining and offlining)

hagrp -unfreeze [-persistent]

note: use the following to check "hagrp -display | grep TFrozen"
Enable a service group. Enabled groups can only be brought online

haconf -makerw
hagrp -enable [-sys]
haconf -dump -makero

Note to check run the following command "hagrp -display | grep Enabled"
Disable a service group. Stop from bringing online

haconf -makerw
hagrp -disable [-sys]
haconf -dump -makero

Note to check run the following command "hagrp -display | grep Enabled"
Flush a service group and enable corrective action. hagrp -flush -sys

Resources
add a resource haconf -makerw
hares -add appDG DiskGroup groupw
hares -modify appDG Enabled 1
hares -modify appDG DiskGroup appdg
hares -modify appDG StartVolumes 0
haconf -dump -makero
delete a resource haconf -makerw
hares -delete
haconf -dump -makero
change a resource

haconf -makerw
hares -modify appDG Enabled 1
haconf -dump -makero

Note: list parameters "hares -display "
change a resource attribute to be globally wide hares -global
change a resource attribute to be locally wide hares -local
list the parameters of a resource hares -display
list the resources hares -list
list the resource dependencies hares -dep

Resource Operations
Online a resource hares -online [-sys]
Offline a resource hares -offline [-sys]
display the state of a resource( offline, online, etc) hares -state
display the parameters of a resource hares -display
Offline a resource and propagate the command to its children hares -offprop -sys
Cause a resource agent to immediately monitor the resource hares -probe -sys
Clearing a resource (automatically initiates the onlining) hares -clear [-sys]

Resource Types
Add a resource type hatype -add
Remove a resource type hatype -delete
List all resource types hatype -list
Display a resource type hatype -display
List a partitcular resource type hatype -resources
Change a particular resource types attributes hatype -value

Resource Agents
add a agent pkgadd -d .
remove a agent pkgrm
change a agent n/a
list all ha agents haagent -list
Display agents run-time information i.e has it started, is it running ? haagent -display
Display agents faults haagent -display |grep Faults

Resource Agent Operations
Start an agent haagent -start [-sys]
Stop an agent haagent -stop [-sys]



SFRAC Setup

== Configure IO Fencing (VXFEN) ==

==== Setup the coordg Diskgroup ====
NOTE: You must have an odd number of VxVM controlled devices in the Coordinator Disk Group or VxFEN will not start:

VxFEN Error Message: VXFEN vxfenconfig ERROR V-11-2-1004 There must be an odd number of coordinator disks defined





If for some reason you have not initialized your LUNs for use with Veritas, you will need to do that with vxdisksetup before you can proceed with this step.

# for x in `vxdisk list | grep FAS | awk '{print $1}'`; do vxdisksetup -fi ${x}; done


Create a diskgroup to house the coordinator disks and add at least 3 luns. When choosing disks to use as coordinator disks, you want to distribute them across both heads on your filer.



# vxdg init coordg disk0=FAS9600_6
# vxdg -g coordg adddisk disk1=FAS9600_7
# vxdg -g coordg adddisk disk2=FAS9601_6
# vxdg deport coordg

==== Setup the VxFEN Configuration Files ====

Run the following on all nodes:

# echo coordg > /etc/vxfentab
# echo coordg > /etc/vxfendg

NOTE: For 5.0, you must setup the /etc/vxfenmode file. This is not required in 4.1.

# cp /etc/vxfen.d/vxfenmode_scsi3_dmp /etc/vxfenmode


==== Start Up Fencing ====

Run the following on all nodes:

# vxdctl enable
# /etc/init.d/vxfen start


==== Verify Fencing Has Started ====

* Run gabconfig -a. You should now see port b as well as port a. You should have an entry for each node of the cluster.

# gabconfig -a

GAB Port Memberships
===============================================================
Port a gen 9d4d01 membership 012
Port b gen 9d4d04 membership 012



* Run vxfenadm -d to show the cluster wide fencing status. You should see an entry for each node in the cluster. If you do not, you should investigate why it didn't start by reviewing the log file on the host at /var/VRTSvcs/log/vxfen.log. NOTE: The output below is from 5.0MP1. 4.1MP1 will not show the lines that start with "Fencing".

# /sbin/vxfenadm -d


I/O Fencing Cluster Information:
================================

Fencing Protocol Version: 201
Fencing Mode: SCSI3
Fencing SCSI3 Disk Policy: dmp
Cluster Members:

* 0 (sunv440-shu04)
1 (sunv440-shu05)
2 (sunv440-shu06)

RFSM State Information:
node 0 in state 8 (running)
node 1 in state 8 (running)
node 2 in state 8 (running)




* Run vxfenadm -G all -f /etc/vxfentab. This will show you the keys for each node. The example below is shortened, but you should see keys for each node on each disk.

# vxfenadm -G all -f /etc/vxfentab



Device Name: /dev/vx/rdmp/c0t0d161s2
Total Number Of Keys: 8
key[0]:
Node ID: 1 Node Name: sunv440-shu05
Key Value:
key[1]:
Node ID: 1 Node Name: sunv440-shu05
Key Value:
key[2]:
Node ID: 1 Node Name: sunv440-shu05
Key Value:
key[3]:
Node ID: 1 Node Name: sunv440-shu05
Key Value:
key[4]:
Node ID: 2 Node Name: sunv440-shu06
Key Value:






== Configure The Cluster To Use SCSI3 Fencing and Start The Cluster ==

The cluster should currently be down. GAB, LLT, and Fencing should be running.

==== Modify the main.cf to add UseFence = SCSI3 ====

# vi /etc/VRTSvcs/conf/config/main.cf

include "types.cf"
include "CFSTypes.cf"
include "CVMTypes.cf"

cluster NAME_OF_CLUSTER (
UserNames = { admin = hllSlkLjlFmfLfiF }
Administrators = { admin }
UseFence = SCSI3 (ADD THIS LINE TO main.cf)
)


==== Distribute the main.cf to the other nodes ====

Do the following for the remaining nodes:

# rcp /etc/VRTSvcs/conf/config/main.cf :/etc/VRTSvcs/conf/config


==== Start the cluster====

Run the following on each node in the cluster:

# hastart


==== Verify That Everything Started ====

# hastatus -sum

-- SYSTEM STATE
-- System State Frozen

A sunv440-shu04 RUNNING 0
A sunv440-shu05 RUNNING 0
A sunv440-shu06 RUNNING 0

# gabconfig -a
GAB Port Memberships
===============================================================
Port a gen 9d4d01 membership 012
Port b gen 9d4d04 membership 012
Port h gen 9d4d07 membership 012


==== Verify That The Cluster Is Using SCSI3 Fencing ====

# haclus -display | grep UseFence

UseFence SCSI3


== Configure The RAC Portion of the Cluster ==

==== Initialize the CVM configuration ====

# cfscluster config

==== Check Cluster Status ====

# cfscluster status

Node : sunv440-shu04
Cluster Manager : running
CVM state : not-running
No mount point registered with cluster configuration


Node : sunv440-shu05
Cluster Manager : running
CVM state : not-running
No mount point registered with cluster configuration


Node : sunv440-shu06
Cluster Manager : running
CVM state : not-running
No mount point registered with cluster configuration


== Setup the SFCS Diskgroup and Volume ==

==== Configure the SFCFS Diskgroup ====

NOTE: This step assumes that you have already initialized the desired luns. The number of luns used in this step is up to the user and test requirements.

# vxdg init SFCFS disk0=
# vxdg -g SFCFS adddisk disk1=
...
...

# vxdg deport SFCFS

==== Import the SFCFS Diskgroup As Shared ====

Determine the master node:

# vxdctl -c mode

mode: enabled: cluster active - MASTER
master: sunv440-shu04

Monday, November 3, 2008

Shell

A simple example using arithmetic expansion:

# repeat a command 100 times
x=100
while [ $x -gt 0 ]
do
command x=$(($x-1))
done

Tuesday, October 14, 2008

Link's

http://www.idevelopment.info/

VCS
http://www.datadisk.co.uk/html_docs/veritas/veritas_cluster_cs.htm

SFRAC Documents
http://sfdoccentral.symantec.com/sf/5.0/hpux/html/sf_rac_install/sfrac_installTOC.html

Monday, October 13, 2008

VxVM

How to resize vxfs volume

Old size
bash-3.2# df -k /oracle/QA2
/oracle/QA2 (/dev/vx/dsk/qa2_oracledg/qa2_oracle_qa2) : 102400 total allocated Kb
0 free allocated Kb
102400 used allocated Kb
100 % allocation used

To remove error
fsadm: You don't have a license to run this program
#/usr/sbin/vxlicrep -e;/sbin/fs/vxfs/vxenablef -a


bash-3.2# vxassist -g qa2_oracledg growby qa2_oracle_qa2 102400

bash-3.2# fsadm -F vxfs -b 204800 -r /dev/vx/rdsk/qa2_oracledg/qa2_oracle_qa2 /oracle/QA2
vxfs fsadm: /dev/vx/rdsk/qa2_oracledg/qa2_oracle_qa2 is currently 102400 sectors - size will be increased
bash-3.2# df -k /oracle/QA2
/oracle/QA2 (/dev/vx/dsk/qa2_oracledg/qa2_oracle_qa2) : 198448 total allocated Kb
96024 free allocated Kb

How to clear the failing flag when a vxdisk list status shows "online failing"
http://seer.support.veritas.com/docs/184960.htm

bash-3.2# vxdisk -o alldgs list
DEVICE TYPE DISK GROUP STATUS
c21t0d6 auto:cdsdisk qa2_mirrlogdg01 qa2_mirrlogdg online failing

bash-3.2# vxedit -g qa2_mirrlogdg set failing=off qa2_mirrlogdg01

bash-3.2# vxdisk -o alldgs list
DEVICE TYPE DISK GROUP STATUS
c21t0d6 auto:cdsdisk qa2_mirrlogdg01 qa2_mirrlogdg online


VCS Port
port What it does and how to stop
------------------------------------
a Communication node-to-node - stopped by stopping gab
b IO Fencing - stopped with /etc/init.d/vxfen stop
d Oracle to Oracle coms in a RAC environment - stop Oracle
f Cluster File System - stop VCS group or kill fsckd
h GAB to VSC (had) communication - hastop
o ODM - stop Oracle, and umount /odm
q qlog (part of cluster filesystem) - stop VCS group
v part of cvm - stop VCS group or vxclustadm stopnode
w part of cvm - stop VCS group or vxclustadm stopnode

/etc/llttab ::
set-node oaprod1 # diff for each node, reflect local node name
set-cluster 1
link ce1 /dev/ce:1 - ether - -
link ce3 /dev/ce:3 - ether - -
link-lowpri ce0 /dev/ce:0 - ether - -

/etc/llthosts ::
0 oaprod1
1 oaprod2

/etc/gabtab ::
/sbin/gabconfig -c -n2



How to Migrate VxVM volume from One storage vendor to another storage vendor

1. As oracle data/logs are on VxVM volume having EMC luns.
For eg. Disk Group = EMCDG, VxVM Volume = EMCVOL

2. Expose NetApp luns using snapdrive storage create command on the host.

3. Add the NetApp luns to the VxVM volume having oracle data/logs, this will make the volume as mirrored vxvm volume and also do auto sync on the luns.
Once the data is synced on NetApp luns , detached the luns from the mirrored volume and make a new volume of NetApp luns for Dev/QA purpose.

Below are the steps:

Add mirror disk i.e NetApp disk in a diskgroup
vxdg -g adddisk disk2=c6t0d1

Add Mirror to the volume
vxassist -b -g EMCDG mirror EMCVOL disk2
[ This will auto sync the data on new NetApp Luns i.e disk2]

See Plex and Subdisk info
vxprint -htg EMCDG

Remove mirror Plex of NetApp subdisk from the volume
vxplex -g EMCDG dis EMCVOL-02

Now create another volume using NetApp subdisk [previously removed mirror] for Dev/QA purpose
vxmake -g EMCDG vol newVol plex=EMCVOL-02
[here data is on the lun , but the newVol is not in start state]

See new volume Plex and Subdisk info
vxprint -htg EMCDG
NOTE : Volume newVol is in DISABLED state

Start the new volume of NetApp subdisk
vxvol -g EMCDG start newVol

Mount the new NetApp luns volume
mkdir /newVOL
mount -F vxfs /dev/vx/dsk/EMCDG/newVol /newVOL/

Check the contents of the volume
ls -lrt /newVOL/
Note : You must find the oracle data/logs dir on the vxvm volume having NetApp luns.

With Layered volume
We can use VxVM layered volume concept, (EMC subvol + NetApp subvol) and than take a snapshot using -hostvol option of NetApp volume which is mirrored of EMC vol.

Here:
Layered Vol = layered_vol
Sub Vols = layered_vol-S01, layered_vol-S02 (Striped across sub volumes, logical entities).
Vols = layered_vol-L01 , layered_vol-L02 (Mirrored volumes over luns).

VxVM:
vxassist -g layered_DG make layered_vol 2g layout=stripe-mirror

SDU Snapshot..
snapdrive snap create -hostvol layered_DG/layered_vol-L01 -snapname layered_snap -force

bash-3.00# vxprint -rth layered_vol
Disk group: layered_DG

dm disk1 c4t500A098383310F03d13s2 auto 65536 1158912 -
dm disk2 c4t500A098383310F03d14s2 auto 65536 1158912 -
dm disk3 c4t500A098383310F03d17s2 auto 65536 2027264 -
dm disk4 c4t500A098383310F03d18s2 auto 65536 2027264 -

v layered_vol - ENABLED ACTIVE 2097152 SELECT layered_vol-03 fsgen
pl layered_vol-03 layered_vol ENABLED ACTIVE 2097152 STRIPE 2/128 RW
sv layered_vol-S01 layered_vol-03 layered_vol-L01 1 1048576 0/0 2/2 ENA
v2 layered_vol-L01 - ENABLED ACTIVE 1048576 SELECT - fsgen
p2 layered_vol-P01 layered_vol-L01 ENABLED ACTIVE 1048576 CONCAT - RW
s2 disk1-02 layered_vol-P01 disk1 0 1048576 0 c4t500A098383310F03d13 ENA
p2 layered_vol-P02 layered_vol-L01 ENABLED ACTIVE 1048576 CONCAT - RW
s2 disk3-02 layered_vol-P02 disk3 0 1048576 0 c4t500A098383310F03d17 ENA
sv layered_vol-S02 layered_vol-03 layered_vol-L02 1 1048576 1/0 2/2 ENA
v2 layered_vol-L02 - ENABLED ACTIVE 1048576 SELECT - fsgen
p2 layered_vol-P03 layered_vol-L02 ENABLED ACTIVE 1048576 CONCAT - RW
s2 disk2-02 layered_vol-P03 disk2 0 1048576 0 c4t500A098383310F03d14 ENA
p2 layered_vol-P04 layered_vol-L02 ENABLED ACTIVE 1048576 CONCAT - RW
s2 disk4-02 layered_vol-P04 disk4 0 1048576 0 c4t500A098383310F03d18 ENA



Monday, September 29, 2008

Solaris

Removing Invalid Disk Device Files (/dev/dsk and /dev/rdsk)

by Jeff Hunter, Sr. Database Administrator

Overview

Whether installing a SCSI controller or even an additional IDE disk to a Sun Solaris machine, the Solaris O/S will:

  • Create Disk Device Files under the Hardware Device Tree (/devices).
  • Create symbolic links in /dev/dsk, /dev/rdsk, and /dev/cfg that point to the devices in the /devices directory.
  • Make entries in the /etc/path_to_inst file.

Things will generally work fine until you decide to remove or move a device in the system. I have had situations where I have run out of devices on a host because of Sun's poor ability to remove invalid (hanging) disk device files after removing a device. This is one area where Sun could really improve. It looks like they are trying new things with the boot -p option but I've only ever seen it remove things once.

There are other times when I simply wanted to replace a certain type of SCSI controller and wanted to reuse the controller ID's from a previously removed card. For example, I have a host (an E450) which had 2 internal controllers (0 and 1) and a dual differential SCSI card installed (controllers 2 and 3). I removed the dual differential SCSI host adapter and decided to replace it with a Single-Ended SCSI host adapter but Solaris would always assign them controller numbers 4 and 5. I wanted the system to reassign controller numbers 2 and 3 for the new host adapter but links still existed for the original dual differential SCSI host adapter.

My intention in this article is to provide several solutions for either renumbering disk device files (SCSI controllers, SCSI disks, IDE controllers, IDE disks, etc.) or simply removing old ones from replaced or removed devices. Please keep in mind that this article has been put together from notes I found during many searches for answers on the Internet. If anyone reading this has other solutions, please email me and I would be happy to post them for others going through this procedure.

Using the devfsadm Command

The devfsadm command was introduced with Solaris 7 and can be found in /usr/sbin/devfsadm. This command is used to maintain the /dev and /devices namespaces. The devfsadm command replaces the previous suite of devfs administration tools including drvconfig(1M), disks(1M), tapes(1M), ports(1M), audlinks(1M), and devlinks(1M). To maintain backwards compatibility, all previous devfs commands are hard links to devfsadm.

In many cases, you only need run the command:

  # devfsadm -C
to invoke the cleanup routines that are not normally invoked to remove dangling logical links.

Manual Methods

The devfsadm command was introduced with Solaris 7. For those running older versions of Solaris (i.e. Solaris 2.6) or simply want to perform all manual steps, this section describes the procedures to do just that.

  1. Make a backup of your /etc/path_to_inst file and then modify the file so that all that exists is the SCSI / IDE reference for the boot drive. Remove all of the "pcipsy" and "glm" entries except for the one that is used by the controller that has the boot drive. Take note of the physical path of the controller you want to renumber.

  2. Remove all /dev/dsk/cX* and /dev/rdsk/cX* files where X is the controller number(s) you want to remove and even those that no longer exist. (In the case of the example I provided on the E450, that would be 2, 3, 4, and 5.)

  3. Remove all /dev/cfg/cX symbolic links where X is the controller(s) you want to remove. Make sure to not remove the controller with the boot drive. (Again, in the case of the example I provided on the E450, that would be 2, 3, 4, and 5.) It turns out this was one of the crucial steps that needed to be complete in order for Solaris to reuse controller numbers 2 and 3. The O/S was not able to reassign both of these controller numbers while the links (/dev/cfg/2 and /dev/cfg/3) still existed.

  4. Remove all files under /devices/* for the controller you want to remove or renumber as indicated in Step #1.

  5. Remove all files in /dev/sdXX* that symbolically link to controller(s) you do not want anymore. This may not be completely necessary, but it does clean things up.

  6. Reboot the server with the "-srv" option:
    ok boot -srv


Solaris Zones

http://www.sun.com/software/solaris/howtoguides/containersLowRes.jsp



Error while changing the user in solaris

unknown:/ # passwd oracer
New Password:
Re-enter new Password:
passwd: oracer does not exist.
Permission denied

Solution
unknown:/ # pwconv
unknown:/ # passwd oracer
New Password:
Re-enter new Password:
passwd: password successfully changed for oracer

Here:
pwconv - installs and updates /etc/shadow with information from /etc/passwd

SVM
How to delete the diskset without owner
metaset -s -P

How to take the diskset
metaset -s -t -f

To remove the stale dgs ( when the corresponding luns got deleted) in SVM:
1. unmount fs ( if it is mounted).
2. cleanup the corresponding entries in vfstab file
3. metaset -s -A disable if u created dg using SDU -> This will relase Autotake feature.
4. metaset -s -r -------> This command release the ownership of the host
5. metaset -s -P ------> This command will delete the dg.


Configuring Telnet / FTP to login as root (Solaris)

Configure Telnet for root logins

Simply edit the file /etc/default/login and comment out the following line as follows:
# If CONSOLE is set, root can only login on that device.
# Comment this line out to allow remote login by root.
#
# CONSOLE=/dev/console

Configure FTP for root logins

First remove the 'root' line from /etc/ftpusers.

Also, don't forget to edit the file /etc/ftpaccess and comment out the 'deny-uid' and 'deny-gid' lines. If the file doesn't exist, there is no need to create it.

NOTE: If you are using Solaris 9 or Solaris 10, the ftp* files are located in /etc/ftpd
/etc/ftpd/ftp*

Friday, September 19, 2008

SAN

AIX : to get OS is 64bit
bash-3.2# getconf -a | grep 64
HARDWARE_BITMODE: 64

Stop NIS services on AIX

To use SMIT type:
# smit ypstartstop


To stop all yp daemons:

# stopsrc -g yp

To start all yp daemons:

# startsrc -g yp

To stop a yp daemon, for example ypbind, individually:

# stopsrc -s ypbind

To start a yp daemon, for example ypserv, individually:

# startsrc -s ypserv



HPUX
If swinstall gives messages like below , than what to do ;
he depot owner, system administrator, or alternate root owner may need to the "swreg" or "swacl" command to give you permission. Or, tomanage applications designed and packaged for nonprivileged mode, see the "run_as_superuser" option in the "sd" man page.

To DO

/sbin/init.d/swagentd stop
/sbin/init.d/swagentd start

Now use swinstall to install software on hpux


Increase Swap Size

AIX
You can use smitty go to logical volume manager --->volume groups
..
then there is last option paging space click on that ..
go to change/show characteristics ..
then add number of additional logical partitions...
be cautious about the same as 1 logical partition = 64 MB
presently u said tha u have 512MB and u wannna 2 GB then
just add logical partition = 24


Solaris
  1. Use mkfile to create a file suitable for a local swap area. For example, to create a 1GB swap file:

        /usr/sbin/mkfile 1024m /swap

    where /swap is the name of the file to be used as swap space. Units for the size can be kilobytes (k), blocks (b), or megabytes (m).

  2. Tell the system to start using the file as swap:

        /usr/sbin/swap -a /swap

    Use swap -l to verify that the swap file has been activated.


Linux
[root@srv-2 /opt]# dd if=/dev/zero of=swapfile bs=1024 count=132207
[root@srv-2 /opt]# chmod 600 swapfile
[root@srv-2 /opt]# mkswap swapfile
Setting up swapspace version 1, size = 135372800 bytes
[root@srv-2 /opt]# swapon swapfile
You can edit /etc/fstab to enable your swap file automatically at boot time.
By adding an entry like this:

/opt/swapfile           swap                    swap    defaults        0 0