About Us

RSInfoMinds, a web based IT Training and Consultancy firm. It is established with high dreams in training people in IT Infrastructure Field. We provide Online and Class Room training in various fields of IT Infrastructure Management.

Join Us: http://www.facebook.com/RSInfoMinds
Mail Us: rsinfominds@gmail.com
Twitter: @RSInfoMinds

We are specialized in the below courses:

Redhat Linux Admin Redhat Linux Cluster
Redhat Virutualization IBM AIX Admin
IBM AIX Virtualization IBM AIX Cluster
HP Unix Admin HP Unix Cluster
HP Unix Virtualization Shell Scripting
Veritas Volume Manager Veritas Cluster
Oracle Core DBA VMWare


We provide training in such a way, So that you get in depth knowledge on the Courses you look for.

And we ensure you are very confident from each and every Techincal aspect that the IT Industry needs and expects from you.

We also conduct Workshops on the latest technology and the real time faculties sharing their work experiences to make you the best.

Monday 17 November 2014

Changing Log Files Location In RHEL

Log files often help System Administrators in finding out important information about System related issues.

In RHEL there are a lot of log files under /var/log like messages ,maillog,faillog,cups and cron etc.

Here we will discuss how can we decide the location of log files and forward appropriate messages to these locations.

In RHEL /etc/syslog.conf is the file responsible for deciding log file location.Open this file and you’ll see it. syslogd is the daemon associated with it and after every change you made to this file you need to restart this daemon.

Now you can make entry in this file as we have done in following examples:

mail.err   /var/log/mailerr will redirect mail error messages to /var/log/mailerr.
*.crit    /var/log/critical will redirect all critical messages to /var/log/critical.
kern.* @viny.example.com   will send all kernel messages to a remote host viny.example.com

The first part in this example is known as Facility and the second is called Priority. Following are some important facilities you can use:

authpriv-Security/authorization messages
cron
kern-kernel messages
lpr-Line printer messages
mail-Mail messages
syslog-Syslog internal messages


Lock User Accounts After Failed Login


Open /etc/pam.d/system-auth file.

Now write these lines just above the line stating auth sufficient pam_unix.so:

auth required pam_tally2.so onerr=fail deny=3

account  required   pam_tally2.so reset

Now the account will be locked after three failed login attempts.

There are various other options you can use like:

unlock_time=100 will unlock the account after 100 seconds.

You can use any value for unlock_time field.

If you don’t use this parameter then you’ll have to manually unlock a locked account using
# pam_tally2 -r -u username command.

lock_time=100 will lock the account for 100 seconds after failed attempts to login.

no_magic_root will avoid locking root account.


Sunday 16 November 2014

VCS Points

Service Group: Collection of dependent Resources
Resource: Anything that the end user requires
Resource Type: Collection of the resources with same type
Agents: To manage the Resource Types (Start,Stop and Monitor)
Service Group Online: Child Resource to Parent Resource
Service Group Offline: Parent Resource to Child Resource

LLT Files
/etc/llthosts
/etc/llttab

GAB Files:
/etc/gabtab

Manipulating Service Groups:
1. hagrp -offline AppSG -sys S1 -localclus --> Offline the AppSG only in S1 system (node)
2. hagrp -offline OracleSG -any --> Offline the OracleSG in all the systems
3. hagrp -online AppSG -sys S2 -localclus --> Online the AppSG in node S2
4. hagrp -switch AppSG -to S1  -->  AppSG will be moved to node S1

Manipulating Resources:
1. hares -offline Oralistener -sys S3  -->  Bring offline the Oralistener resource in node S3
2. hares -online ipres -sys S2  ->  Bring online the ipres resource in node S2

Handling VCS services:
haconf -dump -makero --> sync the RAM's main.cf with hardisk's main.cf and make the status as Readonly

hastop -all --> Stop the application and cluster

hastop -all -force --> Application will be continue running but the cluster service has been stopped
hastop -local --> stop the cluster service in local node

Useful VCS Commands

SERVICE GROUPS AND RESOURCE OPERATIONS:
Configuring service groups
hagrp –add|-delete|-online|-offline group_name

Modifying resources
hares –add|-delete res_name type group
hares –online|-offline res_name –sys system_name

Modifying agents
haagent –start|-stop agent_name –sys system_name

BASIC CONFIGURATION OPERATIONS:
Service Goups
hagrp -modify group_name attribute_name value
hagrp –list group_name
hagrp –value attribute_name

Resources
hares -modify res_name attribute_name value
hares -link res_name res_name


Agents
haagent -display agent_name –sys system_name
hatype –modify

VCS ENGINE OPERATIONS:
Starting had
hastart –force|–stale system_name
hasys –force system_name

Stopping had
hastop –local|-all|-force|-evacuate
hastop –sys system_name

Adding Users
hauser –add user_name

STATUS AND VERIFICATION:
Group Status/Verification
hagrp -display group_name|–state|–resource group_name

Resources Status/Verification
hares -display res_name
hares –list
hares -probe res_name –sys system_name

Agents Status/Verification
haagent –list
haagent -display agent_name –sys system_name
ps –ef|grep agent_name

VCS Status
hastatus –group
LLT Status/Verification
lltconfig –a list
lltstat|lltshow|lltdump

GAB Status/Verification
gabconfig –a
gabdiskhb –l

COMMUNICATION:
Starting and Stopping LLT
lltconfig -U
lltconfig -c
lltconfig -a list

Starting and Stopping GAB
gabconfig –c –n #seed number (eg: gabconfig -c -n 2)
gabconfig –U

Administering Group Services
hagrp –clear|-flush|-switch group_name –sys system_name

Administering Resources
hares –clear|-probe res_name –sys system_name

Administering Agents
haagent -list
haagent -display agent_name –sys system_name

Verify Configuration
hacf –verify

Saturday 15 November 2014

VCS Troubleshooting


Linux Log Files

/var/log/messages : General message and system related stuff
/var/log/auth.log : Authenication logs
/var/log/kern.log : Kernel logs
/var/log/cron.log : Crond logs (cron job)
/var/log/maillog : Mail server logs
/var/log/qmail/ : Qmail log directory (more files inside this directory)
/var/log/httpd/ : Apache access and error logs directory
/var/log/lighttpd/ : Lighttpd access and error logs directory
/var/log/boot.log : System boot log
/var/log/mysqld.log : MySQL database server log file
/var/log/secure or /var/log/auth.log : Authentication log
/var/log/utmp or /var/log/wtmp : Login records file
/var/log/yum.log : Yum command log file.

LLT Port Information

[root@vcs1 /]# lltstat -p
LLT port information:
    Port    Usage        Cookie
      0     GAB_Control  0x0
          opens:     0 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
          connects:  0 1
      7     gab          0x7
          opens:     0 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
          connects:  0 1
     31     gab          0x1F
          opens:     0 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
          connects:  0 1
[root@vcs1 /]#


[root@vcs2 /]# lltstat -p
LLT port information:
    Port    Usage        Cookie
      0     GAB_Control  0x0
          opens:     1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
          connects:  0 1
      7     gab          0x7
          opens:     1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
          connects:  0 1
     31     gab          0x1F
          opens:     1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
          connects:  0 1
[root@vcs2 /]#

So the LLT is configured on 3 links running on the port 0, 7 and 31.

Add a link to LLT

[root@vcs1 /]# lltconfig -t eth2 -d eth2
LLT lltconfig INFO V-14-2-15653 No link type is specified, defaulting to link type "ether"
[root@vcs1 /]# lltconfig -a list
Link 0 (eth0):
  Node   0 vcs1       :   00:0C:29:DE:BA:35  permanent
  Node   1 vcs2       :   00:0C:29:52:9B:FB

Link 1 (eth1):
  Node   0 vcs1       :   00:0C:29:DE:BA:3F  permanent
  Node   1 vcs2       :   00:0C:29:52:9B:05

Link 2 (eth2):
  Node   0 vcs1       :   00:0C:29:DE:BA:49  permanent

[root@vcs1 /]#

[root@vcs2 /]# lltconfig -t eth2 -d eth2
LLT lltconfig INFO V-14-2-15653 No link type is specified, defaulting to link type "ether"
[root@vcs2 /]#

[root@vcs1 /]# lltconfig -a list
Link 0 (eth0):
  Node   0 vcs1       :   00:0C:29:DE:BA:35  permanent
  Node   1 vcs2       :   00:0C:29:52:9B:FB

Link 1 (eth1):
  Node   0 vcs1       :   00:0C:29:DE:BA:3F  permanent
  Node   1 vcs2       :   00:0C:29:52:9B:05

Link 2 (eth2):
  Node   0 vcs1       :   00:0C:29:DE:BA:49  permanent
  Node   1 vcs2       :   00:0C:29:52:9B:0F

[root@vcs1 /]#

Removing a link from LLT

[root@vcs1 /]# lltconfig -u eth2----------> Command to remove a link from LLT Layer. (Need to execute the command on both the nodes)

[root@vcs2 /]# lltconfig -u eth2

This command unconfigures the LLT link, but does not permanently remove the link from configuration files.

Upon reboot, or restart of LLT, the cluster node will use the link again.

To remove the link permanently from the configuration, on each cluster node modify the /etc/llttab file and remove the line for device "eth2".

[root@vcs1 /]# lltconfig -a list
Link 0 (eth0):
  Node   0 vcs1       :   00:0C:29:DE:BA:35  permanent
  Node   1 vcs2       :   00:0C:29:52:9B:FB

Link 1 (eth1):
  Node   0 vcs1       :   00:0C:29:DE:BA:3F  permanent
  Node   1 vcs2       :   00:0C:29:52:9B:05

[root@vcs1 /]#


LLT node information:
    Node                 State    Link  Status  Address
   * 0 vcs1              OPEN
                                  eth0   UP      00:0C:29:DE:BA:35
                                  eth1   UP      00:0C:29:DE:BA:3F
     1 vcs2              OPEN
                                  eth0   UP      00:0C:29:52:9B:FB
                                  eth1   UP      00:0C:29:52:9B:05


[root@vcs1 /]# lltstat -l
LLT link information:
link 0  eth0 on ether hipri
        mtu 1500, sap 0xcafe, broadcast FF:FF:FF:FF:FF:FF, addrlen 6
        txpkts 3429  txbytes 370955
        rxpkts 3180  rxbytes 232432
        latehb 0  badcksum 0  errors 0
link 1  eth1 on ether hipri
        mtu 1500, sap 0xcafe, broadcast FF:FF:FF:FF:FF:FF, addrlen 6
        txpkts 3450  txbytes 349877
        rxpkts 3216  rxbytes 227532
        latehb 0  badcksum 0  errors 0
[root@vcs1 /]#